[prog] replacement strings

Miriam English mim at miriam-english.org
Thu May 27 08:30:53 UTC 2010

Hi Eeva,

Thanks for the considerable thought and effort you put into your reply. 
I do appreciate it. It might have taken me days to work this out without 
your help.

I installed emacs, and was surprised at the enormity of it -- almost 
60MB for a text editor! (Clearly why it is left out of Puppy Linux -- it 
is more than half the size of Puppy itself!) Anyhow, I ran it, and after 
some initial confusion at the way it loads files (no drag and drop, no 
file locator box) I managed to load an example file. Running through the 
sequence you outlined it worked exactly the way I wanted. Thank you.

Sadly though, I doubt I'll use emacs. I was very surprised at the lack 
of mouse-wheel scrolling (though I did find some 
Options/CustomizeEmacs/environment/editing/mouse settings that let me 
switch that on), the lack of visual scrolling when you attempt to pull 
the scroll-bar down (it only updates the text when the bar is clicked 
left mouse button = down, right mouse button = up), and the lack of 
intelligent word-wrap (the display wraps even in the middle of a word). 
Those things wouldn't matter so much to me when writing a program, but 
when editing books they would quickly become a major headache.

I know too many amazing folk who use emacs constantly to doubt that it 
has terrific capabilities, but I think it would just slowly drive me 
nuts. :) I can't help thinking... almost 60MB and it doesn't have even 
basic things like intelligent word-wrap, line-joining, visual scrollbar 
dragging, and filesystem browser dialog. It feels like a supercharged 
antique from the '80s... which, to be fair, I guess you could say it is.

Thanks for the taste of elisp. I actually rather enjoyed it, and will 
almost certainly dabble with that more in the future.

Best wishes,

	- Miriam

Eeva Järvinen wrote:
> 2010/5/24 Miriam English <mim at miriam-english.org>
>> At the risk of looking stupid again...
>> I've been spending hours trying to find something that does the same thing
>> as TextPad's join command. (I really want to get rid of my need for wine.)
>> It joins highlighted text into single lines, keeping paragraphs distinct.
>> The closest I've been able to find is the fmt command (part of the Gnu
>> coreutils, and should be in most linuxes). Unfortunately that has an upper
>> limit of 2,500 characters in a paragraph, which is unrealistic when trying
>> to reformat some texts, especially old ones where most of a page might be a
>> single paragraph.
>> I have a feeling I might need to write a program to do the job, but that
>> wouldn't be interactive so would have to make automated decisions on whether
>> something should be joined or not based on line length (to leave bits of
>> verse alone). [sigh] I've been spoiled by TextPad and its easy ability to
>> select a range then join every line within the selection while retaining
>> paragraphs.
> This nice bit of elisp does the job of joining one paragraph into a single
> line:
> (defun unfill-paragraph () "Does the opposite of fill-paragraph"
> (interactive) (let ((fill-column (point-max))) (fill-paragraph nil)))
> I pilfered it from
> http://stackoverflow.com/questions/1072662/by-emacs-how-to-join-two-lines-into-one,
> just so that you know.
> If you want to use it in emacs, paste the line into *scratch* buffer, go to
> the end of that line, type C-x, C-e (that's control+x followed by control+e)
> and you're good to test it.  Switch to a buffer that has text, go to a
> paragraph you want to convert into a single line, type Esc, x (M-x in
> emacs-ese), unfill-paragraph and press enter.
> If you like it, paste the snippet of code into your .emacs and perhaps
> define a key for running it.
> HTH,
> Eeva
> _______________________________________________
> Programming mailing list
> Programming at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/programming

If you don't have any failures then you're not trying hard enough.
  - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
Website: http://miriam-english.org
Blog: http://miriam_e.livejournal.com

More information about the Programming mailing list