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

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

Re: conditional text insertion


From: Memnon Anon
Subject: Re: conditional text insertion
Date: Tue, 19 Jul 2011 14:02:04 +0000 (UTC)

Hi Lister,
Lister Account <address@hidden> writes:

> I updated line 3 above because I was getting the error "Wrong Number
> of Arguments".  A little googling led me to the solution.

Google works of course, but it is *really* faster to get used 
to emacs self documenting facilities.

In this case, I used `C-h f' move-end-of-line:

,----
| move-end-of-line is an interactive compiled Lisp function in
| `simple.el'.
| 
| It is bound to C-e, <end>.
| 
| (move-end-of-line ARG)
| 
| For more information check the manuals.
| 
! Move point to end of current line as displayed.
! With argument ARG not nil or 1, move forward ARG - 1 lines first.
| If point reaches the beginning or end of buffer, it stops there.
| 
| To ignore the effects of the `intangible' text or overlay
| property, bind `inhibit-point-motion-hooks' to t.
| If there is an image in the current line, this function
| disregards newlines that are part of the text on which the image
| rests.
`----

So we need an arg, (move-end-of-line nil) should do.

What is the advantage of this approach to google?

a) Faster: Its all there, already. I can type `C-h f' faster
           than my browser starts up.
b) Up to date: There is lots of stuff on the net, but
           believe it or not, emacs changes. The build in 
           documentation is always uptodate, or at least
           up to the date you are using now. 
c) See the source: With a single <ret> on "in `simple.el', you
           get the source of the function. If you want to learn
           elisp, just go and browse ;).

Well, there are other benefits, but those seem to me the most potent
ones. 

hth 
Memnon

P.S: (info "(emacs) Help Summary") <--- C-x C-e here 
     is a good starting point. 




reply via email to

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