29

I'm using ECB (Emacs Code Browser) and my default layout is as follows:

;; +------+-------+--------------------------------------+
;; |              |                                      |
;; | Directories  |                                      |
;; |              |                                      |
;; +------+-------+                                      |
;; |   History    |              Edit                    |
;; +------+-------+                                      |
;; |   Methods    |                                      |
;; |              |                                      |
;; +-----------------------------------------------------+

By default, the methods are presented in the order they appear in the edited buffer, yet I'm searching for a way of having them sorted by name. I wanted to use something like ecb-methods-sort-method but it does not seem to exist. Any hint on how to set it up?

mzjn
  • 48,958
  • 13
  • 128
  • 248
Sebastien Varrette
  • 3,876
  • 1
  • 24
  • 21
  • potentially, this could be done, for example, by changing ECB code & introduce new customization parameter. Do you still need this? – Alex Ott Jun 12 '12 at 11:52
  • yes, but that's not crucial obviously, simply I see it present on other editors (such as TextMate) and it definitively makes sense. Now I confess I'm not sufficiently good lisp programmer to go into ECB code... – Sebastien Varrette Jun 20 '12 at 14:17
  • 8
    Please, write to me via e-mail or file corresponding issue at https://github.com/alexott/ecb - I'll try to find time to implement this – Alex Ott Jun 20 '12 at 15:17

1 Answers1

1

I took quick look at the docs, Look slike you can customize 'ecb-methods-menu-sorter'.

C-h v ecb-methods-menu-sorter

From the docs:

*Function which re-sorts the menu-entries of the directories buffer.          
If a function then this function is called to re-arrange the menu-entries of  
the combined menu-entries of the user-menu-extensions of                      
`ecb-directories-menu-user-extension' and the built-in-menu                   
`ecb-directories-menu'. If nil then no special sorting will be done and the   
user-extensions are placed in front of the built-in-entries.                  

The function get one argument, a list of menu-entries. For the format of this 
argument see `ecb-directories-menu-user-extension'. The function must return a
new list in the same format. Of course this function can not only re-arrange  
the entries but also delete entries or add new entries.                       
Raghu
  • 2,004
  • 1
  • 16
  • 18