[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improved help from minibuffer prompts
From: |
Stefan Reichör |
Subject: |
Re: Improved help from minibuffer prompts |
Date: |
Thu, 15 Apr 2004 07:50:14 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (berkeley-unix) |
Hi Richard!
> In my mode the user is often asked some questions in the
> minibuffer. Sometimes the questions need some more
> explanations. So I decided to put the needed help in the
> function's docstring.
>
> You didn't say which function you mean, but according to the code
> it looks like the entire doc string of the command that invoked
> the minibuffer is the help string you use. I don't think
> that will be very natural.
I think it is convenient. Every interactive function has already a
docstring.
When I type M-x grep and get a prompt and I am not sure, what I am
asked here, I can just get the help for the function grep.
> It would be more natural to have a variable which, if non-nil, has
> extra help for the current minibuffer question. The caller would bind
> that variable. What do you think of that?
That is also a nice idea. I think we should use that AND we should
have a fallback solution for the docstring.
> Better: the caller binds minibuffer-extra-help to the string
> it should use. All entry to the minibuffer binds
> minibuffer-current-extra-help to minibuffer-extra-help,
> and binds minibuffer-extra-help to nil. This way, a recursive
> use of the minibuffer will not mistakenly use a string
> meant for the outer minibuffer level.
Not sure, if I understand that.
Consider the following function:
(defun my-defun (name)
"Just enter a funny name."
(interactive "sEnter a name: ")
(message (concat "The name entered was: " name)))
Now I hit:
M-x my-defun and get the prompt "Enter a name: "
Now I hit f1 (or whatever keybinding we choose) and get the following help:
Help for my-defun:
Just enter a funny name.
Where can I bind minibuffer-extra-help?
I tried the following:
(defun my-defun (name)
"Just enter a funny name."
(let ((minibuffer-extra-help "Just enter a funny name."))
(interactive "sEnter a name: ")
(message (concat "The name entered was: " name))))
(defun my-defun (name)
"Just enter a funny name."
(interactive "sEnter a name: ")
(let ((minibuffer-extra-help "Just enter a funny name."))
(message (concat "The name entered was: " name))))
That did not work.
Any ideas?
--
Stefan.
Re: Improved help from minibuffer prompts, Masatake YAMATO, 2004/04/13
Re: Improved help from minibuffer prompts, Richard Stallman, 2004/04/14
Re: Improved help from minibuffer prompts, Richard Stallman, 2004/04/14
- Re: Improved help from minibuffer prompts,
Stefan Reichör <=
- Re: Improved help from minibuffer prompts, Richard Stallman, 2004/04/16
- Re: Improved help from minibuffer prompts, Kim F. Storm, 2004/04/16
- Re: Improved help from minibuffer prompts, Richard Stallman, 2004/04/17
- Re: Improved help from minibuffer prompts, Stefan Reichör, 2004/04/19
- Re: Improved help from minibuffer prompts, Kim F. Storm, 2004/04/19
- Re: Improved help from minibuffer prompts, Juanma Barranquero, 2004/04/29
- Re: Improved help from minibuffer prompts, Stefan Reichör, 2004/04/30
- Re: Improved help from minibuffer prompts, Juanma Barranquero, 2004/04/30
- Re: Improved help from minibuffer prompts, Kim F. Storm, 2004/04/30
- Re: Improved help from minibuffer prompts, Juanma Barranquero, 2004/04/30