Debian Bug report logs - #268744
nmh: pick(1) Has Trouble with Multi-Line Subjects.

version graph

Package: nmh; Maintainer for nmh is Nick Rusnov <nickrusnov@debian.org>; Source for nmh is src:nmh.

Reported by: Ralph Corderoy <ralph@inputplus.co.uk>

Date: Sat, 28 Aug 2004 21:48:08 UTC

Severity: minor

Found in version 1.0.4+dev-20010317-1

Forwarded to https://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=15215

Reply or subscribe to this bug.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Nick Rusnov <nickrusnov@debian.org>:
Bug#268744; Package nmh. Full text and rfc822 format available.

Acknowledgement sent to Ralph Corderoy <ralph@inputplus.co.uk>:
New Bug report received and forwarded. Copy sent to Nick Rusnov <nickrusnov@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Ralph Corderoy <ralph@inputplus.co.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: nmh: pick(1) Has Trouble with Multi-Line Subjects.
Date: Sat, 28 Aug 2004 22:43:06 +0100
Package: nmh
Version: 1.0.4+dev-20010317-1
Severity: normal
File: /usr/bin/mh/pick

pick(1) says

    Pattern matching is performed on a per-line basis.  Within the
    header of the message, each component is treated as one long line,
    but in the body, each line is separate. Lower-case letters in the
    search pattern will match either lower or upper case in the message,
    while upper case will match only upper case.

yet I can't match the split line in a long subject.

    $ scan -format '%{subject}\n'  
    foo bar
    $ scan -format '%{subject}\n' | od -c
    0000000   f   o   o       b   a   r  \n
    0000010
    $ grep -1 '^Subject' `mhpath 1`
    To: ralph@inputplus.co.uk
    Subject: foo
     bar
    $ pick -sub foo  
    1
    $ pick -sub bar
    1
    $ pick -sub 'foo bar'
    pick: no messages match specification
    $ pick -sub 'foo.bar'
    pick: no messages match specification
    $ pick -sub 'foo^Mbar'
    pick: no messages match specification
    $ pick -sub 'foo
    bar'
    pick: no messages match specification
    $ pick -sub 'foo
     bar'
    pick: no messages match specification

I can find `foo' or `bar' so the subject is being treated as one long
line, as the man page says, but what are the lines being joined with?
The search clearly works across both lines since these two both work.

    $ pick -sub 'f.*o'
    1
    $ pick -sub 'f.*r'
    1

I'd expect it to be a space unless the man page says otherwise.

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux dayna 2.4.18-dayna.2.6 #1 Sun Jul 4 11:06:01 BST 2004 i686
Locale: LANG=C, LC_CTYPE=

Versions of packages nmh depends on:
ii  base-files                  3.0.2        Debian base system miscellaneous f
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an
ii  liblockfile1                1.03         NFS-safe locking library, includes
ii  libncurses5                 5.4-4        Shared libraries for terminal hand
ii  libsasl7                    1.5.27-3     Authentication abstraction library
ii  netbase                     4.07         Basic TCP/IP networking system




Information forwarded to debian-bugs-dist@lists.debian.org, Nick Rusnov <nickrusnov@debian.org>:
Bug#268744; Package nmh. Full text and rfc822 format available.

Acknowledgement sent to Harald Geyer <Harald.Geyer@gmx.at>:
Extra info received and forwarded to list. Copy sent to Nick Rusnov <nickrusnov@debian.org>. Full text and rfc822 format available.

Message #10 received at 268744@bugs.debian.org (full text, mbox):

From: Harald Geyer <Harald.Geyer@gmx.at>
To: 268744@bugs.debian.org, ralph@inputplus.co.uk, control@bugs.debian.org
Subject: nmh: pick: Handling of Multi-Line Subjects
Date: Thu, 23 Sep 2004 12:06:59 +0200
severity 268744 minor
stop

Hi!

I tried pick on the following file:

---
To: ralph@inputplus.co.uk
Subject: foo
 bar

Test.
---

$ pick -sub 'foo..bar'
1
$ pick -sub 'foo  bar'
1

Then adding a second space in front of "bar":

$ pick -sub 'foo..bar'
pick: no messages match specification
$ pick -sub 'foo  bar'
pick: no messages match specification
$ pick -sub 'foo...bar'
1
$ pick -sub 'foo   bar'
1

Obviously lines are joined by one space, but all other whitespace
is preserved. This is bad, because the indentation can be any number
of spaces and/or tabs IIRC.

However almost always exactly one character is used. Also it is easy to
write some general regexp, if needed. I set the severity of this bug
to minor, as it is really easy to workaround.

Harald




Severity set to `minor'. Request was from Harald Geyer <Harald.Geyer@gmx.at> to control@bugs.debian.org. Full text and rfc822 format available.

Noted your statement that Bug has been forwarded to https://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=15215. Request was from pmaydell@chiark.greenend.org.uk to control@bugs.debian.org. Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue Feb 9 19:45:30 2010; Machine Name: busoni.debian.org

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