Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DF68E4196F3 for ; Fri, 23 Apr 2010 12:07:22 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.89 X-Spam-Level: X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id INvYA0TJjAs7; Fri, 23 Apr 2010 12:07:22 -0700 (PDT) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E2F9F431FC1; Fri, 23 Apr 2010 12:07:21 -0700 (PDT) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 94E94568DE9; Fri, 23 Apr 2010 12:07:21 -0700 (PDT) From: Carl Worth To: Michal Sojka Subject: Re: [PATCH 1/2] Add 'cat' subcommand In-Reply-To: <871ve8ng8x.fsf@steelpick.2x.cz> References: <1271747793-17507-1-git-send-email-sojkam1@fel.cvut.cz> <87pr1u7fnu.fsf@ut.hh.sledj.net> <87fx2qmtok.fsf@SSpaeth.de> <4BCD7EA0.3080505@fel.cvut.cz> <871ve8wc30.fsf@yoom.home.cworth.org> <871ve8ng8x.fsf@steelpick.2x.cz> Date: Fri, 23 Apr 2010 12:07:21 -0700 Message-ID: <87k4ryf0nq.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2010 19:07:23 -0000 --=-=-= On Thu, 22 Apr 2010 08:38:54 +0200, Michal Sojka wrote: > If a filename:dir/file term is present in the query, it will be > necessary to first query the database for directory:dir to find the > and then put in the query > file-direntry::file. This conversion is already > implemented in _notmuch_database_filename_to_direntry(). Right? Yes. > _notmuch_database_filename_to_direntry() requires writable database as > it creates the directory document if it doesn't exist. This is probably > not what we want for filename: queries - if the user types the filename > incorrectly, the nonexisting directory document could be added to the > database. So I think that _notmuch_database_find_directory_id() should > be modified to not modify the database. The directory documents should > be created somewhere else in notmuch new path. Do you agree? Yes. Good job anticipating that failure mode before we ran into it. -Carl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFL0e/p6JDdNq8qSWgRAhyqAJ0bRTkCp1+YFpCjpRGJ88GcZk0KqgCgniSg h4hzwyDn+0PUHi5b0f+i0sg= =rd1G -----END PGP SIGNATURE----- --=-=-=--