Lisp help messages in echo area

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Lisp help messages in echo area

John Ankarström
Hello all,

I have a really simple question: what function triggers the Emacs
Lisp help messages in the echo area?

For example, when I put my cursor inside a (defun) expression,
the following displays in the echo area:

--8<---------------cut here---------------start------------->8---
defun: (NAME ARGLIST &optional DOCSTRING DECL &rest BODY)
--8<---------------cut here---------------end--------------->8---

This appears to trigger when moving the cursor, but also when
inserting a character. These are two good clues, but I haven't
been able to find it. I haven't yet looked in the Emacs C source
code -- I send this e-mail message hoping that somebody knows the
answer, before I have to get into the C source.

I'm asking because I'd like to fix the function
`outshine-self-insert-command' from the `outshine' package, which
doesn't trigger the Lisp help message, unlike the default
`self-insert-command'.

If anybody knows the answer, or has any pointers as to where I
should look, I'd be greatful.

Thanks,

- John

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lisp help messages in echo area

Kaushal Modi
On Sun, Jul 16, 2017, 2:25 PM John Ankarström <[hidden email]> wrote:

> Hello all,
>
> I have a really simple question: what function triggers the Emacs
> Lisp help messages in the echo area?
>
> For example, when I put my cursor inside a (defun) expression,
> the following displays in the echo area:
>
> --8<---------------cut here---------------start------------->8---
> defun: (NAME ARGLIST &optional DOCSTRING DECL &rest BODY)
> --8<---------------cut here---------------end--------------->8---
>

That's eldoc-mode.

I'm asking because I'd like to fix the function
> `outshine-self-insert-command' from the `outshine' package, which
> doesn't trigger the Lisp help message, unlike the default
> `self-insert-command'.
>
> If anybody knows the answer, or has any pointers as to where I
> should look, I'd be greatful.
>

Yeah that's annoying. Thankfully this fixes it:

(with-eval-after-load 'eldoc
  (eldoc-add-command 'outshine-self-insert-command))

> --

Kaushal Modi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lisp help messages in echo area

John Ankarström
Kaushal Modi <[hidden email]> writes:

> That's eldoc-mode.

Oh, so that's what eldoc-mode is! Heard of it before, but never
realized that was it.

> Yeah that's annoying. Thankfully this fixes it:
>
> (with-eval-after-load 'eldoc
>   (eldoc-add-command 'outshine-self-insert-command))

Thank you so much! It works perfectly. I'm going to send a pull
request to the maintainer of outshine.

- John

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lisp help messages in echo area

Kaushal Modi
On Sun, Jul 16, 2017, 3:02 PM John Ankarström <[hidden email]> wrote:

> Kaushal Modi <[hidden email]> writes:
>
> > That's eldoc-mode.
>
> Oh, so that's what eldoc-mode is! Heard of it before, but never
> realized that was it.


Yes, it is one of the really well-designed minor modes. It blends so well
into the major mode, that it doesn't feel like a minor mode :)

> Yeah that's annoying. Thankfully this fixes it:
> >
> > (with-eval-after-load 'eldoc
> >   (eldoc-add-command 'outshine-self-insert-command))
>
> Thank you so much! It works perfectly. I'm going to send a pull
> request to the maintainer of outshine.
>

Great! That's a very good idea.

> --

Kaushal Modi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lisp help messages in echo area

Emanuel Berg-4
In reply to this post by John Ankarström
John Ankarström wrote:

> defun: (NAME ARGLIST &optional DOCSTRING DECL
> &rest BODY)

Knowing the interfaces of/to each component
(e.g., a function) is the key to all
programming and actually all *activity*.
Having immediate access to it is the one
advantage that will rule supreme.

Many people think programming makes you
practically inept - just staring at unworldly
code all night long...?! This might hold true
if you *only* do programming - such
one-dimensionalness is of course harmful
whatever field. But do programming *and*
something else as well - trust me, this soon
makes you better at doing "something else" than
the people who do that all day every day! (Or
at least just as good with much less effort.)

For example, go to your tool box and pick up
a combination spanner/wrench and a
combination plier. "Examine" those tools, in
the Shadowgate/Déjà Vu lingo, and identify
their properties and interfaces as would
a programmer.

Then, have the very pleasant realization that
having mastered programming - that is, the
craft, not every detail which would be
impossible - having mastered programming,
everything else is child's play :)

--
underground experts united
http://user.it.uu.se/~embe8573


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lisp help messages in echo area

Kaushal Modi
In reply to this post by John Ankarström
On Sun, Jul 16, 2017 at 3:02 PM John Ankarström <[hidden email]> wrote:

>
> Thank you so much! It works perfectly. I'm going to send a pull
> request to the maintainer of outshine.
>

Thanks![1]

[1]:
https://github.com/alphapapa/outshine/commit/0fdd0cd619d20e71b3157f225bb117a7e21dc9b3

--

Kaushal Modi
Loading...