GNU bug report logs -
#18268
24.3.92; Make imenu sort submenus also (fix included)
Previous Next
Reported by: carlosjosepita <at> gmail.com
Date: Thu, 14 Aug 2014 23:19:02 UTC
Severity: minor
Tags: patch
Found in version 24.3.92
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Carlos Pita <carlosjosepita <at> gmail.com> 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
This bug report was last modified 5 years and 333 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.