emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Patch: org-reload changes default-directory


From: SebastianRose
Subject: [Orgmode] Patch: org-reload changes default-directory
Date: Tue, 10 Nov 2009 23:51:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

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))
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]