From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#18268: Date: Tue, 23 Feb 2016 23:21:43 +1100 Message-ID: <87fuwjobvs.fsf@gnus.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456230204 32690 80.91.229.3 (23 Feb 2016 12:23:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Feb 2016 12:23:24 +0000 (UTC) Cc: 18268@debbugs.gnu.org To: Carlos Pita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 23 13:23:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aYBzk-0007kJ-Et for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Feb 2016 13:23:12 +0100 Original-Received: from localhost ([::1]:56590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYBzj-0000oP-Pg for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Feb 2016 07:23:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYBzf-0000o7-OW for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2016 07:23:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYBza-00026q-2D for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2016 07:23:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYBzZ-00026m-W2 for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2016 07:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aYBzZ-0008HT-Sa for bug-gnu-emacs@gnu.org; Tue, 23 Feb 2016 07:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Feb 2016 12:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18268 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 18268-submit@debbugs.gnu.org id=B18268.145623013331743 (code B ref 18268); Tue, 23 Feb 2016 12:23:01 +0000 Original-Received: (at 18268) by debbugs.gnu.org; 23 Feb 2016 12:22:13 +0000 Original-Received: from localhost ([127.0.0.1]:39423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYBym-0008Fv-P0 for submit@debbugs.gnu.org; Tue, 23 Feb 2016 07:22:12 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:35707) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYByk-0008Fm-Ix for 18268@debbugs.gnu.org; Tue, 23 Feb 2016 07:22:10 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aYByN-0006Za-QO; Tue, 23 Feb 2016 13:21:48 +0100 In-Reply-To: (Carlos Pita's message of "Fri, 15 Aug 2014 12:18:36 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aYByN-0006Za-QO MailScanner-NULL-Check: 1456834908.9286@c72HQtbPRUzd5imn9H0Qow X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113583 Archived-At: Carlos Pita writes: > The following is a simpler and more correct patch that also lets the > user (final user or major mode developer) control whether the submenus > are sorted or kept on top. The guiding idea is that there is two major > ways to offer an imenu, according to the mode: > > 1) Some modes show a hierarchy of language objects. For example: > python-mode will show class/method, function/nested function, etc. > relationships; org-mode will show section/subsection/subsubsection/... > hierarchies. In these cases keeping the submenus on top is not > adequate since it creates an artificial split of the list. > > 2) Some modes show top level submenus with fixed categories > (Functions, Classes, Variables, etc). These modes will presumably want > to keep the submenus on top and sorted in the order they were given. > > 3) Other modes would not fit either (1) or (2). Then, there is always > the possibility of turning off sorting and provide the menu structure > as is. > > Regards > -- > Carlos > > 156a157,161 >> (defcustom imenu-sort-submenus nil >> "Non-nil means Imenu should sort submenus also (using imenu-sort-function)." >> :type 'boolean >> :group 'imenu) Could you resubmit this as a context patch instead of a "raw" patch? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no