emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer Stengele <rainer.stengele@online.de>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: sort lists by highest level entries
Date: Wed, 06 Mar 2013 16:56:52 +0100	[thread overview]
Message-ID: <51376744.7020708@online.de> (raw)
In-Reply-To: <87a9qgfrvz.fsf@gmail.com>

Am 06.03.2013 16:51, schrieb Nicolas Goaziou:
> Rainer Stengele <rainer.stengele@online.de> writes:
> 
>> Am 06.03.2013 15:30, schrieb Nicolas Goaziou:
>>> Hello,
>>>
>>> Rainer Stengele <rainer.stengele@online.de> writes:
>>>
>>>> having
>>>>
>>>>       - [2013-01-24 Do] text
>>>>       - [2013-01-25 Fr] text
>>>>       - [2013-02-01 Fr] text
>>>>
>>>
>>> [...]
>>>
>>>
>>>> I would like to sort the highest level entries, alphabetically would do
>>>> in this case, ending up with
>>>>
>>>>       - [2013-02-01 Fr] text
>>>>       - [2013-01-25 Fr] text
>>>>       - [2013-01-24 Do] text
>>>>
>>>
>>> [...]
>>>
>>>> org-sort and org-sort-entries does not what I want.
>>>> Did I miss something obvious?
>>>
>>> You mean alphabetically, but in reverse order: C-c ^ A
>>>
>>>
>>> Regards,
>>>
>>
>> I mark the region and do tried. I get "Nothing to sort".
>> There are no headlines in that region.
> 
> You want to sort a list.  Point should be on one of its items when
> calling the command.
> 
> 
> Regards,
> 

Awesome!

That did it. Thanks Nicolas.
I reread the manual:

C-c ^     (org-sort)
    Sort same-level entries. When there is an active region, all entries
in the region will be sorted. Otherwise the children of the current
headline are sorted. The command prompts for the sorting method, which
can be alphabetically, numerically, by time (first timestamp with active
preferred, creation time, scheduled time, deadline time), by priority,
by TODO keyword (in the sequence the keywords have been defined in the
setup) or by the value of a property. Reverse sorting is possible as
well. You can also supply your own function to extract the sorting key.
With a C-u prefix, sorting will be case-sensitive.

I cannot find the hint to have to be on a list item. It looked more
promising to mark the region.

How can I begin to help work on the documentation?

Rainer

  reply	other threads:[~2013-03-06 15:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 14:19 sort lists by highest level entries Rainer Stengele
2013-03-06 14:30 ` Nicolas Goaziou
2013-03-06 15:30   ` Rainer Stengele
2013-03-06 15:51     ` Nicolas Goaziou
2013-03-06 15:56       ` Rainer Stengele [this message]
2013-03-06 16:05         ` Nicolas Goaziou

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=51376744.7020708@online.de \
    --to=rainer.stengele@online.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).