emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-sort-multi??
@ 2010-01-28 22:49 David A. Gershman
  2010-01-29  9:23 ` org-sort-multi?? Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: David A. Gershman @ 2010-01-28 22:49 UTC (permalink / raw)
  To: Org-Mode List


Hello Again,

I'm looking to sort my outline (headlines, top level) by multi criteria
(2 really).  I see online references to 'org-sort-multi' as recently as
August 2009.  But my emacs can't find it. 

Help?

----------------------------------------
David A. Gershman
gershman@dagertech.net
http://dagertech.net/gershman/
"It's all about the path!" --d. gershman

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-sort-multi??
  2010-01-28 22:49 org-sort-multi?? David A. Gershman
@ 2010-01-29  9:23 ` Carsten Dominik
  2010-01-29 16:51   ` org-sort-multi?? Ryan Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2010-01-29  9:23 UTC (permalink / raw)
  To: David A. Gershman; +Cc: Org-Mode List

Hi David,

org-sort-multi is a utility function written by Ryan Thompson.
So far it has not made it into Org-mode.  I seem to
remember that I did not have a convenient interactive
interface for it, but I am not sure if I remember correctly.

Another issue is that I am not sure if Ryan has signed the
papers with the FSF, which would be required for this
non-trivial change to Org.

Why don't you take Ryan's function and play with it, check
if it works for you, and if yes, try to convince me
to add it to Org-mode..?

Ryan, would you be willing to sign the papers with the FSF?
Did I ask you that before?

- Carsten


On Jan 28, 2010, at 11:49 PM, David A. Gershman wrote:

>
> Hello Again,
>
> I'm looking to sort my outline (headlines, top level) by multi  
> criteria
> (2 really).  I see online references to 'org-sort-multi' as recently  
> as
> August 2009.  But my emacs can't find it.
>
> Help?
>
> ----------------------------------------
> David A. Gershman
> gershman@dagertech.net
> http://dagertech.net/gershman/
> "It's all about the path!" --d. gershman
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-sort-multi??
  2010-01-29  9:23 ` org-sort-multi?? Carsten Dominik
@ 2010-01-29 16:51   ` Ryan Thompson
  0 siblings, 0 replies; 3+ messages in thread
From: Ryan Thompson @ 2010-01-29 16:51 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Org-Mode List, David A. Gershman


[-- Attachment #1.1: Type: text/plain, Size: 2819 bytes --]

Hi.

Anyone can freely use any code I post here for any purpose, unless I
specifically say otherwise for a particular piece of code (I can't think of
any reason why  would do this, though).

I've included the code for org-sort-multi below. Carsten is correct, it is
not an interactive function. In fact, it isn't really meant to be used
directly at all in its current form. I use it for defining specific custom
sort functions, of which I have also given an example below.

(defun org-sort-multi (&rest sort-types)
  "Sort successively by a list of criteria.
For example, sort first by TODO status, then by priority, then by date, then
alphabetically, case-sensitive.
Each criterion is either a character or a cons pair (BOOL . CHAR), where
BOOL is whether or not to sort case-sensitively, and CHAR is one of the
characters defined in ``org-sort-entries-or-items''.
So, the example above could be accomplished with:
 (org-sort-multi ?o ?p ?t (t . ?a))"
  (mapc #'(lambda (sort-type)
            (org-sort-entries-or-items
             (car-safe sort-type)
             (or (cdr-safe sort-type) sort-type)))
        (reverse sort-types)))

(defun org-sort-custom ()
  "Sort children of node by todo status and by priority, so the * TODO [#A]
items go to the top. Then fold it the way I like it."
  (interactive)
  (org-sort-multi ?o ?p ?T)
  (dotimes (x 2) (org-cycle)))


On Fri, Jan 29, 2010 at 1:23 AM, Carsten Dominik
<carsten.dominik@gmail.com>wrote:

> Hi David,
>
> org-sort-multi is a utility function written by Ryan Thompson.
> So far it has not made it into Org-mode.  I seem to
> remember that I did not have a convenient interactive
> interface for it, but I am not sure if I remember correctly.
>
> Another issue is that I am not sure if Ryan has signed the
> papers with the FSF, which would be required for this
> non-trivial change to Org.
>
> Why don't you take Ryan's function and play with it, check
> if it works for you, and if yes, try to convince me
> to add it to Org-mode..?
>
> Ryan, would you be willing to sign the papers with the FSF?
> Did I ask you that before?
>
> - Carsten
>
>
>
> On Jan 28, 2010, at 11:49 PM, David A. Gershman wrote:
>
>
>> Hello Again,
>>
>> I'm looking to sort my outline (headlines, top level) by multi criteria
>> (2 really).  I see online references to 'org-sort-multi' as recently as
>> August 2009.  But my emacs can't find it.
>>
>> Help?
>>
>> ----------------------------------------
>> David A. Gershman
>> gershman@dagertech.net
>> http://dagertech.net/gershman/
>> "It's all about the path!" --d. gershman
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
> - Carsten
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 3881 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-29 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-28 22:49 org-sort-multi?? David A. Gershman
2010-01-29  9:23 ` org-sort-multi?? Carsten Dominik
2010-01-29 16:51   ` org-sort-multi?? Ryan Thompson

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).