[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9054: [External] : bug#9054: 24.0.50; show source in other window
From: |
Drew Adams |
Subject: |
bug#9054: [External] : bug#9054: 24.0.50; show source in other window |
Date: |
Wed, 22 Sep 2021 15:17:02 +0000 |
>> I've no special comment on this. In general, in my
>> case if a particular kind of thing under the pointer
>> isn't defined then the menu item is inactive for
>> that thing kind.
>
> With context menus we have to find a compromise: Searching manuals or
> the code base at the time of displaying the menu might take too long.
Sorry, I don't understand. I probably can't help you
with what you're trying to do. I don't know what
searching you're talking about.
All I do is check whether there is such a thing-at-point.
If not, I don't enable the menu item for acting on that
kind of thing-at-point.
When I say "thing-at-point" here, a given test could use
the thingatpt.el code (or similar), or it could use other
code, such as ffap tests. E.g., for a file or dir I use
this (wrapped in `ignore-errors'):
(defun mouse3-file-or-dir ()
"Return file or dir name at point. Raise error if none."
(let ((guess (ffap-guesser)))
(unless (and guess
(or (ffap-file-remote-p guess)
(file-directory-p
(abbreviate-file-name
(expand-file-name guess)))
(file-regular-p guess)))
(error "No file or dir name under mouse pointer"))
guess))
For Describe Function I use this for :enable:
(or (fboundp (symbol-at-point)) (function-called-at-point))
For Show Code Defining Function I use this:
(function-called-at-point)
And so on. Are you worried that such :enable tests
"search manuals or the code base"? I don't see how
they do. But in any case, I don't see any delay in
displaying the menu.
> > Whether, for a name such as `x' you want to try to
> > look it up as a variable and a function etc. and
> > then activate relevant items, do so. I'm not sure
> > it's worth such lookups, and of course there's the
> > question of which context/environment to look up
> > such things in.
>
> If I evaluate (setq x 3) and then I'm told that x was "Probably
> introduced at or before Emacs version 1.4" something went wrong.
Sorry, I don't follow you. It doesn't matter whether
I do. Do whatever you intend to do. I just wanted
to share what I do, in case it helps.
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, (continued)
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Drew Adams, 2021/09/18
- bug#9054: 24.0.50; show source in other window, Juri Linkov, 2021/09/19
- bug#9054: 24.0.50; show source in other window, Eli Zaretskii, 2021/09/19
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Drew Adams, 2021/09/19
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Eli Zaretskii, 2021/09/19
- bug#9054: 24.0.50; show source in other window, martin rudalics, 2021/09/20
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Drew Adams, 2021/09/20
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, martin rudalics, 2021/09/21
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Drew Adams, 2021/09/21
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, martin rudalics, 2021/09/22
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window,
Drew Adams <=
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, martin rudalics, 2021/09/22
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Drew Adams, 2021/09/22
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Eli Zaretskii, 2021/09/22
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Drew Adams, 2021/09/22
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Eli Zaretskii, 2021/09/22
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Drew Adams, 2021/09/22
- bug#9054: [External] : bug#9054: 24.0.50; show source in other window, Eli Zaretskii, 2021/09/22
- bug#9054: 24.0.50; show source in other window, martin rudalics, 2021/09/20
- bug#9054: 24.0.50; show source in other window, Juri Linkov, 2021/09/20
- bug#9054: 24.0.50; show source in other window, martin rudalics, 2021/09/21