[Top][All Lists]

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

Re: limit length of xref file header line

From: Stephen Leake
Subject: Re: limit length of xref file header line
Date: Fri, 24 May 2019 14:38:14 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)

Dmitry Gutov <address@hidden> writes:

>> So I'd like to shorten the filename line (called the "group" in xref).
> This is not exactly right. The group attribute can contain the
> filename, but it doesn't have to. Or else we'd have called in
> differently.
> BTW, check out the three definitions of
>   (cl-defmethod xref-location-group ...
> for the built-in classes.

Right; I did not look hard enough.

>> The patch below adds a new user option 'xref-display-filename' to
>> control this.
> ... the appropriate place to change
> the "display" would instead be in
>   (cl-defmethod xref-location-group ((l xref-file-location))
>     (oref l file))


(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)))))

-- Stephe

reply via email to

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