From: Gaute Hope <eg@gaute.vetsj.com>
To: Floris Bruynooghe <flub@devork.be>
Cc: notmuch <notmuch@notmuchmail.org>
Subject: Re: Python3 cffi bindings
Date: Sun, 17 Nov 2019 19:01:14 +0100 [thread overview]
Message-ID: <CABKe4Mtnm99PSfRqttrLKtnaUZu6SrDJHvgRP9S4mLRXr=1_0Q@mail.gmail.com> (raw)
In-Reply-To: <87y2wepgq8.fsf@powell.devork.be>
On Sun, Nov 17, 2019 at 6:14 PM Floris Bruynooghe <flub@devork.be> wrote:
>
> Hi Gaute,
>
> Thanks for trying this out!
>
> On Mon 04 Nov 2019 at 11:27 +0100, Gaute Hope wrote:
> > I just checked out the wip/cffi branch on git.notmuch.org with the
> > purpose of porting Lieer (https://github.com/gauteh/lieer). There
> > seems to be some missing functionality: `Database.get_directory()`
> > specifically.
>
> Yeah, I didn't add that yet because I don't fully understand how it
> should be used. Specifically I don't know where one might get a
> pathname from to pass to .get_directory() and thus whether the API would
> be cleaner to just return a reasonable directory object from whatever
> location that might be. Maybe notmuch_database_get_path() is the only
> entrypoint here and you can get further by listing files and directories
> from it? But maybe people then use the filesystem directly to find a
> directory and create the directories ad-hoc.
If I understand correctly then these are the directories known to
notmuch db, so may not correspond to filesystem. Lieer do not modify
Directory objects directly, but others might.
> I grepped lieer but I think you only use it in one place? And if I
> understand it correctly you only do this to check if your mailstore/cwd
> is inside the notmuch database. I.e. this is equivalent to checking if
> your mailstore/cwd has notmuch2.Database.path as prefix which you could
> easily do directly rather than using the FileError exception from
> .get_directory().
Yes, I think that would work here. I need the path of the directory
later (for the path:.. query). Seems that the current python API
removes the leading path of the database for the argument to
notmuch_database_get_directory(..) -- at least if the notmuch API docs
are correct. I had some reported issues with symlinked directories and
absolute paths, but I don't think any of that would be influenced by
changes like these.
Regards, Gaute
next prev parent reply other threads:[~2019-11-17 18:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 21:03 Python3 cffi bindings Floris Bruynooghe
2019-10-08 21:03 ` [PATCH] Introduce CFFI-based python bindings Floris Bruynooghe
2019-10-08 22:24 ` Python3 cffi bindings David Bremner
2019-10-09 18:34 ` Floris Bruynooghe
2019-10-14 12:40 ` David Bremner
2019-10-14 12:42 ` David Bremner
2019-10-17 17:35 ` Floris Bruynooghe
2019-10-20 12:22 ` David Bremner
2019-10-22 16:32 ` David Bremner
2019-10-25 9:57 ` Floris Bruynooghe
2019-11-04 10:27 ` Gaute Hope
2019-11-16 16:44 ` David Bremner
2019-12-04 20:18 ` Tomi Ollila
2019-11-17 17:14 ` Floris Bruynooghe
2019-11-17 18:01 ` Gaute Hope [this message]
2020-10-08 8:13 ` Gaute Hope
2020-10-14 20:23 ` Floris Bruynooghe
2020-10-16 7:19 ` Gaute Hope
2020-10-16 7:24 ` Gaute Hope
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='CABKe4Mtnm99PSfRqttrLKtnaUZu6SrDJHvgRP9S4mLRXr=1_0Q@mail.gmail.com' \
--to=eg@gaute.vetsj.com \
--cc=flub@devork.be \
--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).