* bug#35796: 26.1; tabulated-list-sort user-friendliness
@ 2019-05-19 5:09 Boruch Baum
2019-07-09 2:35 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Boruch Baum @ 2019-05-19 5:09 UTC (permalink / raw)
To: 35796
This is a feature request for function `tabulated-list-sort' to make it
more user-friendly.
When the function is called interactively without a prefix-argument, it
should prompt the user (using `completing-read'?) for which column to
sort by (taken from the car of each element of `tabulated-list-format').
When called with a prefix argument, that would be redundant since the
prefix argument *is* the sort column.
The mode should also have a means to directly and explicitly ask for the
direction of sort. Here are a few implementation ideas for that, but any
better one that you can come up would be fine by me:
1) Create explicit functions `tabulated-list-sort-ascending' and
`tabulated-list-sort-descending'. Allow the user to bind them as 'S'/'s'
or 'O'/'o' or whatever other binding that desire. ('S' and 'o' are
currently used by default by the mode).
2) Add code in the existing function to allow for negative prefix
arguments. Then interpret positive numbers as a request for an
ascending sort and negative numbers as a request for a descending
sort.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#35796: 26.1; tabulated-list-sort user-friendliness
2019-05-19 5:09 bug#35796: 26.1; tabulated-list-sort user-friendliness Boruch Baum
@ 2019-07-09 2:35 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-09 2:35 UTC (permalink / raw)
To: Boruch Baum; +Cc: 35796
Boruch Baum <boruch_baum@gmx.com> writes:
> This is a feature request for function `tabulated-list-sort' to make it
> more user-friendly.
>
> When the function is called interactively without a prefix-argument, it
> should prompt the user (using `completing-read'?) for which column to
> sort by (taken from the car of each element of `tabulated-list-format').
> When called with a prefix argument, that would be redundant since the
> prefix argument *is* the sort column.
It sorts based on the current column (I just tried it in a C-x C-b
buffer), and it seems to work fine for me.
> The mode should also have a means to directly and explicitly ask for the
> direction of sort. Here are a few implementation ideas for that, but any
> better one that you can come up would be fine by me:
It reverses the direction when you hit it twice, which seems logical to
me. So I think this works as it should.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-09 2:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-19 5:09 bug#35796: 26.1; tabulated-list-sort user-friendliness Boruch Baum
2019-07-09 2:35 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.