GNU bug report logs -
#18209
Add ability to truncate long grep matches
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Wed, 6 Aug 2014 11:54:02 UTC
Severity: wishlist
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18209 in the body.
You can then email your comments to 18209 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18209
; Package
emacs
.
(Wed, 06 Aug 2014 11:54:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Reuben Thomas <rrt <at> sc3d.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 06 Aug 2014 11:54:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
In some files (e.g. in text files using newline as a paragraph delimiter)
one can get matches in very long lines that can occupy several screenfuls.
These are not always straightforward to avoid. There's no way to tell (GNU)
grep to truncate its output; perhaps Emacs could help here, by being able
to specify a maximum length of match to show? For bonus points, show part
of the line that matches, with ellipses, rather than just truncating the
line; but even without that it would be useful, provided that the
truncation is clearly marked: the annoyance and slowness of navigating
*grep* buffers full of enormous matches which are almost always not what
one is looking for would be great!
(I just managed to work around one source, minified Javascript mixed in
with non-minified files, by omitting *.min.js in the list of files grep
should ignore, but this is not always easy either: sometimes one might only
have the minified form to hand, and might want to grep it e.g. while
debugging.)
--
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18209
; Package
emacs
.
(Wed, 06 Aug 2014 17:45:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 18209 <at> debbugs.gnu.org (full text, mbox):
>>>>> "Reuben" == Reuben Thomas <rrt <at> sc3d.org> writes:
> In some files (e.g. in text files using newline as a paragraph delimiter)
> one can get matches in very long lines that can occupy several screenfuls.
> These are not always straightforward to avoid. There's no way to tell (GNU)
> grep to truncate its output; perhaps Emacs could help here, by being able
> to specify a maximum length of match to show? For bonus points, show part
> of the line that matches, with ellipses, rather than just truncating the
> line; but even without that it would be useful, provided that the
> truncation is clearly marked: the annoyance and slowness of navigating
> *grep* buffers full of enormous matches which are almost always not what
> one is looking for would be great!
FWIW, I have the following in my ~/.emacs:
(defun sm-compilation-mode-hook ()
(setq truncate-lines t))
(add-hook 'compilation-mode-hook #'sm-compilation-mode-hook)
-- Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18209
; Package
emacs
.
(Wed, 06 Aug 2014 17:48:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 18209 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 6 August 2014 18:44, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
> >>>>> "Reuben" == Reuben Thomas <rrt <at> sc3d.org> writes:
>
> > In some files (e.g. in text files using newline as a paragraph delimiter)
> > one can get matches in very long lines that can occupy several
> screenfuls.
> > These are not always straightforward to avoid. There's no way to tell
> (GNU)
> > grep to truncate its output; perhaps Emacs could help here, by being able
> > to specify a maximum length of match to show? For bonus points, show part
> > of the line that matches, with ellipses, rather than just truncating the
> > line; but even without that it would be useful, provided that the
> > truncation is clearly marked: the annoyance and slowness of navigating
> > *grep* buffers full of enormous matches which are almost always not what
> > one is looking for would be great!
>
> FWIW, I have the following in my ~/.emacs:
>
> (defun sm-compilation-mode-hook ()
> (setq truncate-lines t))
> (add-hook 'compilation-mode-hook #'sm-compilation-mode-hook)
>
That's ingenious, obvious, and thanks very muchious.
--
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18209
; Package
emacs
.
(Wed, 12 Aug 2020 18:40:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 18209 <at> debbugs.gnu.org (full text, mbox):
Reuben Thomas <rrt <at> sc3d.org> writes:
> On 6 August 2014 18:44, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>
> >>>>> "Reuben" == Reuben Thomas <rrt <at> sc3d.org> writes:
>
> > In some files (e.g. in text files using newline as a paragraph delimiter)
> > one can get matches in very long lines that can occupy several screenfuls.
> > These are not always straightforward to avoid. There's no way to tell (GNU)
> > grep to truncate its output; perhaps Emacs could help here, by being able
> > to specify a maximum length of match to show? For bonus points, show part
> > of the line that matches, with ellipses, rather than just truncating the
> > line; but even without that it would be useful, provided that the
> > truncation is clearly marked: the annoyance and slowness of navigating
> > *grep* buffers full of enormous matches which are almost always not what
> > one is looking for would be great!
>
> FWIW, I have the following in my ~/.emacs:
>
> (defun sm-compilation-mode-hook ()
> (setq truncate-lines t))
> (add-hook 'compilation-mode-hook #'sm-compilation-mode-hook)
>
> That's ingenious, obvious, and thanks very muchious.
Did that resolve the problem, or is there anything more to do here?
Best regards,
Stefan Kangas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18209
; Package
emacs
.
(Wed, 12 Aug 2020 18:44:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 18209 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
That worked, thanks!
--
https://rrt.sc3d.org
On Wed, 12 Aug 2020, 19:39 Stefan Kangas, <stefan <at> marxist.se> wrote:
> Reuben Thomas <rrt <at> sc3d.org> writes:
>
> > On 6 August 2014 18:44, Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
> >
> > >>>>> "Reuben" == Reuben Thomas <rrt <at> sc3d.org> writes:
> >
> > > In some files (e.g. in text files using newline as a paragraph
> delimiter)
> > > one can get matches in very long lines that can occupy several
> screenfuls.
> > > These are not always straightforward to avoid. There's no way to tell
> (GNU)
> > > grep to truncate its output; perhaps Emacs could help here, by being
> able
> > > to specify a maximum length of match to show? For bonus points, show
> part
> > > of the line that matches, with ellipses, rather than just truncating
> the
> > > line; but even without that it would be useful, provided that the
> > > truncation is clearly marked: the annoyance and slowness of navigating
> > > *grep* buffers full of enormous matches which are almost always not
> what
> > > one is looking for would be great!
> >
> > FWIW, I have the following in my ~/.emacs:
> >
> > (defun sm-compilation-mode-hook ()
> > (setq truncate-lines t))
> > (add-hook 'compilation-mode-hook #'sm-compilation-mode-hook)
> >
> > That's ingenious, obvious, and thanks very muchious.
>
> Did that resolve the problem, or is there anything more to do here?
>
> Best regards,
> Stefan Kangas
>
[Message part 2 (text/html, inline)]
Reply sent
to
Stefan Kangas <stefan <at> marxist.se>
:
You have taken responsibility.
(Wed, 12 Aug 2020 18:52:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Reuben Thomas <rrt <at> sc3d.org>
:
bug acknowledged by developer.
(Wed, 12 Aug 2020 18:52:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 18209-done <at> debbugs.gnu.org (full text, mbox):
Reuben Thomas <rrt <at> sc3d.org> writes:
> That worked, thanks!
Thanks! Closing.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 10 Sep 2020 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 222 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.