From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Re: C-c ^ for plain lists? Why not? Date: Fri, 28 Dec 2012 03:27:00 +0000 (UTC) Message-ID: References: <87626l6n6e.wl%jamshark70@dewdrop-world.net> <87pq4srfc6.fsf@gmail.com> <540B116A-148E-46E5-94EA-5965B206613B@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToQbX-0005dJ-AI for emacs-orgmode@gnu.org; Thu, 27 Dec 2012 22:27:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ToQbQ-00059m-M2 for emacs-orgmode@gnu.org; Thu, 27 Dec 2012 22:27:27 -0500 Received: from plane.gmane.org ([80.91.229.3]:35401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToQbQ-00059V-F7 for emacs-orgmode@gnu.org; Thu, 27 Dec 2012 22:27:20 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ToQbc-0004T3-JV for emacs-orgmode@gnu.org; Fri, 28 Dec 2012 04:27:32 +0100 Received: from 113.109.207.110 ([113.109.207.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Dec 2012 04:27:32 +0100 Received: from jamshark70 by 113.109.207.110 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Dec 2012 04:27:32 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik gmail.com> writes: > Playing with this idea I noticed that the sorting function > did not accept their additional arguments like sorting-key > and get key-function in they way they should. So I patched > them, to make the following work in the current master: > > (defun org-sort-list-by-checkbox-type () > "Sort list items according to Checkbox state." > (interactive) > (org-sort-list > nil ?f > (lambda () > (if (looking-at org-list-full-item-re) > (cdr (assoc (match-string 3) > '(("[X]" . 1) ("[-]" . 2) ("[ ]" . 3) (nil . 4)))) > 4)))) I finally had a chance to play with this -- works nicely, except I managed to get emacs into an infinite loop this way: 1. C-c ^ f org-sort-list-by-checkbox-type 2. This puts the done items at the top, which I didn't want, so... C-c ^ F org- sort-list-by-checkbox-type. 3. Emacs goes into a tailspin (recovered by C-g). > I would think that > > checked - transitionary - unchecked - no box > > is a pretty decent default. I disagree. I'd suggest unchecked - transitionary - checked - no box. It makes more sense to pull the not-done items to the top, no? But it's easy to modify the function for my environment. Thanks!! hjh