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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24451 in the body.
You can then email your comments to 24451 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#24451; Package grep. (Fri, 16 Sep 2016 20:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Eggert <eggert <at> cs.ucla.edu>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Fri, 16 Sep 2016 20:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

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 1 (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)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 19 Nov 2016 10:53:02 GMT) Full text and rfc822 format available.

Notification sent to Paul Eggert <eggert <at> cs.ucla.edu>:
bug acknowledged by developer. (Sat, 19 Nov 2016 10:53:02 GMT) Full text and rfc822 format available.

Message #10 received at 24451-done <at> debbugs.gnu.org (full text, mbox):

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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 17 Dec 2016 12:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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