all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bozhidar Batsov <bozhidar@batsov.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Vitalie Spinu <spinuvit@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: Bad moves with xref-find-definitions
Date: Mon, 27 Apr 2015 22:36:57 +0300	[thread overview]
Message-ID: <CAM9Zgm0P27oTkNtpVDfvHdGW8+2+HkAPxv7vWZqbub0jVcMxMg@mail.gmail.com> (raw)
In-Reply-To: <553D316B.5050802@yandex.ru>

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

On 26 April 2015 at 21:41, Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 04/26/2015 09:38 AM, Bozhidar Batsov wrote:
>
>  * find some suitable place to invoke a command (e.g. move their cursor
>> to a symbol or to an empty place in the buffer)
>> * start wondering what prefix to prepend to the command to alter its
>> behaviour
>>
>
> "Press C-u to explicitly enter something" is a pretty common Emacs
> pattern. If all modes use the xref interface, it'll become even less of a
> problem.
>
> But on the subject of "what prefix", I think you've made a mistake using
> `C-u' for "show in the other window". Emacs normally uses `C-x 4' for that,
> which is only one keypress longer. The users who prefer the "other window"
> behavior can simply switch the bindings.


This was not my doing. I suggested C-x 4, but there was strong opposition
for it.


>
>
>  While I think that for navigating sources acting on the thing at point
>> probably makes more sense,
>>
>
> It can also be beneficial in other ways. Like I've described in another
> thread, if you're reading a function, say, for the first time and are
> trying to trace its control flow, moving point to the symbol before `M-.'
> means you'll immediately know where you "came from" after pressing `M-,'.
>
>  when writing code (meaning you'll need to do
>> some doc lookups) you're often wondering "What was the behavior of this
>> function?" or "What were I supposed to use here?" and it's unlikely that
>> the thing at point will help you much (unless you're simply reading code).
>>
>
> Which function? Where's the set of functions you're choosing from? If the
> function name is not at point, I'm guessing it's just not typed out fully.
> In that case, you'll probably delegate to the "find doc" or the "find
> sources" function of the completion interface you're using.
>

Yep. This makes perfect sense, btw.


>
> In `completion-at-point''s case, you'll probably first complete the name
> fully and then jump to it. However, using xref-find-apropos is not out of
> the question either.
>
>  The global config, as implemented now in CIDER ,has the disadvantage of
>> insufficient granularity - e.g. I'd like to always jump to the source of
>> thing at point, but I wouldn't like for other commands to behave like
>> this.
>>
>
> The settings granularity shouldn't be that much a problem: introduce
> another possible value for cider-prompt-for-symbol, which will be a list of
> commands for which to always prompt.


Sure, that's clearly a possibility. I just didn't want to go overboard with
this. Such a config has pretty much the same complexity as adding a second
set of commands that simply do the different thing.


>
>
>  But as the config option controls all similar commands, all of
>> them behave in the same way - either acting on the thing at point or
>> always prompting for confirmation.
>>
>
> The key question is which set of commands the variable can affect at all.
> For me, "jump to", "show references" and "show doc", all should use the
> contents at point by default.


OK, but this contradicts with the behavior of Emacs's own `find-function`,
`find-variable`, etc.


>
>
>  Maybe two sets of matching commands per each such operation or something
>> (although handy keybindings are always in short supply).
>>
>
> Probably not: being able to press `C-u' together with a per-command user
> option should be enough for everyone.
>

Life has told me that's it's pretty hard to please everyone. :-)

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

  reply	other threads:[~2015-04-27 19:36 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 15:07 Bad moves with xref-find-definitions Vitalie Spinu
2015-04-25 14:24 ` Stefan Monnier
2015-04-25 16:25   ` Dmitry Gutov
2015-04-25 17:42   ` Vitalie Spinu
2015-04-25 18:49     ` Vitalie Spinu
2015-04-25 19:07       ` Dmitry Gutov
2015-04-25 18:56     ` João Távora
2015-04-25 23:50       ` Dmitry Gutov
2015-04-26 11:51         ` xref backends for elisp-related modes Was: " João Távora
2015-04-26 13:56           ` Dmitry Gutov
2015-04-26 14:51           ` Eli Zaretskii
2015-04-28 11:06             ` Vitalie Spinu
2015-04-28 11:41               ` João Távora
2015-04-28 11:59                 ` Vitalie Spinu
2015-04-28 15:17                   ` Eli Zaretskii
2015-04-28 15:45                     ` Vitalie Spinu
2015-04-28 16:01                       ` Eli Zaretskii
2015-04-28 13:27                 ` Stefan Monnier
2015-04-28 21:28                   ` Dmitry Gutov
2015-04-29 12:35                     ` Vitalie Spinu
2015-04-29 15:45                     ` Eli Zaretskii
2015-04-28 15:15               ` Eli Zaretskii
2015-04-28 15:47                 ` Vitalie Spinu
2015-04-28 16:03                   ` Eli Zaretskii
2015-04-29  6:55               ` Helmut Eller
2015-04-29 12:40                 ` Vitalie Spinu
2015-04-29 13:01                   ` Helmut Eller
2015-04-29 15:30                     ` Vitalie Spinu
2015-04-29 17:09                       ` Dmitry Gutov
2015-04-29 12:47                 ` Dmitry Gutov
2015-04-29 13:04                   ` Helmut Eller
2015-04-29 13:12                     ` Dmitry Gutov
2015-04-27  2:20           ` Stefan Monnier
2015-04-25 19:11     ` Dmitry Gutov
2015-04-25 20:43       ` Vitalie Spinu
2015-04-26  3:37         ` Dmitry Gutov
2015-04-26  6:38           ` Bozhidar Batsov
2015-04-26 18:41             ` Dmitry Gutov
2015-04-27 19:36               ` Bozhidar Batsov [this message]
2015-04-28  1:23                 ` Dmitry Gutov
2015-04-28 11:30               ` Vitalie Spinu
2015-04-26 10:44           ` Vitalie Spinu
2015-04-26 13:14             ` Vitalie Spinu
2015-04-26 15:09             ` Dmitry Gutov
2015-04-26 16:23               ` Vitalie Spinu
2015-04-26 17:51                 ` Dmitry Gutov
2015-04-26 20:56                   ` Vitalie Spinu
2015-04-27 21:57                     ` Dmitry Gutov
2015-04-26  3:34     ` Stefan Monnier
2015-04-26 11:31       ` Vitalie Spinu
2015-04-26 14:50         ` Eli Zaretskii
2015-04-26 15:12           ` Dmitry Gutov
2015-04-26 15:32             ` Eli Zaretskii
2015-04-26 15:20         ` Dmitry Gutov
2015-04-26 16:01           ` Vitalie Spinu
2015-04-26 17:26             ` Dmitry Gutov
2015-04-27  2:26         ` Stefan Monnier
2015-04-25 19:01 ` Dmitry Gutov
2015-04-25 20:34   ` Vitalie Spinu
2015-04-25 21:44     ` Vitalie Spinu
2015-04-26  0:20     ` Dmitry Gutov
2015-04-26  0:28       ` Dmitry Gutov
2015-04-28 15:31       ` Vitalie Spinu

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=CAM9Zgm0P27oTkNtpVDfvHdGW8+2+HkAPxv7vWZqbub0jVcMxMg@mail.gmail.com \
    --to=bozhidar@batsov.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=spinuvit@gmail.com \
    /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.