Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to force find-tag to first show exact hit?

23 views
Skip to first unread message

Gregor Zattler

unread,
Nov 12, 2012, 12:54:53 PM11/12/12
to help-gnu-emacs
Dear Emacs-users,

if I do find-tag for e.g. `when' the first hit is
`quack-when-xemacs', the second `quack-when-gnuemacs', the third
`magit-commit-all-when-nothing-staged' ... and only the fourth
hit is `when' in subr.el.

Is there a way to force find-tag to first show an exact hit?


Ciao, Gregor
--
-... --- .-. . -.. ..--.. ...-.-

Jambunathan K

unread,
Nov 12, 2012, 9:11:44 PM11/12/12
to help-gnu-emacs
Gregor Zattler <tele...@gmx.net> writes:

> Dear Emacs-users,
>
> if I do find-tag for e.g. `when' the first hit is
> `quack-when-xemacs', the second `quack-when-gnuemacs', the third
> `magit-commit-all-when-nothing-staged' ... and only the fourth
> hit is `when' in subr.el.
>
> Is there a way to force find-tag to first show an exact hit?

As long as your are in .el file, hit C-h f and C-h v while on a
function/variable and follow the link to the file from within the Help
buffer.

Or you can add the following to your .emacs,

(find-function-setup-keys)

Then you can do `C-x F' to find a function, `C-x V' to find a variable
or `C-x K' (for eg, C-x K C-x C-f) will jump directly to the command
bound to that particular key sequence.

There are other usefuly binding as below,

,----
| (defun find-function-setup-keys ()
| "Define some key bindings for the find-function family of functions."
| (define-key ctl-x-map "F" 'find-function)
| (define-key ctl-x-4-map "F" 'find-function-other-window)
| (define-key ctl-x-5-map "F" 'find-function-other-frame)
| (define-key ctl-x-map "K" 'find-function-on-key)
| (define-key ctl-x-map "V" 'find-variable)
| (define-key ctl-x-4-map "V" 'find-variable-other-window)
| (define-key ctl-x-5-map "V" 'find-variable-other-frame))
`----

> Ciao, Gregor

--

Gregor Zattler

unread,
Nov 13, 2012, 4:12:20 PM11/13/12
to Jambunathan K
Hi Jambunathan, Emacs users,
* Jambunathan K <kjambu...@gmail.com> [13. Nov. 2012]:
> Gregor Zattler <tele...@gmx.net> writes:
>> if I do find-tag for e.g. `when' the first hit is
>> `quack-when-xemacs', the second `quack-when-gnuemacs', the third
>> `magit-commit-all-when-nothing-staged' ... and only the fourth
>> hit is `when' in subr.el.
>>
>> Is there a way to force find-tag to first show an exact hit?
>
> As long as your are in .el file, hit C-h f and C-h v while on a
> function/variable and follow the link to the file from within the Help
> buffer.
>
> Or you can add the following to your .emacs,
>
> (find-function-setup-keys)

Great, that's it, especially C-x 4 F.

Thanks a bundle, Gregor


> Then you can do `C-x F' to find a function, `C-x V' to find a variable
> or `C-x K' (for eg, C-x K C-x C-f) will jump directly to the command
> bound to that particular key sequence.
>
> There are other usefuly binding as below,
>
> ,----
> | (defun find-function-setup-keys ()
> | "Define some key bindings for the find-function family of functions."
> | (define-key ctl-x-map "F" 'find-function)
> | (define-key ctl-x-4-map "F" 'find-function-other-window)
> | (define-key ctl-x-5-map "F" 'find-function-other-frame)
> | (define-key ctl-x-map "K" 'find-function-on-key)
> | (define-key ctl-x-map "V" 'find-variable)
> | (define-key ctl-x-4-map "V" 'find-variable-other-window)
> | (define-key ctl-x-5-map "V" 'find-variable-other-frame))
> `----
>
>> Ciao, Gregor
>

0 new messages