Compare commits

...

3 commits

View file

@ -370,9 +370,11 @@ DIRECTORY is the directory where the org files are located."
"Copy the ID property of the heading at point to the kill-ring."
(interactive)
(let ((id (org-entry-get nil "ID")))
(when id
(kill-new id)
(message "Copied ID: %s" id))))
(if id
(progn
(kill-new id)
(message "Copied ID: %s" id))
(message "No ID property in the heading at point."))))
(defun my-get-heading-from-org-id-db (org-id)
"Retrieve the heading title associated with an Org ID from the
@ -499,7 +501,7 @@ function as a hook, add it to the appropriate hook list, such as
Buffers in modified (not yet saved) state in emacs will not be reverted. They
will be reverted though if they were modified outside emacs.
Buffers visiting files which do not exist any more or are no longer readable
will be killed."
will be killed. nov-mode buffers will be skipped."
;; via https://emacs.stackexchange.com/a/24461/29715
(interactive)
(dolist (buf (buffer-list))
@ -507,7 +509,10 @@ will be killed."
;; Revert only buffers containing files, which are not modified;
;; do not try to revert non-file buffers like *Messages*.
(when (and filename
(not (buffer-modified-p buf)))
(not (buffer-modified-p buf))
(not ; skip nov-mode buffers
(eq (buffer-local-value 'major-mode buf) 'nov-mode))
)
(if (file-readable-p filename)
;; If the file exists and is readable, revert the buffer.
(with-current-buffer buf