help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to alphabetasize sections?


From: Thien-Thi Nguyen
Subject: Re: How to alphabetasize sections?
Date: Mon, 15 Sep 2014 09:27:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

() Emanuel Berg <address@hidden>
() Sat, 13 Sep 2014 21:22:39 +0200

   Yeah? - the entropy is the directories and the files
   and the references in the main file?

Entropy is everywhere.  When it gets too involved w/ the
sorting of \section blocks, the disk drive dies sooner.

   [hypothetical document organization]

I don't see how this relates to the OP's sorting issue.

   > data motion

   Do you mean when the subdivision is done, or in
   compilation?

In this case, data motion of the actual sort is managed by
Emacs, so i have no choice in the matter.  Under my control,
instead, is how to specify the data head and the data body.

In the procedure i sketched, there is a lot of bulk data
motion for that (writing to disk plus revert, all just to
set a buffer-local variable), because it was written for a
possibly non-expert audience.  Personally, i would have:

 (setq ttn "\\section")
 (rotatef ttn paragraph-separate)
 ;; mark region
 ;; M-x sort-paragraphs RET
 (rotatef ttn paragraph-separate)
 (makunbound 'ttn)

which neither sullies the buffer nor touches disk.  (Now,
someone will say "hey ttn, Emacs now has commands to push /
pop buffer-local vars -- check it out!", you just watch!)

   (Why is data motion bad at all by the way?)

It's not good or bad per se.  However, when you have an old
computer, the consequences of too much disk activity becomes
a worry.  Although the OP did not specify the computer's
age, i try to factor-in that worry in my advice anyway,
because computers grow older and people suffer when theirs
dies, universally.  Obviously, here i somewhat failed...

   > and manularity.

   [hypothetical C++ project organization]

The other suggestion is essentially the same as the one i
made, except that there is formfeed (i.e., ā€˜^Lā€™) involved.
That's the kind of manularity i understand but try to avoid.
Luckily Emacs lets us surf at many levels...

[OT: BTW, if anyone wants to donate to me a less than
 ancient computer (and is willing to pay shipping :-D),
 please feel free to contact me off list.]

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]