Questions tagged [sorting]

Use the sorting tag for questions involving arranging things in a defined order: sorting lines alphabetically, bibtex entries by date or author, emails by sender, completion candidates by various criteria, etc.

Filter by
Sorted by
Tagged with
2
votes
2answers
135 views

How to put buffers named with an asterisk at the end of ido's selection list?

with (ido-switch-buffer), when I type stuff, "*magit: stuff*" comes before Stuff.txt. the sorting seems to be done by recency, rather than the buffer name. more generally, a custom sort function ...
5
votes
1answer
833 views

Sorting org-mode org-agenda file

I have an org-mode file in standard agenda format: * Dentist <2015-10-01> * Put up shelves <2015-10-05> I'm just starting to use org-agenda but I still use just that single file a lot ...
5
votes
2answers
313 views

Change field separator for sort-fields

sort-fields and sort-numeric-fields work great; but the field separator is whitespace. I would like to use a different delimiter (e.g.: [colon-char]). I want this feature because I find myself ...
2
votes
1answer
158 views

Sort minor-mode-alist alphabetically (in the mode-line) using :lighter

Q: How to sort the minor-mode-alist alphabetically (in the mode-line) using the :lighter as the criteria for alphabetization. Rough draft that does not work: (setq mode-line-format '( (:eval ...
6
votes
2answers
338 views

How to make private python methods the last company-mode choices?

I'm using emacs with company-mode and I'd like the 'private' methods (method that start with underline) to be shown last, since they are kind of useless for imported libraries in python. See the image:...
23
votes
4answers
5k views

org: How to sort headings by TODO and then by priority?

I often have a list like this: * Main heading ** TODO [#A] Make world better ** TODO [#B] Make Emacs better ** TODO [#B] Customize emacs ** DONE [#C] some task ** TODO [#A] Launch rocket to mars I ...
7
votes
2answers
219 views

Change order of symbols for «sort-lines»

I am using «sort-lines» to sort includes in C/C++ files before saving. The problem that arises is that a headers with " symbols sorted higher than ones with < symbols. But I want the reverse. How ...
3
votes
4answers
411 views

Sorting words with hyphens (e.g. in a Lisp mode)

SortWords in the EmacsWiki suggests this function as a way to sort words: (defun sort-words (reverse beg end) "Sort words in region alphabetically, in REVERSE if negative. When prefixed with ...
10
votes
2answers
5k views

Sorting headings in an ORG file

I'm taking notes in a largish org-mode file that has the following structure: * Toto, A Notes about Toto. * Titi, C Notes about Titi. * Tutu, A Notes about Tutu. I'd like to sort the file so that ...
10
votes
3answers
464 views

Sort file names (numbered) in dired

When Dired sorts files by name, it sorts in alphabetical order. That's fine with letters; however, when the file names start with numbers, it would be better to sort in numerical value. Example: ...