From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: make sort-paragraph do non-paragraphs; key = numAsterisks Date: 3 Oct 2013 04:14:25 -0400 Organization: PANIX -- Public Access Networks Corp. Message-ID: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1380788159 16050 80.91.229.3 (3 Oct 2013 08:15:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Oct 2013 08:15:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 03 10:15:59 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VRe4l-0000uK-FT for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Oct 2013 10:15:59 +0200 Original-Received: from localhost ([::1]:41308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VRe4k-0002Pt-Ke for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Oct 2013 04:15:58 -0400 Original-Path: usenet.stanford.edu!panix!panix1.panix.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 73 Original-NNTP-Posting-Host: panix1.panix.com Original-X-Trace: reader1.panix.com 1380788065 661 166.84.1.1 (3 Oct 2013 08:14:25 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Thu, 3 Oct 2013 08:14:25 +0000 (UTC) Original-Xref: usenet.stanford.edu gnu.emacs.help:201536 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93806 Archived-At: Maybe 20 years I solved with sort-paragraphs a file todo-tasks like below, each task beginning with a "^\[\]", where the sort-key is a string of asterisks, and if no such string on the left of the pseudo-paragraphs first line, then the sort key is zero or negative infinity or would "bottom" be a proper term for this also? The MORE asterisks that first-line asterisk-string had, the HIGHER the sort-order, with no such asterisk-string giving zero. ------------------- beginning of file or region: [] get gas, plus fill one 5-gal tank. Also put Stabil into the lawnmower [] ** go to store [] **** order books from amazon: book1 ... book2 ... [] wash the dog and the cat too. [] ** email HELLO to John. [] 2oct13: ******* now is the time for all good men [NOTE: if necessary, I could have the possible asterisk-string shifted left, to come after the "[]*" (THAT asterisk meaning, between you and me, 0 or more white-chars)end-NOTE] to come to the aid of their country. ------------------- ending of file or region. This was my idea of CHANGING what sort-paragraph thought a "paragraph" looked like: The body of my pseudo paragraph contained a [] as the first two chars, and included everything up to (not through) the NEXT [] OR the EOB or end of region. What I wanted to do was to pretend that each "[]" (a) ended any prior "paragraph" and was not contained with in it (with option with its trailing "vertical" blankspace was or was not to be eaten away), AND ALSO (b) started a paragraph AND indeed was kept as part of it. I used sort-paragraph rearrange the "paragraphs" of the HIGHEST priority (MOST asterisks) ended up FIRST in the file or region.. I recall I had to fool with paragraph-start and -end, and somehow made it work. But I stupidly didn't save it somewhere I could find it, with my documentation of it. Thanks! David