mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-29 07:58:21 +00:00
org-archive: error when buffer isn't visiting a file
* lisp/org-archive.el (org-archive-subtree): while it might be possible to archive an headline of a temporary buffer (i.e. not visiting a file), it wouldn't be really sensical.
This commit is contained in:
parent
26ba1b3680
commit
0b4b66b302
@ -207,7 +207,9 @@ this heading."
|
||||
(this-buffer (current-buffer))
|
||||
;; start of variables that will be used for saving context
|
||||
;; The compiler complains about them - keep them anyway!
|
||||
(file (abbreviate-file-name (buffer-file-name (buffer-base-buffer))))
|
||||
(file (abbreviate-file-name
|
||||
(or (buffer-file-name (buffer-base-buffer))
|
||||
(error "No file associated to buffer"))))
|
||||
(olpath (mapconcat 'identity (org-get-outline-path) "/"))
|
||||
(time (format-time-string
|
||||
(substring (cdr org-time-stamp-formats) 1 -1)
|
||||
|
Loading…
Reference in New Issue
Block a user