| Submitter | Yagnesh Raghava Yakkala |
|---|---|
| Date | 2011-12-21 13:31:37 |
| Message ID | <87iplacapy.fsf@live.com> |
| Download | mbox | patch |
| Permalink | /patch/1081/ |
| State | New |
| Headers | show |
Comments
The patch indeed fixes the problem, but has the following side effect: the org-goto prompt now acquires a (possibly invalid) default location, e.g. after I go to node "foo" in some file (file1), and do an org-goto in some other file (file2), it will give me "foo" as a default location, even though there's no node "foo" in file2. This is mostly a cosmetic bug, but a bug nonetheless, because the signature of the function in the patch is (org-refile-get-location &optional PROMPT DEFAULT-BUFFER NEW-NODES NO-EXCLUDE) and we are in fact passing nil to default-buffer. I would expect this to suppress the showing of the default prompt. On Wed, Dec 21, 2011 at 8:31 AM, Yagnesh Raghava Yakkala <yagnesh@live.com> wrote: > Hi, > > Leo Alekseyev <dnquark@gmail.com> writes: > >> I recorded the bug in a short screencast. emacs was started with -Q; >> in the second part of the screencast it was restarted with a config >> file that only included ido mode >> >> http://www.youtube.com/watch?v=z6nDUh0RH_c&feature=youtu.be >> > > The attached highly unrelible online PATCH fixes the problem. I dont know > it has any side effects. > > > > > -- > YYR >
Hello, Leo Alekseyev <dnquark@gmail.com> writes: > The patch indeed fixes the problem, but has the following side effect: > the org-goto prompt now acquires a (possibly invalid) default > location, e.g. after I go to node "foo" in some file (file1), and do > an org-goto in some other file (file2), it will give me "foo" as a > default location, even though there's no node "foo" in file2. This is > mostly a cosmetic bug, but a bug nonetheless, because the signature of > the function in the patch is > (org-refile-get-location &optional PROMPT DEFAULT-BUFFER NEW-NODES > NO-EXCLUDE) and we are in fact passing nil to default-buffer. I would > expect this to suppress the showing of the default prompt. It seems this bug is already present there and not introduced by the patch I posted. I think possible solutions are: 1) writing a function similer to org-refile-get-location to be called only by org-goto. 2) modifying org-refile-get-location so that it recognize it is called by org-goto and acts accordingly. Its also possible I am totally wrong here because of my zero+ elisp knowledge. > > > On Wed, Dec 21, 2011 at 8:31 AM, Yagnesh Raghava Yakkala > <yagnesh@live.com> wrote: >> Hi, >> >> Leo Alekseyev <dnquark@gmail.com> writes: >> >>> I recorded the bug in a short screencast. emacs was started with -Q; >>> in the second part of the screencast it was restarted with a config >>> file that only included ido mode >>> >>> http://www.youtube.com/watch?v=z6nDUh0RH_c&feature=youtu.be >>> >> >> The attached highly unrelible online PATCH fixes the problem. I dont know >> it has any side effects. >> >> >> >> >> -- >> YYR >> > >
Patch
diff --git a/lisp/org.el b/lisp/org.el index 7e24367..02a4666 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6797,7 +6797,7 @@ hierarchy above." (selected-point (if (eq interface 'outline) (car (org-get-location (current-buffer) org-goto-help)) - (let ((pa (org-refile-get-location "Goto"))) + (let ((pa (org-refile-get-location "Goto" nil nil t))) (org-refile-check-position pa) (nth 3 pa))))) (if selected-point