[PATCH] python: bind add_property/remove_property and related methods

VA dev+notmuch at indigo.re
Fri Jun 14 13:34:16 PDT 2019


Le 11/06/2019 à 11:31, Daniel Kahn Gillmor a écrit :
> That makes sense -- we'd also want to encourage projects to note their
> project name someplace central; having a namespace registry helps to
> avoid collisions, and also helps to advertise the projects that derive
> from notmuch :)
> 
> maybe update the wiki for that?

The wiki would serve to advertise each projects interests, and if some 
other project has a common interest, they could get together to 
standardize it in the interest of both projects?

> Maybe that
> happens only when the feature gets added to libnotmuch itself?

IMHO, libnotmuch should stay focused on the core: indexing and tagging, 
avoid becoming bloated by staying minimal, doing one thing well. Else, 
it would not deserve the "notmuch" name anymore!

However, maybe this could be in some extras, maybe a separate 
notmuch-extensions library.

> How do
> we incentivize projects into getting that kind of widely-useful feature
> into the libnotmuch mainstream instead of having it as a differentiating
> factor for their specific MUA?
> 
> how should we think about managing these parts of the ecosystem?

I'm too new to libnotmuch to answer, maybe other people have an opinion?

>> I'm writing a MUA, and am using properties to store an excerpt of each
>> message, so the MUA can show a preview of each message (like the Gmail
>> web app, or Apple mail client).
> 
> cool, this sounds super useful.  if you have a chance to write up how
> you're generating/selecting this extract, i'd love to read more.

For messages with a plain text part, I'm taking the first 100 chars. If 
there's no plain text part but an HTML part, I'm using some random 
html2text library (https://github.com/Alir3z4/html2text) and take the 
first 100 chars.

>> I took the documentation from notmuch.h but only edited to be consistent
>> with Python. Those warnings should also be added in notmuch.h, right?
> 
> Yeah, that's probably a good idea.  Is it asking too much to ask you to
> update notmuch.h as well when you resubmit this series?

Here's what we could add:

As a general rule, an application MUST prefix their own property names 
with "x-<project>-". It is recommended to report an application's 
properties on the notmuch wiki, to open collaboration with other 
projects having common use cases, ultimately opening to standardization 
outside a project's namespace.


More information about the notmuch mailing list