diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-03-04 01:03:45 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-03-04 01:03:45 -0500 |
commit | 39f336c03edd26a77b5ce3fe3b5d80ff36b6f9c9 (patch) | |
tree | 598c5500003e18fb45a5f77e3f09d818c87ef685 /bog.el | |
parent | 06551c1754e884504ab5318986c9b9f79d5266b3 (diff) | |
download | bog-39f336c03edd26a77b5ce3fe3b5d80ff36b6f9c9.tar.gz |
bog-create-combined-bib: Fix citekey sorting
Sort citekeys after they're collected from marked files so that the
list is sorted alphabetically, order and then alphabetically. (This
fixes behavior that was introduced in 87f4e2ce8.)
Diffstat (limited to 'bog.el')
-rw-r--r-- | bog.el | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -762,11 +762,13 @@ Otherwise, collect citekeys the current buffer." (let ((bib-buffer-name "*Bog combined bib*") citekeys citekey-bibs) - (if (derived-mode-p 'dired-mode) - (setq citekeys - (delete-dups (cl-mapcan #'bog-citekeys-in-file - (dired-get-marked-files nil arg)))) - (setq citekeys (bog-citekeys-in-buffer))) + (let ((bog--no-sort t)) + (if (derived-mode-p 'dired-mode) + (setq citekeys + (delete-dups (cl-mapcan #'bog-citekeys-in-file + (dired-get-marked-files nil arg)))) + (setq citekeys (bog-citekeys-in-buffer)))) + (setq citekeys (sort citekeys #'string-lessp)) (setq citekey-bibs (mapcar (lambda (ck) (cons ck (bog-citekey-as-bib ck))) citekeys)) |