From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Robert Pluim <rpluim@gmail.com>, emacs-devel@gnu.org
Subject: Re: master 30fa6da552: Add new command 'imenu-flush-cache'
Date: Thu, 12 May 2022 17:51:42 +0300 [thread overview]
Message-ID: <m25yma9535.fsf@fastmail.fm> (raw)
In-Reply-To: <87czgiyk3g.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 12 May 2022 15:08:19 +0200")
On 12/05/2022 15:08 +0200, Lars Ingebrigtsen wrote:
> Filipp Gunbin <fgunbin@fastmail.fm> writes:
>
>> Yes, let's leave the prefix for some future day. Imenu could present
>> its list in different ways, that's where the prefix will be useful.
>>
>> BTW, I thought the _function_ (even if one-liner) was missing, not the
>> command, why the command is needed at all? Why the *Rescan* selection
>> is not enough?
>
> I may have misread the request -- I thought a command was what was
> requested?
bug#20589 refers to this discussion
https://stackoverflow.com/questions/13426564/how-to-force-a-rescan-in-imenu-by-a-function/,
and Marcin requests a function there, to use in his code.
Also, looking at imenu-choose-buffer-index, it does this when rescan is
selected:
--8<---------------cut here---------------start------------->8---
(and (equal result imenu--rescan-item)
(imenu--cleanup)
(setq result t imenu--index-alist nil)))
--8<---------------cut here---------------end--------------->8---
I guess you should extract
(when (imenu--cleanup)
(setq imenu--index-alist nil))
from here.
Filipp
next prev parent reply other threads:[~2022-05-12 14:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <165232228575.4973.16265111485645720331@vcs2.savannah.gnu.org>
[not found] ` <20220512022446.10C81C01683@vcs2.savannah.gnu.org>
2022-05-12 8:51 ` master 30fa6da552: Add new command 'imenu-flush-cache' Robert Pluim
2022-05-12 11:51 ` Lars Ingebrigtsen
2022-05-12 13:02 ` Filipp Gunbin
2022-05-12 13:08 ` Lars Ingebrigtsen
2022-05-12 14:51 ` Filipp Gunbin [this message]
2022-05-13 12:07 ` Lars Ingebrigtsen
2022-05-12 15:39 ` [External] : " Drew Adams
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m25yma9535.fsf@fastmail.fm \
--to=fgunbin@fastmail.fm \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=rpluim@gmail.com \
/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.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).