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 07:55:41 +0100	[thread overview]
Message-ID: <CANXFPyVMUO46aLj-KKS3Ey-vKZzWkK4L4P+CfwpgNjO8FcH5SQ@mail.gmail.com> (raw)
In-Reply-To: <ddd389e8-d744-6847-eb29-cd2aa0d20b01@yandex.ru>

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

On Sat, 26 Dec 2020 at 03:21, Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 23.12.2020 04:16, Dmitry Gutov wrote:
> > Re: patch 2, I have an idea that would make it a bit simpler and less
> > coupled to project.el, but behave the same in the usual cases. Stay
> tuned.
>
> Not as clean as I hoped, but here's something that should work just as
> well, and a lot faster to boot (project-current lookup for every file
> name is slow when there are a lot of matches, even if each individual
> project-current call looks fast).
>
> We could remove the explicit dependency on the "current project" if it
> was always passed in from the outside (e.g. by project-find-regexp's
> setup), but we probably want this display mode to work with
> xref-find-references as well.
>
> Also simplified the docstring a bit.
>
> Tobias, please try the attached patch.
>

Hi Dmitry,

Thank you. I tested the patch and it works fine.

Some comments on the patch itself:

1. 'xref--project-root' returns a project root if 'project-root' is fboundp.
    Otherwise it returns a *list* of roots.

2. And in the second case, 'xref-backend-references' conses that list
    of roots to the list of external roots. I.e. it constructs an improper
list
    which it then passes to 'mapcan'. This is a bug, isn't it?

3. 'xref-expanded-seach-root` mispells "search"

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

  parent reply	other threads:[~2020-12-27  6:55 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 [this message]
2020-12-30 12:05       ` Dmitry Gutov
2020-12-27  7:10   ` Tobias Rittweiler
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=CANXFPyVMUO46aLj-KKS3Ey-vKZzWkK4L4P+CfwpgNjO8FcH5SQ@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.