Re: [Orgmode] Patch: org-reload changes default-directory
SebastianRose writes: > Hi, > > > I found out why I ran into this earlier. It's _not_ org-reload, it's > org-version that changes the default directory. Patch attached. > > > I don't know where my bug report is... so I cannot respond to that > post. As I cannot find the bug report on the gmane, I thought I'd better re-write the reason for this patch, so you can reproduce the problem. Steps to reproduce the bug the patch fixes here: 1. Open an *.org file you can export to PDF. Ensure the file is not located where your Org-mode sources are (org-*.el files). Choose a file, that includes some images or a SETUPFILE using relative paths. 2. M-x default-directory RET to see the value of that variable in the current buffer. 3. C-c C-e p to export to PDF and verify it works. 4. C-c C-x ! to `org-reload' 5. Now repeat steps 2 and 3. Note, that the export fails. Best wishes Sebastian ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Patch: org-reload changes default-directory
Hi, I found out why I ran into this earlier. It's _not_ org-reload, it's org-version that changes the default directory. Patch attached. I don't know where my bug report is... so I cannot respond to that post. Best wishes, Sebastian diff --git a/lisp/org.el b/lisp/org.el index 42e229e..0b1005f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -102,7 +102,8 @@ "Show the org-mode version in the echo area. With prefix arg HERE, insert it at point." (interactive "P") - (let* ((version org-version) + (let* ((origin default-directory) + (version org-version) (git-version) (dir (concat (file-name-directory (locate-library "org")) "../" ))) (if (and (file-exists-p (expand-file-name ".git" dir)) @@ -122,6 +123,7 @@ With prefix arg HERE, insert it at point." (cd pwd (setq version (format "Org-mode version %s" version)) (if here (insert version)) +(cd origin) (message version) version)) ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode