From: Yuchen Pei <id@ypei.org>
To: emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Subject: [PATCH] Fixing refile cache use for org-goto in indirect buffers.
Date: Mon, 19 Sep 2022 15:16:31 +1000 [thread overview]
Message-ID: <87zgevvs6e.fsf@ypei.org> (raw)
To reprod:
- make sure the org-refile-targets generates a big enough list where
the refile cache makes a difference
- visit an org file in org-refile-targets
- M-x clone-indirect-buffer-other-window
- C-0 C-c C-w to clear cache
- M-: (org-refile-get-targets)
- org-goto in the original buffer takes no effort
- but, org-goto in the indirect buffer takes time, which is unexpected.
---
lisp/org-refile.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/org-refile.el b/lisp/org-refile.el
index 16cff25bd..7189ef595 100644
--- a/lisp/org-refile.el
+++ b/lisp/org-refile.el
@@ -306,7 +306,10 @@ converted to a headline before refiling."
(dolist (f files)
(with-current-buffer (if (bufferp f) f (org-get-agenda-file-buffer f))
(or
- (setq tgs (org-refile-cache-get (buffer-file-name) descre))
+ (setq tgs (org-refile-cache-get
+ (buffer-file-name (when (bufferp f)
+ (buffer-base-buffer f)))
+ descre))
(progn
(when (bufferp f)
(setq f (buffer-file-name (buffer-base-buffer f))))
--
2.37.3
next reply other threads:[~2022-09-19 5:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 5:16 Yuchen Pei [this message]
2022-09-19 15:48 ` [PATCH] Fixing refile cache use for org-goto in indirect buffers Max Nikulin
2022-09-20 12:44 ` Yuchen Pei
2022-09-20 17:33 ` Max Nikulin
-- strict thread matches above, loose matches on Subject: below --
2022-09-19 5:16 Yuchen Pei
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=87zgevvs6e.fsf@ypei.org \
--to=id@ypei.org \
--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).