unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61340: 29.0.60; Extra space in xref buffer
@ 2023-02-07  7:40 Juri Linkov
  2023-02-08  0:58 ` Dmitry Gutov
  0 siblings, 1 reply; 11+ messages in thread
From: Juri Linkov @ 2023-02-07  7:40 UTC (permalink / raw)
  To: 61340

This is a small problem and I didn't notice it until now when
there was an important distinction whether there is a space
character at the beginning of the line, and it was misleading
to see that xref wrongly says there is a leading space.
This is because currently xref output differs from grep and occur
where there is no space between colon and the text from file.
Here is the fix:

```
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index f01b8a1af18..6160f217afb 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1108,7 +1108,7 @@ xref--insert-xrefs
                                    maximize (xref-location-line
                                              (xref-item-location xref)))
            for line-format = (and max-line
-                                  (format "%%%dd: " (1+ (floor (log max-line 10)))))
+                                  (format "%%%dd:" (1+ (floor (log max-line 10)))))
            with item-text-props = (list 'mouse-face 'highlight
                                         'keymap xref--button-map
                                         'help-echo
```





^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-19 12:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07  7:40 bug#61340: 29.0.60; Extra space in xref buffer Juri Linkov
2023-02-08  0:58 ` Dmitry Gutov
2023-02-08  7:35   ` Juri Linkov
2023-02-08 15:14     ` Dmitry Gutov
2023-02-08 18:51       ` Juri Linkov
2023-02-08 22:37         ` Dmitry Gutov
2023-02-09 17:51           ` Juri Linkov
2023-02-09 19:58             ` Dmitry Gutov
2023-02-18 22:04               ` Dmitry Gutov
2023-02-19  6:20                 ` Eli Zaretskii
2023-02-19 12:27                   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).