From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2HRzNT4AKGO+KgEAbAwnHQ (envelope-from ) for ; Mon, 19 Sep 2022 07:38:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GByHNT4AKGNtIAAA9RJhRA (envelope-from ) for ; Mon, 19 Sep 2022 07:38:06 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EA4D23A644 for ; Mon, 19 Sep 2022 07:38:05 +0200 (CEST) Received: from localhost ([::1]:36524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa9To-0006pn-S0 for larch@yhetil.org; Mon, 19 Sep 2022 01:38:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa9Sj-0006pY-Fh for emacs-orgmode@gnu.org; Mon, 19 Sep 2022 01:36:57 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:41589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa9Sh-0000dG-TA for emacs-orgmode@gnu.org; Mon, 19 Sep 2022 01:36:57 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 723D75C0249 for ; Mon, 19 Sep 2022 01:36:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 19 Sep 2022 01:36:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ypei.me; h=cc :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t= 1663565811; x=1663652211; bh=mLcf/8x2Ptg89gXGZDmemfzV8WPGjx2sReE 7GUaje2Y=; b=HqqXq2ZO8Kr8AuwMTSxgLaSuv/vZ8jCl+u+ACsk6yUvn29S8MO8 i44PG5alsRoQU8CQWMY/cbfpLmO5JAupjvl8UvZWSI77+otaggpZ9pMIlawlupwe d708o4C5lNUnNrCp/jpodl4+6MPhWI/0jL7aj6I7p+4xNJytfokEgavBZJD2sw0m nWlSoN55Yo5K1bYZjVo3WErw4cU+UVBjrpIXobW9ydk1yI7yhcduHAj07dFpkFtU 9Wq69mR8c4f3udaphh1x04lmW9IXsxmGW181JW9D+1LzU9uXNe+R4Lk2o4lLNXnH nXpsNugRfW+zwgCd4zW6i1a4rBhbUdwqPUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663565811; x= 1663652211; bh=mLcf/8x2Ptg89gXGZDmemfzV8WPGjx2sReE7GUaje2Y=; b=u /7NOGZbf5KpaWwH/d68mebuEikHl9olsmJh0jG0pui+TdBHWB77+aaR7JyHaZWwk 7WHrQJgubvEEdXtvCp9L2gD6K6g7IcY8kMgHoNX5til89zX6rvyj+YpAm5x5znqp 9TCIANLIu9fptORmIRF2sKFhGqDxQOo9q3jEBQEfnhKcQoMyEHYgmGlDT1LwXsD3 chSZC1WHTEt5F9VOFHFy5b/8mSqYtDK5rJ+7e8dmqL/sevUvAQwYJ0hGuWwClzd3 rxYARMQKSoshuoLEzEQqXBg/eMsygSyTHXqxd6JwUNiAiURpBaDucUtkuAvgkz5r nwkkjZCOxATyGomiJFlnQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedviedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfggtgesthdtredttddttdenucfhrhhomhepjghutghhvghnucfr vghiuceohhhiseihphgvihdrmhgvqeenucggtffrrghtthgvrhhnpeejteegheduleehte egffevueehvdektedtgfffhfekueefieefffetteduueeijeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhiheshihpvghirdhmvg X-ME-Proxy: Feedback-ID: i99514556:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 19 Sep 2022 01:36:49 -0400 (EDT) From: Yuchen Pei To: emacs-orgmode mailing list Subject: [PATCH] Fixing refile cache use for org-goto in indirect buffers. Date: Mon, 19 Sep 2022 15:16:31 +1000 Signed-off-by: Yuchen Pei Message-ID: <871qs8vsb6.fsf@ypei.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=66.111.4.27; envelope-from=hi@ypei.me; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663565886; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mLcf/8x2Ptg89gXGZDmemfzV8WPGjx2sReE7GUaje2Y=; b=GFOeyTXUzeFt6+O7siwFgszXIEWs8Ph3apaJdn1pa/owxGPKQWwRpY7O0cFI1ed87Jej1K rADAfY2arq2H2Q5N9XvII9J1gItqQFzucZIeVlRgMII4rmV477Pp3fjGhoQPjrcC1Q3D2R OH0pJDsB3rSwKTWGMW8YBIyaI2Vy1u98gW8AM1eTf+88C0PuuPTxvkexasJZB+JQ7ZH6/Q yJntysGBqm6Fjo+YClcYDofI0VG+68ltlQFXO05hiZJbMFOWgnwVCTCGA9t7NEKswGe0lZ yYtOZU6NktH4GLhyLD0+4NH3egTl6SYYdzlDAdnJa6HJHaaM4h6hi9+HdUuE1w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663565886; a=rsa-sha256; cv=none; b=szzOsYj2QL0R6PJemhTQNmUBgKUy4/IqWSU3McK4TrDCxZzGMRlW73Y9K8RnpsLc/IFX/n M/Ft8l2I/WQEM2G+YRd+h0bKV1CNTFHa/6rVlTYVQBx0FuXoGgJreBWQ9PI00XnpovtvlU YIIKOhdk4rYelGcn+6gSFuPmJBNOUR4w4J9FuQJaEN6LQSiZK/wwMQPAR/sf+2Ny/wLh1X 3bDDq70uMfGCgrJU69A943HhGk6cP/FnBu7LBMLj303DwvIhTO7MGP/dj09UD5MEVIFZT7 lWUBe0DdbbxfGfwKghU93LETnOBUU+qL+HOG6y9V1BNJ3QendIgPuMRx1uRUow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ypei.me header.s=fm2 header.b=HqqXq2ZO; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b="u /7NOGZ"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ypei.me header.s=fm2 header.b=HqqXq2ZO; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b="u /7NOGZ"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EA4D23A644 X-Spam-Score: 1.26 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7bLQPFBkhfMO 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 Message-ID: <877d20vscj.fsf@ypei.org>