From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#18209: Add ability to truncate long grep matches Date: Wed, 12 Aug 2020 11:39:13 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21608"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , 18209@debbugs.gnu.org To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 12 20:40:38 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5vfx-0005TD-Oa for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 20:40:37 +0200 Original-Received: from localhost ([::1]:43622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5vfw-0005Ah-Oj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 14:40:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5vfO-0004Ny-SV for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 14:40:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5vfO-00034X-EW for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 14:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k5vfO-0007aC-BF for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 14:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Aug 2020 18:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18209 X-GNU-PR-Package: emacs Original-Received: via spool by 18209-submit@debbugs.gnu.org id=B18209.159725756429039 (code B ref 18209); Wed, 12 Aug 2020 18:40:02 +0000 Original-Received: (at 18209) by debbugs.gnu.org; 12 Aug 2020 18:39:24 +0000 Original-Received: from localhost ([127.0.0.1]:45513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5vel-0007YJ-Q4 for submit@debbugs.gnu.org; Wed, 12 Aug 2020 14:39:24 -0400 Original-Received: from mail-yb1-f173.google.com ([209.85.219.173]:41548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5veh-0007Y0-Nq for 18209@debbugs.gnu.org; Wed, 12 Aug 2020 14:39:23 -0400 Original-Received: by mail-yb1-f173.google.com with SMTP id s195so1896065ybc.8 for <18209@debbugs.gnu.org>; Wed, 12 Aug 2020 11:39:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=EeYnKx+ADwgQ7xVwvxEXQgmqXct/hguqYKkXnsohVYw=; b=Iq+geyMI3IGoA+WGBceno6otbWfmNQnYDNsFZssZryoN/i4aG5zvOfIJe3MtU+xP3z vFP/ezhjEqDwL99A0zI908OXHJUGYpHbMUp2q91hXZ79UAs72qmG7EPJxDXQ1jGzT/9A cwRUYDOXjZ0xHSQHZBzUKIUYBRdgcxTwef1XS06YpAyFpYLip7NPYGdLpPuov4tZgjCX RlkoymdXVyzrBmE+/Q6Wasw9/JZLbrxtTvqiyCoMYpzmOG9HqIfSekoQlWc8xfIwUaJo 2bLjb1T3gcDUK0vWeEerXaBH6QDbPakgGDTeSCNoQJ4RjE1YcsObP9gG4hwGEI8JhV+R uYMQ== X-Gm-Message-State: AOAM531FqHbQNy16n0+LmlXkOXpXm5qGYaA+/3smdDwPi5UBIMpjm8QV f9AnVmv59mvzbyFqLX1xos97SM4nnH2qfvUqfkg= X-Google-Smtp-Source: ABdhPJz8K3YmPZOo0eTsGkuHbPIVi+bgz+CqRD0Jn5f3XyGm9d1ODDBNtNcmvva9GzQBXeSHPAs+DM5JOc8UHcwzYeM= X-Received: by 2002:a25:b88b:: with SMTP id w11mr1078319ybj.129.1597257554211; Wed, 12 Aug 2020 11:39:14 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 12 Aug 2020 11:39:13 -0700 In-Reply-To: (Reuben Thomas's message of "Wed, 6 Aug 2014 18:47:48 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:184856 Archived-At: Reuben Thomas writes: > On 6 August 2014 18:44, Stefan Monnier wrote: > > >>>>> "Reuben" == Reuben Thomas 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