emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: SebastianRose <sebastian_rose@gmx.de>
To: Emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Cc: carsten.dominik@gmail.com
Subject: Patch: org-reload changes default-directory
Date: Tue, 10 Nov 2009 23:51:55 +0100	[thread overview]
Message-ID: <87hbt2kn78.fsf@gmx.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch org-version --]
[-- Type: text/x-diff, Size: 709 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

             reply	other threads:[~2009-11-10 22:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 22:51 SebastianRose [this message]
2009-11-10 23:12 ` Patch: org-reload changes default-directory Sebastian Rose
2009-11-11  9:48 ` Carsten Dominik
2009-11-11  9:59   ` Sebastian Rose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hbt2kn78.fsf@gmx.de \
    --to=sebastian_rose@gmx.de \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).