emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "François Pinard" <pinard@iro.umontreal.ca>
To: emacs-orgmode@gnu.org
Subject: C-c ^ not fully useful
Date: Mon, 18 Feb 2013 14:36:57 -0500	[thread overview]
Message-ID: <86vc9p1kiu.fsf@iro.umontreal.ca> (raw)

Hi, Org people.

"C-c ^" (org-sort) is not as useful to me as I would like it to be.  I
often have lists in which each item start with a link.  When sorting
such lists, because of the  [[URL][TITLE]] coding, entries are sorted
along the domain of the link (the URL), which is useful in itself of
course, but often not as comfortable as if the sort was done on TITLE.

One could provide a function for extracting the sorting key out of the
current line (I did not try this facility yet, I presume this is how it
works), so I could likely solve my own problem, as described above.

The ideal for me would be that some Lisp function exists to extract the
visual line out of the physical line, that is, the line once all
invisible parts have been removed.  This would take care not only for
links, but also for highlighting marks (like =~*/) when they happen to
be hidden.

However, I guess I'm not alone wanting "C-c ^" to do what is most
expected.  So, these few suggestions:

- Could org-sort, by default and for most of its current option letters,
  sort alphabetically (or lexicographically as they say!) over the
  visual aspect of the line instead of its physical contents?  It might
  be difficult if Emacs has no function to reach the visual aspect of a
  line.  I guess that most users would expect a visual sort.

- Options might be added to sort over the physical contents of the line
  instead.  And there always is M-x sort-lines RET !).

- Could some parameterisation be added so one could map user written
  functions over (free) option letters?

François

             reply	other threads:[~2013-02-18 19:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 19:36 François Pinard [this message]
2013-02-21  9:59 ` C-c ^ not fully useful Suvayu Ali
2013-02-25  9:28 ` Bastien
2013-02-25  9:35   ` Carsten Dominik
2013-02-25 10:22     ` Bastien
2013-02-25 14:46       ` François Pinard
2013-02-26  9:47         ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86vc9p1kiu.fsf@iro.umontreal.ca \
    --to=pinard@iro.umontreal.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).