all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Fumitaka Tokumitsu" <toku345@gmail.com>
To: "Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org, dgutov@yandex.ru
Subject: Re: UI inconveniences with M-.
Date: Sat, 02 May 2015 01:26:15 -0700 (PDT)	[thread overview]
Message-ID: <1430555175081.6ae666e3@Nodemailer> (raw)
In-Reply-To: <jwv8udbofyp.fsf-monnier+emacsbugs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 7848 bytes --]

さほと



—
Sent from Mailbox

On Wed, Apr 29, 2015 at 11:41 AM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> [ Moving this to emacs-devel.  ]
>>> > Emacs 24 also had "C-u M-." to go to the next one.  This one doesn't;
>>> > moreover, if you try "C-u M-.", you get prompted for the symbol again,
>>> > and if you type the same one, you get nowhere.  The other matches are
>>> > only available via completion, see below.
>>> Maybe we should write an xref-old-ui-mode.
>> I didn't ask for the old UI.  (If I want it, I can still have it,
>> since the etags.el commands are still available.)  I'm okay with the
>> new UI.  This bug report is about the new UI, and its goal is to make
>> the new UI better.
> Then I don't understand what you mean by the text I quoted.  E.g.:
>    if you try "C-u M-.", you get prompted for the symbol again,
>    and if you type the same one, you get nowhere
> Well, duh!  What did you expect?  In the new UI, "C-u M-." jumps to
> *the* definition (the "C-u" is only used to let you type the name of
> thing you're looking for), so of course if you just jumped to it, asking
> to jump to it again will get you nowhere else.  I guess it would be OK
> to make M-. emit a message like "Hello?  We're already here!" in this
> corner case, if you want to make sure something happens.
>> old UI was consistent and complete: it always displayed the first/next
>> match and provided a command to go to the next/previous one.  By
>> contrast, the new UI is inconsistent: with some back-ends it shows the
>> list of matches and allows to navigate it, with others it shows only
>> the first match and does not give any way to get the next match.
> In the "M-. find-tag" example, the UI does let you see all matches.
> It's just that there's only one.  If you want, we could make this case
> popup an *xref* buffer with a single entry, but I think it makes more
> sense to just jump straight to that one entry instead.
>> But that's largely immaterial: this bug report is not about the
>> back-end, it's about the UI.
> I wouldn't be so sure.
>>> Arguably, the find-tag advice in org-ctags.el could be offered as well,
>>> if org-ctags.el happens to be loaded
>> ??? Why should the xref matches depend on what is and isn't loaded?
> Because that's how xref/elisp works.
>> That would make xref exactly equivalent to "M-x apropos", which means
>> this mode of operation would make xref entirely redundant.
> To you, maybe.  Personally, I find it's *much* quicker to use M-. than
> to use C-h f RET <go-to-the-link> RET, and it has the added benefit that
> M-, brings me right back if I need to.
>> To say nothing of the fact that this doesn't scale to any language
>> except ELisp.
> Not at all.  Many (most?) packages which offer a functionality along the
> lines of "M-. to jump to the definition" use an implementation technique
> which is fundamentally similar/equivalent (obviously, they don't query
> a running Emacs, but they query a running REPL).
>> We could offer this mode as an optional feature, but it certainly
>> shouldn't be the default.
> Many users here disagree.
>> (One of my worst annoyances is to type a C-h command and be presented
>> with "[No match]", because some package is not loaded or some function
>> is not available in the Emacs configuration I happen to be using.)
> Yes, that's a long standing problem, indeed.  I have a local hack which
> tries to add to loaddefs.el a concise description of where definitions
> might be found (basically, for each file, list the few prefixes used in
> that file), so that "C-h f" can load those packages when needed.
> It's "proof of concept" and it has occasionally rendered my Emacs
> session unusable (e.g. because it ended up deciding to try and load,
> say, w32-fns.el to see if it might contain the definition).  I think
> I've now solved most of those problems in the w32-* files, but the
> underlying risk is still there.
>> That's one way of looking at it.  Another is to say that etags gave
>> you more information and thus allowed to find more loose matches,
>> which is helpful when your memory is failing you.
> M-. jumps to the definition of the "thing under point".  There's no
> memory involved.
> If you're not sure what you're looking for, then you're expected to use
> the completion facilities in C-u M-.
>> But in the context of this bug report, that, too, is immaterial: if we
>> think the etags back-end gives too much information, by all means
>> let's filter it before presenting the matches.
> Yes, that's clearly very much needed.
>> Bonus points for making the filtering optional, since some people
>> might like that, and in some situations even you might need it.
> I disagree.  The filtering is needed by the design of the xref API.
> If you want to see the "unfiltered" data, then use M-x xref-find-apropos.
>> Then let's fix the results we display with the etags back-end to show
>> only the relevant ones.
> Yes, please.
>> Saying that the back-end returns a confusingly large amount of bogus
>> matches, and then switching to a UI that assumes much smarter
>> back-ends (which don't really exist) makes very little sense to me.
> The smarter backends already exist, in so far as there is already code out
> there which provides the needed functionality.  It just doesn't use the
> xref API yet, because it was written before xref.el.
>> The old code attempted to support both use cases, by showing the exact
>> match(es) first, followed by less likely ones.  We do similar things
>> in other commands.  The advantages of such a method are that (1) you
>> don't need to second-guess the user, (2) you provide only one command
>> for the user to remember, and (3) if the user only _thinks_ she knows
>> the name, but really doesn't, she can find the information without
>> having to invoke another command.
>>> I think that's an important feature of the new code in this respect.
>> But it is incomplete without a means to get to the other possible
>> matches in this case.
>> To summarize my points in this sub-thread:
>>   . the UI should depend much less on the back-end, ideally not at all
> You keep repeating this, but that is absolutely meaningless to me (kind
> of like "it doesn't work" in bug reports):
> - This consistency was trivially obtained with the old etags.el code
>   since it had one 1 backend.
> - What the fuck should the new UI do if one backend returns 1 match and
>   another returns a hundred (as in your "find-tag" example)?
>>   . there should be a way to go to the next/previous match if the
>>     *xref* buffer is not displayed (or not created in the first
>>     place); if this happens because there's only one match, we should
>>     say so explicitly
> The only case where the *xref* is not displayed is when there's only
> 1 match returned by the backend.  So "go to the next/previous match" is
> again meaningless.
>>   . when there are more than one possible match, the UI should behave
>>     similarly, i.e. display the *xref* buffer; when there's only one
>>     match, it should _never_ display *xref*,
> That's exactly what the code does.
>>     and should display an indication of the fact that there's only one
>>     match
> The current code "displays" this indication by jumping to the sole match
> instead of jumping to the *xref* buffer.  I think it's clear enough.
>>   . if the criteria for filtering of the matches are very different
>>     between the possible back-ends, there should be some agreed-upon
>>     uniform default that returns roughly the same number of matches
>>     with all back-ends, and the rest should be controlled by user
>>     options
> I don't see what that could concretely look like.
>         Stefan

[-- Attachment #2: Type: text/html, Size: 8951 bytes --]

  parent reply	other threads:[~2015-05-02  8:26 UTC|newest]

Thread overview: 250+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29 20:26 bug#19468: 25.0.50; UI inconveniences with M- Eli Zaretskii
2014-12-30  6:04 ` Dmitry Gutov
2014-12-30  8:19   ` Helmut Eller
2014-12-30 16:00     ` Eli Zaretskii
2014-12-30 17:02       ` Helmut Eller
2014-12-30 17:39         ` Eli Zaretskii
2014-12-30 19:56       ` Dmitry Gutov
2014-12-30 19:38     ` Dmitry Gutov
2014-12-30 22:58       ` Helmut Eller
2015-01-03 21:37         ` Dmitry Gutov
2015-01-04  8:55           ` martin rudalics
2015-01-04 22:51             ` Dmitry Gutov
2015-01-05  7:08               ` martin rudalics
2015-01-06 10:39                 ` Dmitry Gutov
2015-04-26 14:56                   ` Eli Zaretskii
2015-04-27  4:30                     ` Stefan Monnier
2015-04-27 15:07                       ` Eli Zaretskii
2015-04-27 17:35                         ` Stefan Monnier
2015-04-27 19:26                           ` Eli Zaretskii
2015-04-27 21:54                             ` Stefan Monnier
2015-04-27 22:45                               ` Dmitry Gutov
2015-04-28 14:56                                 ` Eli Zaretskii
2015-04-28 14:48                               ` Eli Zaretskii
2015-04-28 21:00                                 ` Dmitry Gutov
2015-04-29 15:41                                   ` Eli Zaretskii
2015-04-29 17:22                                     ` Dmitry Gutov
2015-04-29 17:58                                       ` Eli Zaretskii
2015-04-29  2:41                                 ` Stefan Monnier
2015-04-29  6:10                                   ` Helmut Eller
2015-04-29 13:23                                     ` conflicting uses of next-error-function (was: UI inconveniences with M-.) Stefan Monnier
2015-04-29 16:58                                       ` conflicting uses of next-error-function Helmut Eller
2015-04-29 17:40                                         ` Dmitry Gutov
2015-04-29 18:15                                           ` Helmut Eller
2015-04-29 23:14                                             ` Dmitry Gutov
2015-04-30  6:19                                               ` Helmut Eller
2015-04-30  8:04                                                 ` Dmitry Gutov
2015-04-30 17:46                                                   ` Helmut Eller
2015-05-02 23:20                                                     ` Dmitry Gutov
2015-05-03  6:54                                                       ` Helmut Eller
2015-05-03 11:45                                                         ` Dmitry Gutov
2015-05-03 13:25                                                           ` Helmut Eller
2015-05-03 14:12                                                             ` Dmitry Gutov
2015-05-04 22:21                                                               ` Ted Zlatanov
2015-05-05  2:28                                                                 ` Dmitry Gutov
2015-05-05  9:47                                                                   ` Ted Zlatanov
2015-05-05 14:05                                                                     ` Dmitry Gutov
2015-05-05 14:26                                                                       ` Ted Zlatanov
2015-04-29 23:05                                       ` Vitalie Spinu
2015-04-29 23:11                                         ` Dmitry Gutov
2015-04-29 23:52                                           ` Vitalie Spinu
2015-04-29 23:15                                       ` Dmitry Gutov
2015-04-30  6:35                                         ` Stefan Monnier
2015-04-29 15:26                                     ` UI inconveniences with M- Vitalie Spinu
2015-04-30  0:44                                       ` Dmitry Gutov
2015-04-30  0:55                                         ` Vitalie Spinu
2015-04-29 17:08                                     ` Dmitry Gutov
2015-04-29 15:44                                   ` Eli Zaretskii
2015-04-29 15:57                                     ` Dmitry Gutov
2015-04-29 16:17                                       ` Eli Zaretskii
2015-04-29 16:25                                         ` Dmitry Gutov
2015-04-29 16:53                                           ` Eli Zaretskii
2015-04-29 17:06                                             ` Dmitry Gutov
2015-04-29 17:15                                               ` Eli Zaretskii
2015-04-29 17:26                                                 ` Dmitry Gutov
2015-04-29 17:59                                                   ` Eli Zaretskii
2015-04-29 18:10                                                     ` Dmitry Gutov
2015-04-29 21:54                                     ` Stefan Monnier
2015-04-30 13:42                                       ` Eli Zaretskii
2015-05-01 14:21                                         ` Stefan Monnier
2015-05-01 18:32                                           ` Eli Zaretskii
2015-05-01 21:04                                             ` Stefan Monnier
2015-05-01 21:13                                               ` Dmitry Gutov
2015-05-02  7:00                                                 ` Stefan Monnier
2015-05-02  7:18                                               ` Eli Zaretskii
2015-05-02  8:35                                           ` Fumitaka Tokumitsu
2015-05-01 21:11                                         ` Dmitry Gutov
2015-05-02  8:12                                           ` Eli Zaretskii
2015-05-02  8:46                                             ` Fumitaka Tokumitsu
2015-05-02 12:41                                             ` Dmitry Gutov
2015-05-02 12:57                                               ` Eli Zaretskii
2015-05-02 13:31                                                 ` Dmitry Gutov
2015-05-02 13:44                                                   ` Eli Zaretskii
2015-05-02 17:44                                                     ` Dmitry Gutov
2015-05-02  8:26                                   ` Fumitaka Tokumitsu [this message]
2015-04-27 22:36                             ` bug#19468: 25.0.50; " Dmitry Gutov
2015-04-27 23:15                               ` Stefan Monnier
2015-04-27 23:25                                 ` Dmitry Gutov
2015-04-28  1:26                                   ` Stefan Monnier
2015-04-28  1:37                                     ` Dmitry Gutov
2015-04-28 13:30                                       ` Stefan Monnier
2015-04-28 21:04                                         ` Dmitry Gutov
2015-04-29  3:13                                           ` Stefan Monnier
2015-04-29  3:25                                             ` Dmitry Gutov
2015-04-29  4:15                                               ` Stefan Monnier
2015-04-27 22:44                           ` bug#19468: 25.0.50; " Dmitry Gutov
2015-04-27 23:19                             ` Stefan Monnier
2015-04-28  0:24                               ` Dmitry Gutov
2015-04-28  1:34                                 ` Stefan Monnier
2015-04-28 15:01                                 ` Eli Zaretskii
2015-04-28 18:47                                   ` Dmitry Gutov
2015-04-28 14:59                               ` Eli Zaretskii
2015-04-28 14:55                             ` Eli Zaretskii
2015-04-28 21:33                               ` Dmitry Gutov
2015-04-29 15:46                                 ` Eli Zaretskii
2015-04-29 22:56                                   ` Dmitry Gutov
2015-04-30 13:48                                     ` Eli Zaretskii
2015-05-01  2:27                                       ` Dmitry Gutov
2015-05-01  6:45                                         ` Eli Zaretskii
2015-05-01 11:27                                           ` Dmitry Gutov
2015-05-01 12:57                                             ` Eli Zaretskii
2015-05-01 14:51                                               ` Dmitry Gutov
2015-05-01 18:38                                                 ` Eli Zaretskii
2015-05-01 18:44                                                   ` Dmitry Gutov
2015-05-01 19:22                                                     ` Eli Zaretskii
2015-05-01 20:36                                                       ` Dmitry Gutov
2015-05-02  6:59                                                         ` Stefan Monnier
2015-05-02  7:59                                                           ` Helmut Eller
2015-05-02  8:39                                                             ` Eli Zaretskii
2015-05-02  9:09                                                               ` Helmut Eller
2015-05-02  9:24                                                                 ` Eli Zaretskii
2015-05-02  9:50                                                                   ` Helmut Eller
2015-05-02 18:29                                                             ` Dmitry Gutov
2015-05-02 13:13                                                           ` xref "find references" and grouping Dmitry Gutov
2015-05-02 14:14                                                             ` Helmut Eller
2015-05-02 19:01                                                               ` Dmitry Gutov
2015-05-03  7:47                                                                 ` Helmut Eller
2015-05-04  1:35                                                                   ` Stefan Monnier
2015-05-04  2:09                                                                   ` Dmitry Gutov
2015-05-04 13:10                                                                     ` Vitalie Spinu
2015-05-04 14:21                                                                       ` Vitalie Spinu
2015-05-04 21:29                                                                       ` Dmitry Gutov
2015-05-05  0:02                                                                         ` Vitalie Spinu
2015-05-05  0:18                                                                           ` Dmitry Gutov
2015-05-05  1:45                                                                             ` Vitalie Spinu
2015-05-02 19:10                                                           ` UI inconveniences with M- Dmitry Gutov
2015-05-04 13:41                                                           ` Vitalie Spinu
2015-05-04 21:34                                                             ` Dmitry Gutov
2015-05-05  0:13                                                               ` Vitalie Spinu
2015-05-05  0:14                                                                 ` Dmitry Gutov
2015-05-05  1:36                                                                   ` Vitalie Spinu
2015-05-05 15:06                                                                     ` Dmitry Gutov
2015-05-02  7:39                                                         ` bug#19468: 25.0.50; " Eli Zaretskii
2015-05-01 18:13                                               ` Stefan Monnier
2015-04-27 22:09                         ` Dmitry Gutov
2015-04-28 14:49                           ` Eli Zaretskii
2015-04-28 21:59                             ` Dmitry Gutov
2015-04-29 15:46                               ` Eli Zaretskii
2015-04-29 22:32                                 ` Dmitry Gutov
2015-04-27 15:13                       ` Eli Zaretskii
2015-04-27 17:21                         ` Stefan Monnier
2015-04-27 19:15                           ` Eli Zaretskii
2015-04-27 21:42                             ` Stefan Monnier
2015-04-27 22:32                             ` Dmitry Gutov
2015-04-28 14:55                               ` Eli Zaretskii
2015-04-28 22:04                                 ` Dmitry Gutov
2015-04-29 15:47                                   ` Eli Zaretskii
2015-04-27 22:25                           ` Dmitry Gutov
2015-04-27 22:54                             ` Stefan Monnier
2015-04-27 23:15                               ` Dmitry Gutov
2015-04-28  1:25                                 ` Stefan Monnier
2015-04-28  2:15                                   ` Dmitry Gutov
2015-04-28 13:36                                     ` Stefan Monnier
2015-04-29  0:24                                       ` Dmitry Gutov
2015-04-28 15:03                                     ` Eli Zaretskii
2015-04-28 22:07                                       ` Dmitry Gutov
2015-04-29 15:47                                         ` Eli Zaretskii
2015-04-28 14:58                                 ` Eli Zaretskii
2015-04-28 22:08                                   ` Dmitry Gutov
2015-04-28  0:01                               ` Drew Adams
2015-04-28 14:57                               ` Eli Zaretskii
2015-04-29  3:12                                 ` Etags.el (was: UI inconveniences with M-.) Stefan Monnier
2015-04-29 15:52                                   ` Eli Zaretskii
2015-04-29 22:14                                     ` Etags.el Stefan Monnier
2015-04-29 15:00                               ` bug#19468: 25.0.50; UI inconveniences with M- Vitalie Spinu
2015-04-29 15:25                                 ` Dmitry Gutov
2015-04-29 16:01                                   ` Vitalie Spinu
2015-04-29 22:02                                   ` Stefan Monnier
2015-04-29 16:11                                 ` Eli Zaretskii
2015-04-28 14:52                             ` Eli Zaretskii
2015-04-28 22:28                               ` Dmitry Gutov
2015-04-29 15:48                                 ` Eli Zaretskii
2015-04-29 17:43                                   ` Dmitry Gutov
2015-04-29 18:03                                     ` Eli Zaretskii
2015-05-02  0:08                                       ` Dmitry Gutov
2015-05-02  6:42                                         ` Eli Zaretskii
2015-05-02 10:23                                           ` Dmitry Gutov
2015-05-02 11:24                                             ` Eli Zaretskii
2015-05-02 12:07                                               ` Dmitry Gutov
2015-05-02 12:46                                                 ` Eli Zaretskii
2015-05-02  7:10                                         ` Eli Zaretskii
2015-05-02 10:11                                           ` Dmitry Gutov
2015-05-02 11:16                                             ` Eli Zaretskii
2015-05-02 11:45                                               ` Eli Zaretskii
2015-05-02 12:16                                                 ` Dmitry Gutov
2015-05-02 12:49                                                   ` Eli Zaretskii
2015-05-02 13:04                                                     ` Dmitry Gutov
2015-05-03 14:44                                                   ` Eli Zaretskii
2015-05-02 12:01                                               ` Dmitry Gutov
2015-05-02 12:45                                                 ` Eli Zaretskii
2015-05-02 13:42                                                   ` Dmitry Gutov
2015-05-02 14:13                                                     ` Eli Zaretskii
2015-05-02 17:41                                                       ` Dmitry Gutov
2015-05-02 18:45                                                         ` Eli Zaretskii
2015-05-02 19:17                                                           ` Dmitry Gutov
2015-05-02 19:45                                                             ` Eli Zaretskii
2015-05-02 20:06                                                               ` Dmitry Gutov
2015-05-02 13:41                                                 ` Eli Zaretskii
2015-05-02 17:35                                                   ` Dmitry Gutov
2015-05-04 14:48                                                     ` Eli Zaretskii
2015-04-27 22:15                         ` Dmitry Gutov
2015-04-28 14:50                           ` Eli Zaretskii
2015-04-28 22:15                             ` Dmitry Gutov
2015-04-29 15:48                               ` Eli Zaretskii
2015-04-29 17:42                                 ` Dmitry Gutov
2015-04-27 22:02                       ` Dmitry Gutov
2015-04-27 23:47                     ` Dmitry Gutov
2015-04-28 15:00                       ` Eli Zaretskii
2015-04-28 23:24                         ` Dmitry Gutov
2015-04-29 15:49                           ` Eli Zaretskii
2015-04-29 23:03                             ` Dmitry Gutov
2015-04-30 13:49                               ` Eli Zaretskii
2014-12-30 15:41   ` Eli Zaretskii
2014-12-30 20:26     ` Dmitry Gutov
2015-01-04 23:52     ` Dmitry Gutov
2015-01-05 19:43       ` Eli Zaretskii
2014-12-30 17:03   ` Stefan Monnier
2014-12-30 17:11     ` Dmitry Gutov
2014-12-30 17:43       ` Eli Zaretskii
2014-12-30 17:49       ` Dmitry Gutov
2014-12-30 18:01         ` Eli Zaretskii
2014-12-30 17:25     ` Helmut Eller
2014-12-30 18:08       ` Stefan Monnier
2014-12-30 17:41     ` Eli Zaretskii
2014-12-30 17:50       ` Helmut Eller
2014-12-30 17:58         ` Eli Zaretskii
2014-12-30 18:08           ` Dmitry Gutov
2014-12-30 17:53       ` Dmitry Gutov
2014-12-30 18:00         ` Eli Zaretskii
2014-12-30 18:01           ` Helmut Eller
2014-12-30 18:13             ` Eli Zaretskii
2014-12-30 18:20               ` Helmut Eller
2014-12-30 18:27                 ` Eli Zaretskii
2014-12-30 18:33                   ` Helmut Eller
2014-12-30 18:38                     ` Eli Zaretskii
2014-12-30 18:53                       ` Helmut Eller
2014-12-30 19:33                         ` Eli Zaretskii
2014-12-30 18:33                   ` Dmitry Gutov
2016-02-21 23:00 ` Dmitry Gutov
2016-02-22 17:18   ` Eli Zaretskii
2016-02-22 21:15     ` Dmitry Gutov

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

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

  git send-email \
    --in-reply-to=1430555175081.6ae666e3@Nodemailer \
    --to=toku345@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 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.