unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: master b02c9bc: Improve documentation of new Xref options
Date: Tue, 7 Sep 2021 18:21:24 +0300	[thread overview]
Message-ID: <fb1f23e1-a283-7599-63f3-174385fda84e@yandex.ru> (raw)
In-Reply-To: <20210907130401.D074320A10@vcs0.savannah.gnu.org>

Thanks for the updates, some comments:

On 07.09.2021 16:04, Eli Zaretskii wrote:

>   @findex project-search
> -  @kbd{M-x project-search} is an interactive variant of
> +  @kbd{M-x project-search} is an incremental variant of

Is it really incremental? Maybe call it "iterative".

Compared to isearch (which is "incremental search"), we are not allowed 
to change the search string on-the-fly, for example.

> -@c Sadly, the new-and-improved Xref feature doesn't provide anything
> -@c close to the described below features of the now-obsoleted
> -@c tags-apropos.  I'm leaving this here to encourage enhancements to
> -@c xref.el.
> +@c Sadly, the new-and-improved Xref feature doesn't provide some
> +@c of the features of the now-obsoleted tags-apropos.  I'm leaving
> +@c this here to encourage enhancements to xref.el.

Is that about the display of tag file names in the apropos output buffer?

TBH I'm only reading this paragraph now. A bug report with a fuller 
explanation might help (no promises, though, sorry).

> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -2309,13 +2309,18 @@ before navigating to the selected location.
>   +++
>   *** New user options to automatically show the first Xref match.
>   The new user option 'xref-auto-jump-to-first-definition' controls the
> -behavior of 'xref-find-definitions' and related commands: if it's t or
> -'show', the first match is automatically displayed; if it's 'move',
> -point in the "*xref*" buffer is automatically moved to the first match
> -without displaying it.
> -The new user option 'xref-auto-jump-to-first-xref' changes the behavior of
> -all Xref commands in the same way as 'xref-auto-jump-to-first-definition'
> -affects the "find-definitions" commands.
> +behavior of 'xref-find-definitions' and related commands, like

Maybe "similar" rather than related? The point is that those commands 
use the same UI (to show, sometimes, very different information), rather 
than that are united by subject matter.

> +'xref-find-definitions-other-windo': if it's t or 'show', the first

Typo: windo -> window

> +match is automatically displayed; if it's 'move', point in the
> +"*xref*" buffer is automatically moved to the first match without
> +displaying it.
> +The new user option 'xref-auto-jump-to-first-xref' changes the
> +behavior of Xref commands such as 'xref-find-references',
> +'xref-find-apropos', and 'project-find-regexp', which are expected to
> +display many match that the user would like to
> +visit. 'xref-auto-jump-to-first-xref' changes their behavior muuch in

Typo: muuch

> +the same way as 'xref-auto-jump-to-first-definition' affects the
> +"find-definitions" commands.
>   
>   *** New user options 'xref-search-program' and 'xref-search-program-alist'.
>   So far 'grep' and 'ripgrep' are supported.  'ripgrep' seems to offer better
> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
> index d022baaf..f6d88e1 100644
> --- a/lisp/progmodes/xref.el
> +++ b/lisp/progmodes/xref.el
> @@ -420,7 +420,9 @@ elements is negated: these commands will NOT prompt."
>     "If t, `xref-find-definitions' always jumps to the first result.
>   `show' means to show the first result's location, but keep the
>   focus on the Xref buffer's window.
> -`move' means to only move point to the first result."
> +`move' means to only move point to the first result.
> +This variable also affects commands similar to `xref-find-definitions',
> +such as `xref-find-definitions-other-window'."

I would call them "variations", rather than separate commands, probably.

This is in contrast to xref-find-references and xref-find-apropos 
actually being similar while being different commands.

>     :type '(choice (const :tag "Jump" t)
>                    (const :tag "Show" show)
>                    (const :tag "Move point only" move)
> @@ -429,13 +431,16 @@ focus on the Xref buffer's window.
>     :package-version '(xref . "1.2.0"))
>   
>   (defcustom xref-auto-jump-to-first-xref nil
> -  "If t, xref commands always jump to the first result.
> +  "If t, `xref-find-references' always jumps to the first result.
>   `show' means to show the first result's location, but keep the
>   focus on the Xref buffer's window.
>   `move' means to only move point to the first result.
> +This variable also affects commands similar to `xref-find-definitions',

similar to `xref-find-references'

Here you call them "similar", like I suggest above. That seems like a 
good choice.

Thanks.



       reply	other threads:[~2021-09-07 15:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210907130400.31609.90502@vcs0.savannah.gnu.org>
     [not found] ` <20210907130401.D074320A10@vcs0.savannah.gnu.org>
2021-09-07 15:21   ` Dmitry Gutov [this message]
2021-09-07 15:45     ` master b02c9bc: Improve documentation of new Xref options Eli Zaretskii
2021-09-07 16:06       ` Dmitry Gutov
2021-09-07 16:23         ` Eli Zaretskii
2021-09-08  0:24           ` Dmitry Gutov
2021-09-08  6:18             ` Eli Zaretskii
2021-09-09  1:22               ` Dmitry Gutov
2021-09-09  6:26                 ` Eli Zaretskii
2021-09-10  0:18                   ` Dmitry Gutov
2021-09-10 12:06                     ` Eli Zaretskii

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=fb1f23e1-a283-7599-63f3-174385fda84e@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).