unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: Anthony Towns <aj@erisian.com.au>, Dirk Hohndel <hohndel@infradead.org>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH 1/2] Add 'cat' subcommand
Date: Thu, 22 Apr 2010 08:57:55 +0200	[thread overview]
Message-ID: <87zl0wm0ss.fsf@steelpick.2x.cz> (raw)
In-Reply-To: <w2w87b3a4191004212013r8d410ca6u5c0651d3ee74aa7@mail.gmail.com>

On Thu, 22 Apr 2010, Anthony Towns wrote:
> On Thu, Apr 22, 2010 at 12:37, Dirk Hohndel <hohndel@infradead.org> wrote:
> > On Wed, 21 Apr 2010 17:44:03 -0700, Carl Worth <cworth@cworth.org> wrote:
> >> So I'd prefer to have this command behave just like all others and use
> >> the same naming.
> >>       filename:/complete/path/to/file
> 
> Would "notmuch cat" be any different to "notmuch show" in this case?
> What happens if you say "notmuch cat something" and multiple messages
> match (eg, an id: for a mail that you both sent (Mail/.sent/cur/12345)
> and received (Mail/.Lists.notmuch/cur/12346))?
> 
> Maybe notmuch show should be able to deal with all these things, and
> notmuch cat could be an alias for something like:
> 
>     notmuch show --format=mbox --show-duplicate-files $SPEC

I think this was discussed earlier with part subcommand and the result
was that "part" should become a part of show. The same probably applies
to the cat subcommand.

I don't think that --format=mbox is the right thing to do. A simple

    grep -R '^From[^:]' ~/mail

shows that I have many messages where "From" is present in the body at
the beginning of the line so it would have to be escaped and all the
tools dealing with this output need to de-escape it.

I think that --format=raw is better and this command should fail if the
query produces more than one message.

> Otherwise, wouldn't you be better off just having this be something
> for the database::path setting in .notmuch-config? So you say:
> 
>    [database]
>    path=/home/aj/Mail
> 
> or
> 
>    [database]
>    path=/home/aj/Mail/.git
>    format=git

This is something similar to what I have implemented in
id:1270737766-29237-1-git-send-email-sojkam1@fel.cvut.cz. Carl doesn't
want to merge it in its current form so I'm extracting some features
from it and sending them separately.

-Michal

  reply	other threads:[~2010-04-22  6:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-20  7:16 [PATCH 1/2] Add 'cat' subcommand Michal Sojka
2010-04-20  7:16 ` [PATCH 2/2] emacs: Access raw messages through cat subcommand Michal Sojka
2010-04-20  7:21 ` [PATCH 1/2] Add 'cat' subcommand David Edmondson
2010-04-20  8:09   ` Sebastian Spaeth
2010-04-20 10:14     ` Michal Sojka
2010-04-20 10:53       ` David Edmondson
2010-04-20 11:13         ` Michal Sojka
2010-04-20 11:30           ` David Edmondson
2010-04-20 13:32       ` Jameson Rollins
2010-04-22  0:44       ` Carl Worth
2010-04-22  2:37         ` Dirk Hohndel
2010-04-22  3:13           ` Anthony Towns
2010-04-22  6:57             ` Michal Sojka [this message]
2010-04-22  6:38         ` Michal Sojka
2010-04-23 19:07           ` Carl Worth
  -- strict thread matches above, loose matches on Subject: below --
2010-10-22  9:28 [PATCH 0/2] Notmuch cat v2 Michal Sojka
2010-10-22  9:28 ` [PATCH 1/2] Add 'cat' subcommand Michal Sojka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zl0wm0ss.fsf@steelpick.2x.cz \
    --to=sojkam1@fel.cvut.cz \
    --cc=aj@erisian.com.au \
    --cc=hohndel@infradead.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).