From d7ef28aa79d92cc088898284688dbc134b0bdd5e Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Mon, 10 Mar 2014 14:55:56 -0400 Subject: MNT: Make variable names for files consistent Use "-name" to indicate no path. --- bog.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bog.el b/bog.el index ebba48a..62ab90d 100644 --- a/bog.el +++ b/bog.el @@ -265,8 +265,8 @@ text under point if it matches `bog-citekey-format' or using (defun bog-open-citekey-pdf (citekey) (let* (citekey-pdf (citekey-pdfs (bog-citekey-pdfs citekey)) - (choices (-map 'file-name-nondirectory citekey-pdfs)) - (num-choices (length choices))) + (citekey-pdfs-names (-map 'file-name-nondirectory citekey-pdfs)) + (num-choices (length citekey-pdfs-names))) (cond ((= 0 num-choices) (error "No PDF found for %s" citekey)) @@ -275,7 +275,8 @@ text under point if it matches `bog-citekey-format' or using (t (setq citekey-pdf (expand-file-name (funcall bog-completing-read - "Select PDF file: " choices) + "Select PDF file: " + citekey-pdfs-names) bog-pdf-directory)))) (start-process "bog-pdf" nil bog-pdf-opener citekey-pdf))) @@ -300,8 +301,8 @@ The citekey will be taken from the text under point if it matches (let* ((staged-pdfs (file-expand-wildcards (concat (file-name-as-directory bog-stage-directory) "*.pdf"))) - (choices (-map 'file-name-nondirectory staged-pdfs)) - (num-choices (length choices)) + (staged-pdfs-names (-map 'file-name-nondirectory staged-pdfs)) + (num-choices (length staged-pdfs-names)) staged-pdf) (cond ((= 0 num-choices) @@ -312,7 +313,8 @@ The citekey will be taken from the text under point if it matches (t (setq staged-pdf (expand-file-name (funcall bog-completing-read - "Select PDF file to rename: " choices) + "Select PDF file to rename: " + staged-pdfs-names) bog-stage-directory)))) (message "Renamed %s to %s" staged-pdf (funcall bog-pdf-renaming-func staged-pdf citekey)))) -- cgit v1.2.3