From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.devel Subject: Re: master 30fa6da552: Add new command 'imenu-flush-cache' Date: Thu, 12 May 2022 17:51:42 +0300 Message-ID: References: <165232228575.4973.16265111485645720331@vcs2.savannah.gnu.org> <20220512022446.10C81C01683@vcs2.savannah.gnu.org> <87mtfn3zh7.fsf@gmail.com> <87v8ubynns.fsf@gnus.org> <87czgiyk3g.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15844"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: Robert Pluim , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 12 16:56:01 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npAES-0003tb-9e for ged-emacs-devel@m.gmane-mx.org; Thu, 12 May 2022 16:56:01 +0200 Original-Received: from localhost ([::1]:35266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npAER-0002S5-7O for ged-emacs-devel@m.gmane-mx.org; Thu, 12 May 2022 10:55:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npAAR-00073z-3C for emacs-devel@gnu.org; Thu, 12 May 2022 10:51:51 -0400 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:40237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npAAO-000517-V8 for emacs-devel@gnu.org; Thu, 12 May 2022 10:51:50 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id C4CBA32000D7; Thu, 12 May 2022 10:51:45 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 12 May 2022 10:51:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1652367105; x=1652453505; bh=utQJx9X0KU 8NZVhdPIllWos8VLJShbhaHYbl5wrtvVc=; b=F4xrGRLiGqnpahkAIfrk4JslnP OI9pwnSRZfXjeQ2ykkp0xAqJ5Gva1gvK3JKOY9XoDkKEDWS2b1Cd7HQtKr3WbrJa NGeIOOehlCWs61VED18s8dazWMyReSvJjyPFGMzT2j84TwzvxyfwDuyVEVa6Jxzt ujYDtl0lK+Ix/3To88rn+kmMRSmYkLSRqRcpXBjQirzXPKNcP+nP4snVReyQIvjY BxatD6Hq+T8G3ediAfLmbjqlxfY9u0jOrXWZiuJg23aSnofEl60NQQ7KFgCtU5L1 5oqiqIXMaDiIrdpWIfyNGRZ/I4n2ZeeoHYDG1R6XnhMJ3KIDoYvYrMg4Pm7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1652367105; x= 1652453505; bh=utQJx9X0KU8NZVhdPIllWos8VLJShbhaHYbl5wrtvVc=; b=M QLRlBGDmY6bwLTBW/tmbb4lv8i3U8tU4Tp7wHg2urFE0HfwmZ37+A2r3jvBYhGmS MXY2y1tHrMjcDFG0WhQtlnPxr8DLCCr9GHuLF/Byj7QtEduizLW5hEvRAIGtDTDa 2QT65YtkxufZdREp0DbB9ueGC8L6GkWtfTQHc4Zq1bNLe08zIb6/TWQO33zMPN5k wA3JUS2vIgS1w+3oMMC1OBRw0kKX3yKX6hQ+xzgwBTXTOD35ISt1u6abz9ELV3LQ u5eos2fWO1tDNk51k1LoVlVFgW5zP5gxp/MaPQaLjqo3cqs6ZJc2+EcHUqbuo+Bl jM1ArUvG0fhS6TPKhzQMA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgeejgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefhihhlihhp phcuifhunhgsihhnuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqnecuggftrf grthhtvghrnhepudetuedugeeiffegvdeuueeludfgffffgfegudfggfefleelfefhueff leekfefhnecuffhomhgrihhnpehsthgrtghkohhvvghrfhhlohifrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhguhhnsghinhes fhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 May 2022 10:51:44 -0400 (EDT) In-Reply-To: <87czgiyk3g.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 12 May 2022 15:08:19 +0200") Mail-Followup-To: Lars Ingebrigtsen , Robert Pluim , emacs-devel@gnu.org Received-SPF: pass client-ip=64.147.123.25; envelope-from=fgunbin@fastmail.fm; helo=wout2-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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:289692 Archived-At: On 12/05/2022 15:08 +0200, Lars Ingebrigtsen wrote: > Filipp Gunbin 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