Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
killes opened this issue Aug 5, 2020 · 4 comments
Open

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

killes opened this issue Aug 5, 2020 · 4 comments

Comments

@killes
Copy link

killes commented Aug 5, 2020

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
Copy link
Collaborator

conao3 commented Aug 5, 2020

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
Copy link
Author

killes commented Aug 5, 2020

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
Copy link
Author

killes commented Aug 5, 2020

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

@conao3
Copy link
Collaborator

conao3 commented Aug 5, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants