git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] send-email: Fix Pine address book parsing

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 26, 2008, 06:44 UTC
Message-ID
<7vy6z7gf4x.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0811252137250.5161@t2.domain.actdsltmp>
Trent Piepho <tpiepho@freescale.com> writes:
> The tech docs I linked to just say pine continues lines with leading space,
> but not how many spaces exactly.

My reading of the wording "spaces" it uses is that any number. I agree it is underspecified what would happen to them.

Show 5 quoted lines
> It also appears to only split lines between whitespace and
> non-whitespace. ...
> ... like "a b \n   c \n   d\n".  If I didn't eat the leading spaces in the
> continuations, it would be re-assembled as "a b    c    d".  This might cause
> an address to become "John     Doe <jdoe@anon.org>"

Which would still work. If you had two addresses a and b and smashed them together into ab on the other hand it wouldn't. That is why I asked.

If you know for sure (e.g. by reading the Pine source) that it only splits a line at a whitespace to non-whitespace transition, that it keeps the whitespace at the end of the first line, and that the non-whitespace and everything after that on the second line (prefixed by extra unspecified number of spaces as the continuation sign), then I think what you had in your patch is exactly what we want. I just wanted to make sure you know what you are doing, as I do not use Pine nor its address book myself.

Previous: Trent PiephoNext: Trent Piepho
Message 4 of 6 in “send-email: Fix Pine address book parsing”
  1. send-email: Fix Pine address book parsingTrent Piepho, Nov 26, 2008
  2. Junio C HamanoNov 26, 2008
  3. Trent PiephoNov 26, 2008
  4. Junio C HamanoNov 26, 2008
  5. Trent PiephoNov 26, 2008
  6. Junio C HamanoNov 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.