all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stephen Leake <stephen_leake@stephe-leake.org>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: limit length of xref file header line
Date: Mon, 13 Sep 2021 01:47:20 +0300	[thread overview]
Message-ID: <7de0a2bd-57b8-5981-1619-601da5a22a9a@yandex.ru> (raw)
In-Reply-To: <27ef39b7-36da-5e27-e61f-111fc7574903@yandex.ru>

Hi Stephen,

On 26.05.2019 00:22, Dmitry Gutov wrote:
> On 25.05.2019 1:38, Stephen Leake wrote:
> 
>> So:
>>
>> (cl-defmethod xref-location-group ((l xref-file-location))
>>    (cl-ecase xref-file-name-display
>>      (abs (oref l file))
>>      (nondirectory (file-name-nondirectory (oref l file)))))
> 
> Yep. That should work.

Just a heads-up: I just revisited this feature and changed the 
implementation to be closer to your proposed first version. Only with a 
check that a group indeed looks like a file name.

I considered other options (like requiring all xref-location-group 
overrides for file-based types to pass the value through some public 
formatter function), but it didn't seem like worth the other people's 
trouble. But we can revert to that approach in some future version.

So, see commit d314951043. Let me know if you encounter any problems.



      reply	other threads:[~2021-09-12 22:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-19 17:57 limit length of xref file header line Stephen Leake
2019-05-21  1:16 ` Dmitry Gutov
2019-05-21  9:47   ` Dmitry Gutov
2019-05-24 22:38   ` Stephen Leake
2019-05-25 21:22     ` Dmitry Gutov
2021-09-12 22:47       ` Dmitry Gutov [this message]

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=7de0a2bd-57b8-5981-1619-601da5a22a9a@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=stephen_leake@stephe-leake.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 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.