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

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

Re: conditional text insertion


From: Lister Account
Subject: Re: conditional text insertion
Date: Tue, 19 Jul 2011 10:40:06 -0700

It's funny you should say that.  I made a note to myself this morning: 

"Learn how to use the help system better"

:)

Your advice is not being taken lightly.

On Tue, Jul 19, 2011 at 7:02 AM, Memnon Anon <address@hidden> wrote:
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]