all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Minor bug in help+ libraries
@ 2011-09-07 10:12 suvayu ali
  2011-09-07 13:48 ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: suvayu ali @ 2011-09-07 10:12 UTC (permalink / raw)
  To: Emacs mailing list

Hi,

I think I found a small bug in the help+ libraries. When in a lisp
buffer the point is on a variable or function, hitting C-h f or C-h v
doesn't show the default choice is the function/variable at point.
However hitting RET without entering any text takes you to the correct
documentation.

I hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Minor bug in help+ libraries
  2011-09-07 10:12 Minor bug in help+ libraries suvayu ali
@ 2011-09-07 13:48 ` Drew Adams
  2011-09-08  8:57   ` suvayu ali
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2011-09-07 13:48 UTC (permalink / raw)
  To: 'suvayu ali', 'Emacs mailing list'

> I think I found a small bug in the help+ libraries. When in a lisp
> buffer the point is on a variable or function, hitting C-h f or C-h v
> doesn't show the default choice is the function/variable at point.
> However hitting RET without entering any text takes you to the correct
> documentation.

Yes, it's actually a feature, not a bug. :-)
Use `M-n' if you need to see the default value.

If you really want to see the default value in the prompt, then do surgery on
the definitions of `describe-function' and `describe-variable', to replace the
prompts in their calls to `completing-read'.  Just compare the `completing-read'
calls in `help-fns.el' (vanilla) and `help-fns+.el':

vanilla (what you like):
(if fn
    (format "Describe function (default %s): " fn)
  "Describe function: ")

+ (what I like):
(if current-prefix-arg
    "Describe command: "
  "Describe function: ")

You would replace each of those prompt strings by a conditional such as the one
in help-fns.el.

---

[FWIW, I use Icicles, which lets the _user_ decide whether to put the default
value in the prompt.  That's one reason I do not hard-code it into prompts.

Option `icicle-default-value':
  nil               - Do not insert default value or add it to prompt.
  t                 - Add default value to prompt.  Do not insert it.
  `insert-start'    - Insert default value and leave cursor at start.
  `insert-end'      - Insert default value and leave cursor at end.
  `preselect-start' - Insert and preselect default value;
                      leave cursor at beginning.
  `preselect-end'   - Insert and preselect default value;
                      leave cursor at end.

The default value is `t', which gives the behavior you like.  Personally, I use
the value `insert-end'.]




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Minor bug in help+ libraries
  2011-09-07 13:48 ` Drew Adams
@ 2011-09-08  8:57   ` suvayu ali
  0 siblings, 0 replies; 3+ messages in thread
From: suvayu ali @ 2011-09-08  8:57 UTC (permalink / raw)
  To: Drew Adams; +Cc: Emacs mailing list

Hi Drew,

On Wed, Sep 7, 2011 at 3:48 PM, Drew Adams <drew.adams@oracle.com> wrote:
> Yes, it's actually a feature, not a bug. :-)
> Use `M-n' if you need to see the default value.

...

>
> [FWIW, I use Icicles, which lets the _user_ decide whether to put the default
> value in the prompt.  That's one reason I do not hard-code it into prompts.

Thank you for explaining the reason. I have been meaning to try
icicles for quite sometime. In the next few days I might. :)

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-08  8:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-07 10:12 Minor bug in help+ libraries suvayu ali
2011-09-07 13:48 ` Drew Adams
2011-09-08  8:57   ` suvayu ali

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.