emacsorphanage / helm-swoop

Efficiently hopping squeezed lines powered by Emacs helm interface
GNU General Public License v3.0
688 stars 55 forks source link

Change sort order of buffers after helm-multi-swoop-projectile #191

Open killes opened 3 years ago

killes commented 3 years ago

I am trying to change the sort order of the buffers after doing helm-multi-swoop-projectile:

Bildschirmfoto vom 2020-08-05 20-02-41

I would like the ordering to take into account the years in the directory name in which the actual file is located. Is that possible at all?

The desired ordering would be:

Regesten.txt|P5 (1609-1610) Regesten.txt|P23 (1637-1640) Regesten.txt|P44 (1700-1701)

conao3 commented 3 years ago

Screenshot_2020-08-06_03-51-57 How about it? I compare entries with string<, the buffer should be ordered dictionary order. So, Regesten.txt|P5 should be Regesten.txt|P05 to get your expected result.

killes commented 3 years ago

Thanks for the speedy reply!

1) I cannot rename the directories, they are part of a shared project and the resource is named "P5" not "P05" (silly, I know).

2) I've downloaded the patched version and replaced my stock version, removed the .elc file and restarted emacs.

However, I do not think it fully works.

From top to bottom it is now ordered as:

P27 P51 P47 P49 P17 P18 P12 P22 P9 P1 P48 P34 ....

killes commented 3 years ago

Maybe it is a good idea to factor out the search function so that people can replace it with one of their choice?

conao3 commented 3 years ago

It already factors out the search function, it is helm-multi-swoop--get-marked-buffers. You can advise on it to small modify return value or completely override it.