emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 30fa6da552: Add new command 'imenu-flush-cache'


From: Filipp Gunbin
Subject: Re: master 30fa6da552: Add new command 'imenu-flush-cache'
Date: Thu, 12 May 2022 17:51:42 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]