Notes: Make ToC after sorting

This commit is contained in:
Adam Porter 2020-11-14 20:58:19 -06:00
parent 60d0c2a455
commit 511edbfff8
2 changed files with 5 additions and 4 deletions

View file

@ -4184,6 +4184,6 @@ I don't need this right now, but it might come in handy here or elsewhere.
** File-local variables
# Local Variables:
# before-save-hook: (org-make-toc (lambda () (when (fboundp 'unpackaged/org-fix-blank-lines) (unpackaged/org-fix-blank-lines t))) (lambda () (when (fboundp 'ap/org-sort-entries-recursive-multi) (save-excursion (goto-char (point-min)) (ap/org-sort-entries-recursive-multi '(?a ?p ?o))))))
# before-save-hook: ((lambda () (when (fboundp 'unpackaged/org-fix-blank-lines) (unpackaged/org-fix-blank-lines t))) (lambda () (when (fboundp 'ap/org-sort-entries-recursive-multi) (save-excursion (goto-char (point-min)) (ap/org-sort-entries-recursive-multi '(?a ?p ?o))))) org-make-toc)
# End:

View file

@ -662,9 +662,10 @@ When opened, the link searches the buffer it's opened from."
("containing file" nil)
(buffers-files (prin1-to-string buffers-files))))
(string-or-file-buffer-p
(thing) (or (stringp thing)
(and (bufferp thing)
(buffer-file-name thing)))))
(thing) (cl-typecase thing
(string thing)
(buffer (or (buffer-file-name thing)
(buffer-file-name (buffer-base-buffer thing)))))))
(unless (or (string-or-file-buffer-p org-ql-view-buffers-files)
(and (listp org-ql-view-buffers-files)
(cl-every #'string-or-file-buffer-p org-ql-view-buffers-files)))