unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: martin rudalics <rudalics@gmx.at>, Eli Zaretskii <eliz@gnu.org>,
	Juri Linkov <juri@linkov.net>
Cc: "larsi@gnus.org" <larsi@gnus.org>,
	"9054@debbugs.gnu.org" <9054@debbugs.gnu.org>
Subject: bug#9054: [External] : bug#9054: 24.0.50; show source in other window
Date: Wed, 22 Sep 2021 15:17:02 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488691CE5C18E753D7A816DF3A29@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <6b6f17bd-c48c-e2e3-d4ad-900002da10cf@gmx.at>

>> 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.

  reply	other threads:[~2021-09-22 15:17 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-11 18:31 bug#9054: 24.0.50; show source in other window Florian Beck
2011-07-12  8:21 ` martin rudalics
2011-08-31 16:52   ` Juri Linkov
2011-09-01  0:26     ` martin rudalics
2021-09-07 18:12 ` Lars Ingebrigtsen
2021-09-07 19:11   ` martin rudalics
2021-09-07 19:17     ` Lars Ingebrigtsen
2021-09-08  8:29       ` martin rudalics
2021-09-08 10:30         ` Lars Ingebrigtsen
2021-09-09  8:34           ` martin rudalics
2021-09-09 13:13             ` Lars Ingebrigtsen
2021-09-10  8:34               ` martin rudalics
2021-09-22 21:20           ` Arthur Miller
2021-09-23  8:16             ` martin rudalics
2021-09-23 12:52               ` Arthur Miller
2021-09-26  9:10                 ` martin rudalics
2021-09-26 14:04                   ` Arthur Miller
2021-09-09 17:20   ` Juri Linkov
2021-09-10 10:21     ` Lars Ingebrigtsen
2021-09-10 16:15       ` Juri Linkov
2021-09-11  8:38         ` martin rudalics
2021-09-11 18:51           ` Juri Linkov
2021-09-13  8:02             ` martin rudalics
2021-09-13 17:57               ` Juri Linkov
2021-09-13 18:43                 ` Juri Linkov
2021-09-15  9:28                   ` martin rudalics
2021-09-15 16:07                     ` Juri Linkov
2021-09-15 18:48                       ` martin rudalics
2021-09-17  7:21                         ` Juri Linkov
2021-09-17  7:39                           ` martin rudalics
2021-09-17 16:04                             ` Juri Linkov
2021-09-18  7:36                               ` martin rudalics
2021-09-18 16:30                                 ` bug#9054: [External] : " Drew Adams
2021-09-19 16:20                                 ` Juri Linkov
2021-09-19 17:27                                   ` Eli Zaretskii
2021-09-19 17:35                                     ` bug#9054: [External] : " Drew Adams
2021-09-19 17:43                                       ` Eli Zaretskii
2021-09-20  8:21                                     ` martin rudalics
2021-09-20 14:11                                       ` bug#9054: [External] : " Drew Adams
2021-09-21  8:32                                         ` martin rudalics
2021-09-21 17:52                                           ` Drew Adams
2021-09-22  7:49                                             ` martin rudalics
2021-09-22 15:17                                               ` Drew Adams [this message]
2021-09-22 15:43                                                 ` martin rudalics
2021-09-22 16:09                                                   ` Drew Adams
2021-09-22 16:18                                                     ` Eli Zaretskii
2021-09-22 16:49                                                       ` Drew Adams
2021-09-22 17:30                                                         ` Eli Zaretskii
2021-09-22 18:22                                                           ` Drew Adams
2021-09-22 18:42                                                             ` Eli Zaretskii
2021-09-20  8:21                                   ` martin rudalics
2021-09-20 15:20                                     ` Juri Linkov
2021-09-21  8:34                                       ` martin rudalics
2021-09-21 18:05                                         ` Juri Linkov
2021-09-22  7:48                                           ` martin rudalics
2021-09-22 17:10                                             ` Juri Linkov
2021-09-23  8:15                                               ` martin rudalics
2021-09-23 15:46                                                 ` Juri Linkov
2021-09-26  9:10                                                   ` martin rudalics
2021-09-23  8:51                                               ` martin rudalics
2021-09-23 16:33                                                 ` Juri Linkov
2021-09-26  9:11                                                   ` martin rudalics
2021-09-29 17:47                                                     ` Juri Linkov
2021-09-30 16:18                                                       ` martin rudalics
2021-10-03 17:36                                                         ` Juri Linkov
2021-10-04  8:28                                                           ` martin rudalics
2021-10-04 17:28                                                             ` Juri Linkov
2021-10-05  8:09                                                               ` martin rudalics
2021-09-14 11:07                 ` Lars Ingebrigtsen
2021-09-15  9:28                   ` martin rudalics
2021-09-15  9:30                     ` Lars Ingebrigtsen
2021-09-15  9:42                       ` martin rudalics
2021-10-23  0:46                         ` Stefan Kangas
2021-09-15  9:27                 ` martin rudalics
2021-09-15 16:05                   ` Juri Linkov
2021-09-15 18:47                     ` martin rudalics
2021-09-16 18:53                       ` Juri Linkov
2021-09-16 19:11                         ` Juri Linkov
2021-09-17  7:39                         ` martin rudalics
2021-09-17 16:05                           ` Juri Linkov
2021-09-18  7:35                             ` martin rudalics
2021-09-11  8:35       ` martin rudalics
2021-09-11 12:43         ` Lars Ingebrigtsen
2021-09-11 16:42           ` martin rudalics
2021-09-13  7:50             ` Lars Ingebrigtsen
2021-09-13  8:10               ` martin rudalics
2021-09-22 20:43           ` Arthur Miller
2021-09-23  8:16             ` martin rudalics
2021-09-23 12:49               ` Arthur Miller
2021-09-26  9:09                 ` martin rudalics
2021-09-26 13:56                   ` Arthur Miller
2022-05-02  9:31 ` Lars Ingebrigtsen
2022-05-02 16:05   ` Juri Linkov
2022-05-03 10:29     ` Lars Ingebrigtsen
2022-05-03 17:25       ` Juri Linkov
2022-05-03 18:03         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB5488691CE5C18E753D7A816DF3A29@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=9054@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).