From mboxrd@z Thu Jan 1 00:00:00 1970 From: brian powell Subject: Re: org-mode without stars Date: Wed, 26 Jan 2011 14:27:47 -0500 Message-ID: References: <20110123032132.GM25446@bshanks.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1452052985==" Return-path: Received: from [140.186.70.92] (port=49849 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiB23-0007M4-HZ for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 14:27:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiB1y-0008Dr-6z for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 14:27:55 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:63841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiB1x-0008Cn-Of for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 14:27:50 -0500 Received: by wyj26 with SMTP id 26so1372356wyj.0 for ; Wed, 26 Jan 2011 11:27:48 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: Bayle Shanks , emacs-orgmode@gnu.org --===============1452052985== Content-Type: multipart/alternative; boundary=0016368331faf6471d049ac4d327 --0016368331faf6471d049ac4d327 Content-Type: text/plain; charset=ISO-8859-1 The original "outline-mode" in EMACS which predates "org-mode" used stars. Using stars "*" is the best way to do it; the reasons are many--OrgMode files are flat text files and this is great too--but keep this in mind here--think about searches, etc. PYTHON uses indentation (and thats great); LISP silly/wonderful parens, etc.--for EMACS use stars! They look great! They are the best thing to use here: Stars "*" are also used as the symbol for "regular-expressions"--based on neurology/neurons/dendrites/trees/outline-trees/etc. and the "Kleene Closure" (i.e. the mathematician Kleene)--the study of neurology and regular-expressions and the stars "*" are intertwined--the history dates at least back to the 1930s--and LISP/lambda calculus/Alonso Church/Kleene--the 1950s. A star "*" @is@ a "Kleene Closure"--math. A star "*" is easily recognized as a symbol for a note: From http://Wiktionary.com: " "*"== "Used at the beginning of a footnote , especially if it is the only one on the page, and after a word, phrase, or sentence that this ..." "So, why should I care"!? (you might have been thinking) Well, howsabout this: Say you are searching for a string and/or regular expression in a flat text file--you wouldn't search for "*"--you would usually be search for a string (maybe an indentation level of stars "*") using EMACS--which is by the way the fastest way to find such things --if you are typing in real-time--emacs will highlight a search as you type it--this function is very fast--Suggest you try these 2 examples: Cs blah-search-string "***"--and maybe Mx search-for-regexp "***"---they have different uses/meanings--when searching in EMACS) since emacs is the fastest regular expression engine (for 1st-character(s)-recoginition (the engine is optimized for this) so for this case/this type of search there is @nothing faster@ (BTW check out QEMACS if you're working with a huge/gigabyte size files--its fun to edit huge files with QEMACS--written by the same guy that calculated PI with a desktop computer--to the longest # he also wrote QEMU (Fabrice Bellard: http://bellard.org) for this type of regular-expression search (many other engines are faster and use different algorithms--for the purposes they were built for--and so they should be used then--each regexp engine seems to have a niche.) Use EMACS OrgMode and use stars "*", they really are the best for this case; my brain is overheating thinking of the many good reasons. But, "How do they look when you print them out!?", etc.; well, I suggest you tailor that with PERL, thats what I use--I quickly change doc formats to TeX--TeX is the only thing that @really@ looks pretty! Please "leave well enough alone"! That said, I hope you do whatever you want and don't listen to me or anyone else on such matters--EMACS is infinitely extensible, have fun! ;-) On Wed, Jan 26, 2011 at 11:57 AM, Samuel Wales wrote: > Hi Bayle, > > On 2011-01-22, Bayle Shanks wrote: > > get new laptop > > > > organize interstellar dust meeting > > book the meeting room > > organize LOC > > Invited speakers > > - Draine > > - Tielens > > - Hollenbach > > 1st announcement > > > > fix the bell in the hall > > I indent by spaces by 2 a lot to save typing. c-c - and c-c * will > convert. They do not handle indentation, but that might be a very > useful feature (I would use it too). > > This does handle indentation. I wrote it a very long time ago for a > different, 8-space indentation. > > (defun alpha-orgify () > "quick hack. create org format from my indented outline > format, which consists of 8-space indentation. operate on the > region. assume a certain number of stars and odd levels." > (interactive) > (let ((b (region-beginning)) > (e (region-end)) > ;;manually mod for now. headline vs. bullet. > (bulletp nil)) > (loop > while > (progn > (save-excursion > ;;use (re-)search-forward and replace-match when no query? i'd > ;;prefer without the pattern (i.e. just ^) but you might be > ;;re-orgifying an already-orgified region. btw match-string is > ;;how you get the string. > (perform-replace "^\\([^*]\\)" > (if bulletp > " \\1" > "*** \\1") > t ;interactive > t nil nil nil > b > e)) > (save-excursion > (perform-replace " " > (if bulletp > " " > "**") > t ;interactive > t nil nil nil > b > e)) > (when bulletp > (progn > ;;how to make it greedy? > (perform-replace "^\\( +\\)\\([^ ]\\)" "\\1- \\2" > t ;interactive > t nil nil nil))))))) > > Samuel > > -- > The Kafka Pandemic: > > http://thekafkapandemic.blogspot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html > I support the Whittemore-Peterson Institute (WPI) > === > I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV > paper. > > _______________________________________________ > 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 > --0016368331faf6471d049ac4d327 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The original "outline-mode" in EMACS which predates "org-mod= e" used stars.

Using stars "*" is the bes= t way to do it; the reasons are many--OrgMode files are flat text files and= this is great too--but keep this in mind here--think about searches, etc.<= /div>

PYTHON uses indentation (and thats great); LISP silly/w= onderful parens, etc.--for EMACS use stars! =A0They look great! =A0They are= the best thing to use here:

Stars "*" a= re also used as the symbol for "regular-expressions"--based on ne= urology/neurons/dendrites/trees/outline-trees/etc. and the "Kleene Clo= sure" (i.e. the mathematician Kleene)--the study of neurology and regu= lar-expressions and the stars "*" are intertwined--the history da= tes at least back to the 1930s--and LISP/lambda calculus/Alonso Church/Klee= ne--the 1950s. =A0

A star "*" @is@ a "Kleene Closure"-= -math.

A star "*" is easily recognized a= s a symbol for a note: From http://Wiktio= nary.com: " =A0"*"=3D=3D "Used at the beginning of = a footnote , especially if it is the only one on the page, and after a word= , phrase, or sentence that this ..."

"So, why should I care"!? (you might have bee= n thinking)

Well, howsabout this: Say you are sear= ching for a string and/or regular expression in a flat text file--you would= n't search for "*"--you would usually be search for a string = (maybe an indentation level of stars "*") using EMACS--which is b= y the way the fastest way to find such things --if you are typing in real-t= ime--emacs will highlight a search as you type it--this function is very fa= st--Suggest you try these 2 examples: Cs blah-search-string "***"= --and maybe Mx search-for-regexp "***"---they have different uses= /meanings--when searching in EMACS) since emacs is the fastest regular expr= ession engine (for 1st-character(s)-recoginition (the engine is optimized f= or this) so for this case/this type of search there is @nothing faster@ (BT= W check out QEMACS if you're working with a huge/gigabyte size files--i= ts fun to edit huge files with QEMACS--written by the same guy that calcula= ted PI with a desktop computer--to the longest # he also wrote QEMU (Fabric= e Bellard:=A0http://bellard.org) for thi= s type of regular-expression search (many other engines are faster and use = different algorithms--for the purposes they were built for--and so they sho= uld be used then--each regexp engine seems to have a niche.)

Use EMACS OrgMode and use stars "*", they rea= lly are the best for this case; my brain is overheating thinking of the man= y good reasons. =A0But, "How do they look when you print them out!?&qu= ot;, etc.; well, I suggest you tailor that with PERL, thats what I use--I q= uickly change doc formats to TeX--TeX is the only thing that @really@ looks= pretty!

Please "leave well enough alone"! That said, = I hope you do whatever you want and don't listen to me or anyone else o= n such matters--EMACS is infinitely extensible, have fun!

;-)

On Wed, = Jan 26, 2011 at 11:57 AM, Samuel Wales <samologist@gmail.com> wrote:
Hi Bayle,

On 2011-01-22, Bayle Shanks <bshan= ks3@gmail.com> wrote:
> get new laptop
>
> organize interstellar dust meeting
> =A0book the meeting room
> =A0organize LOC
> =A0Invited speakers
> =A0 - Draine
> =A0 - Tielens
> =A0 - Hollenbach
> =A01st announcement
>
> fix the bell in the hall

I indent by spaces by 2 a lot to save typing. =A0c-c - and c-c * will=
convert. =A0They do not handle indentation, but that might be a very
useful feature (I would use it too).

This does handle indentation. =A0I wrote it a very long time ago for a
different, 8-space indentation.

(defun alpha-orgify ()
=A0"quick hack. =A0create org format from my indented outline
format, which consists of 8-space indentation. =A0operate on the
region. =A0assume a certain number of stars and odd levels."
=A0(interactive)
=A0(let ((b (region-beginning))
=A0 =A0 =A0 =A0(e (region-end))
=A0 =A0 =A0 =A0;;manually mod for now. =A0headline vs. bullet.
=A0 =A0 =A0 =A0(bulletp nil))
=A0 =A0(loop
=A0 =A0 =A0 while
=A0 =A0 =A0 =A0 (progn
=A0 =A0 =A0 =A0 =A0 (save-excursion
=A0 =A0 =A0 =A0 =A0 =A0 ;;use (re-)search-forward and replace-match when n= o query? =A0i'd
=A0 =A0 =A0 =A0 =A0 =A0 ;;prefer without the pattern (i.e. just ^) but you= might be
=A0 =A0 =A0 =A0 =A0 =A0 ;;re-orgifying an already-orgified region. =A0btw = match-string is
=A0 =A0 =A0 =A0 =A0 =A0 ;;how you get the string.
=A0 =A0 =A0 =A0 =A0 =A0 (perform-replace "^\\([^*]\\)"
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if bulletp
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0" = =A0\\1"
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"*** \= \1")
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0t =A0 =A0 =A0 = =A0 ;interactive
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0t nil nil nil =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0b
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0e))
=A0 =A0 =A0 =A0 =A0 (save-excursion
=A0 =A0 =A0 =A0 =A0 =A0 (perform-replace " =A0 =A0 =A0 =A0"
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if bulletp
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0" = =A0"
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"**&qu= ot;)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0t =A0 =A0 =A0 = =A0 ;interactive
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0t nil nil nil =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0b
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0e))
=A0 =A0 =A0 =A0 =A0 (when bulletp
=A0 =A0 =A0 =A0 =A0 =A0 (progn
=A0 =A0 =A0 =A0 =A0 =A0 =A0 ;;how to make it greedy?
=A0 =A0 =A0 =A0 =A0 =A0 =A0 (perform-replace "^\\( +\\)\\([^ ]\\)&quo= t; "\\1- \\2"
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0t =A0 =A0 = =A0 =A0 ;interactive
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0t nil nil n= il)))))))

Samuel

--
The Kafka Pandemic:
http://thekafkapandemic.blog= spot.com/2010/12/welcome-to-kafka-pandemic-two-forces_9182.html
I support the Whittemore-Peterson Institute (WPI)
=3D=3D=3D
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV pa= per.

_______________________________________________
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

--0016368331faf6471d049ac4d327-- --===============1452052985== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1452052985==--