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
0
votes
1answer
158 views

org mode sort problems with (numerical) properties

I use the property "pages" for the number of pages of an article or book. There are two problems. First: If I use C-c ^ to sort the items by the value of pages org-sort seems to interpret the ...
0
votes
1answer
50 views

Idiomatic boolean comparators

Are there idiomatic boolean comparators in emacs lisp? Something like: (my/bool< nil t) => t (my/bool< 1 2) => nil For example, a comparator that returns t if the first argument is ...
2
votes
2answers
234 views

org-sort-entries recursively

A natural approach to sorting an outline recursively would be the following: (org-map-entries (lambda () (org-sort-entries nil ?f 'my/sort-function) nil 'tree) ...
2
votes
1answer
494 views

Reverse suggestions from hippie-expand

I currently have the following settings for hippie-expand in my .emacs file: (setq hippie-expand-try-functions-list '(try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-...
1
vote
1answer
115 views

shuffling the paragraphs in a buffer

Is there a package/function for shuffling the paragraphs in the buffer? (I mean to sort the paragraphs with a random order, not changing the paragraphs, just randomizing their order). Motivation: ...
2
votes
0answers
142 views

order agenda so all-day and multi-day duration items appear on top

My problem is with two of my main use-cases for time-stamped items (essentially events). Consider these two org-mode items: * Clojure Dojo at uSwitch <2016-11-14 Mon 19:00> * Trip to Jamaica &...
2
votes
1answer
234 views

Is there a way to sort buffers alphabetically in speedbar

By default speedbar displays buffers as they are in the buffer list. Is there a way to sort them by their name alphabetically, either automatically or by triggering the sorting?
9
votes
1answer
1k views

dired - sort and hide by default

More often than not, when I open a dired buffer, I press ( to run dired-hide-details-mode s to rundired-sort-toggle-or-edit What's a good way to have these done automatically every time I open a ...
1
vote
1answer
83 views

Org mode customized alphabetic sorting

The children of a heading at point can be sorted alphabetically with C-c ^ a. Can this sorting method be customized? What I want is to sort Greek words according to their Latin translitteration. For ...
0
votes
0answers
202 views

Org-mode: manually sorting headlines column view

I love that we can quickly re-order our outlines with the M-<Up|Down> arrow keys. For whatever reason, I can't get this to work in column view. I would like to enable this behavior. Any ideas ...
1
vote
1answer
140 views

Sort Dewey Decimal list?

If I have a list of books' call numbers in Dewey Decimal in a buffer, is this something I could sort with Emacs regex -- or is this an elisp task? For example, 261.1 C87 comes before 261.104 Z99 ...
4
votes
2answers
254 views

sorting paragraphs of a document by paragraph numbers (not lexicographically)

I have a document whose paragraphs start with a number like this: 101 kjwdujd dkjcjiekrd wekdhehwrd kwedhiehrc wekdhchjedc kjdchhedch . 99 dsjcoiedc wdhiwedc wedhiuwhediuhewdkdeh wedghiuwghediughedc ...
9
votes
1answer
225 views

Sorting lines with accented characters

When sorting the lines by sort-lines the lines beginning with ä comes after the lines starting with z. It would be nice if the lines could be sorted ignoring the accents, Umlauts, etc, like in a ...
4
votes
1answer
147 views

Randomize headers in Org mode

How can I randomize headers in org mode? e.g. If I had a list like this, : * apple 1 * lemon 2 * banana * orange How can I randomize those headers and get lists like these?: * lemon 2 * ...
5
votes
1answer
133 views

Sort by a suffix in file names in dired

I would like to sort the dired buffer by a suffix in the file names. For instance, with the following buffer content: /nixos/nix/store: total used in directory 140344 available 17530560 drwxrwxr-t ...
4
votes
2answers
217 views

Sorting an org-table numerically, ignoring commas (org-table-sort-lines)

I have the following org-table: | Row # | Facility | Recycled Off-site | |-------+--------------------------+-------------------+ | 1 | 1234, 12th st, jamestown | 216,...
2
votes
0answers
86 views

Dired: manual files sorting for specific directories

I have a directory with many folder. When I open it in dired I see this: bundles ckeditor companies contries failitators induction jquery_update lwt_shared members messages offices ... I often work ...
3
votes
1answer
134 views

how to sort describe-variable completion list by recency (or frequency)?

When I run describe-variable, then choose something, I often wind up looking at the same variable again later or next session. However, when I do describe-variable again, the helm list of variables ...
1
vote
2answers
238 views

Most efficient way of sorting a list

Given a plain list like: - buy tea - call Anna - Reply email to John - pay bill 1 - phone Derick - Reply to grad-pa which you don't want to sort alphabetically, how can you sort it? Things like '...
2
votes
1answer
187 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 ...
5
votes
1answer
1k 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 ...
11
votes
2answers
6k 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 ...
3
votes
4answers
455 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 ...
11
votes
3answers
565 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: ...

1
2