emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: limit length of xref file header line


From: Dmitry Gutov
Subject: Re: limit length of xref file header line
Date: Mon, 13 Sep 2021 01:47:20 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]