GNU bug report logs - #24451
grep -Tn misbehaves under Emacs shell

Previous Next

Package: grep;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Fri, 16 Sep 2016 20:11:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Subject: bug#24451: closed (Re: grep -Tn misbehaves under Emacs shell)
Date: Sat, 19 Nov 2016 10:53:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#24451: grep -Tn misbehaves under Emacs shell

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 24451 <at> debbugs.gnu.org.

-- 
24451: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24451
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 24451-done <at> debbugs.gnu.org
Subject: Re: grep -Tn misbehaves under Emacs shell
Date: Sat, 19 Nov 2016 02:52:31 -0800
No further comment, and I merged and installed the patches and am closing this 
bug report.

[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: bug-grep <at> gnu.org
Subject: grep -Tn misbehaves under Emacs shell
Date: Fri, 16 Sep 2016 13:07:45 -0700
[Message part 4 (text/plain, inline)]
Tags: patch

While looking into something else I noticed that 'grep -T' does not work 
under an Emacs shell window. grep outputs tab-backspace-':'-C to align C 
to the next tab stop, but under Emacs the backspace undoes the tab and 
so the output is not aligned. Arguably this is a problem with Emacs, but 
even if Emacs were changed the grep approach is not portable: Vim 
displays "^H:" instead, for example, and this also breaks alignment. 
grep should use a tab character to go to the next tab stop; this is more 
reliable and is simpler.

While in the neighborhood I noticed that -Tn alignment does not work for 
files that are sufficiently large (10,000 lines, say). Plus, nowadays we 
can rely on PRIuMAX to simplify printf.

Proposed patches attached. Normally I'd just install this sort of thing, 
but since we have a release candidate out I thought I'd ask first.

[0001-grep-simplify-by-using-PRIuMAX.patch (application/x-patch, attachment)]
[0002-grep-T-no-longer-outputs-BS.patch (application/x-patch, attachment)]
[0003-grep-T-now-adjusts-number-widths-for-worst-case.patch (application/x-patch, attachment)]

This bug report was last modified 8 years and 240 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.