From: Reuben Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 18209@debbugs.gnu.org
Subject: bug#18209: Add ability to truncate long grep matches
Date: Wed, 12 Aug 2020 19:43:29 +0100 [thread overview]
Message-ID: <CAOnWdoj16e3NvyVko8b5cd7tbGUQ_mmB1pGVR7vfnRm5vb=iSw@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmmtiLXTu1MSFy-OJLKwWEV+b4jL50sFSWg+3MigDgNjVg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1451 bytes --]
That worked, thanks!
--
https://rrt.sc3d.org
On Wed, 12 Aug 2020, 19:39 Stefan Kangas, <stefan@marxist.se> wrote:
> Reuben Thomas <rrt@sc3d.org> writes:
>
> > On 6 August 2014 18:44, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> >
> > >>>>> "Reuben" == Reuben Thomas <rrt@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
>
[-- Attachment #2: Type: text/html, Size: 2262 bytes --]
next prev parent reply other threads:[~2020-08-12 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 11:52 bug#18209: Add ability to truncate long grep matches Reuben Thomas
2014-08-06 17:44 ` Stefan Monnier
2014-08-06 17:47 ` Reuben Thomas
2020-08-12 18:39 ` Stefan Kangas
2020-08-12 18:43 ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2020-08-12 18:50 ` Stefan Kangas
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='CAOnWdoj16e3NvyVko8b5cd7tbGUQ_mmB1pGVR7vfnRm5vb=iSw@mail.gmail.com' \
--to=bug-gnu-emacs@gnu.org \
--cc=18209@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rrt@sc3d.org \
--cc=stefan@marxist.se \
/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.