all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tobias Rittweiler <trittweiler@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 45135@debbugs.gnu.org
Subject: bug#45135: 28.0.50; [PATCH] Add option to print file names in *xref* buffer relative to project root
Date: Sun, 27 Dec 2020 08:10:46 +0100	[thread overview]
Message-ID: <CANXFPyVSBZ5SDNXjX8z4PUhkTCsOAOgFF_da4Abk0JzyNKwNZg@mail.gmail.com> (raw)
In-Reply-To: <6d6911b9-c604-1fca-3cd4-084a8880524f@yandex.ru>

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

On Wed, 23 Dec 2020 at 03:16, Dmitry Gutov <dgutov@yandex.ru> wrote:

> Hi Tobias,
>
> On 09.12.2020 17:08, Tobias Rittweiler wrote:
>
> > please find patches attached to this e-mail that make it possible to
> > set 'xref-file-name-display' to 'relative-to-project-root'. If so set,
> > the file names in the *xref* buffer will be shortened by the
> 'project-root'
> > and 'project-external-roots' of 'project-current'. Note that xref.el
> already
> > requires 'project'.
> >
> > The patches are relative to commit 2581beb from Wed Dec 9 00:54:34 2020
> > +0000
>
> Could you clarify the reason for the first patch? Did you have any test
> failures (on Ubuntu 20.04.1?) with the current test code because of the
> "random" filesystem traversal order? Thanks!
>

The original code *did* already fix the file order in the test where it
actually mattered:
'xref-matches-in-directory-finds-some-for-bar'. Note that no other test
actually involve
locations from multiple files in a way that is dependent on the order.

The patch does not serve any actual utility except for code hygiene: it
reduces a bit
of trivial code duplication. Feel free to ignore it. (But in case you do
add tests for
'xref-file-name-display' being 'relative', please make sure you write the
tests in a way
that makes it independent from the filesystem traversal order.)

Tobias

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

  parent reply	other threads:[~2020-12-27  7:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 15:08 bug#45135: 28.0.50; [PATCH] Add option to print file names in *xref* buffer relative to project root Tobias Rittweiler
2020-12-23  2:16 ` Dmitry Gutov
2020-12-26  2:21   ` Dmitry Gutov
2020-12-26  7:54     ` Eli Zaretskii
2020-12-27  6:55     ` Tobias Rittweiler
2020-12-30 12:05       ` Dmitry Gutov
2020-12-27  7:10   ` Tobias Rittweiler [this message]
2020-12-30  2:06     ` 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=CANXFPyVSBZ5SDNXjX8z4PUhkTCsOAOgFF_da4Abk0JzyNKwNZg@mail.gmail.com \
    --to=trittweiler@gmail.com \
    --cc=45135@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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.