* Replacing my name/email with "me" (or similar) in author lists @ 2012-02-25 16:34 Daniel 2012-02-26 11:22 ` Patrick Totzke 0 siblings, 1 reply; 10+ messages in thread From: Daniel @ 2012-02-25 16:34 UTC (permalink / raw) To: notmuch Have somebody tried to implement replacement of the user author with "me" in author lists (using defined email address(es))? From what I understand, at least the Python bindings deliver primarily author names (not addresses), so it would seem more appropriate that this be done in the backend. But I don't know much about the backend, and have so far only played with the client Alot. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-25 16:34 Replacing my name/email with "me" (or similar) in author lists Daniel @ 2012-02-26 11:22 ` Patrick Totzke 2012-02-26 16:41 ` Daniel Schoepe 0 siblings, 1 reply; 10+ messages in thread From: Patrick Totzke @ 2012-02-26 11:22 UTC (permalink / raw) To: Daniel, notmuch Quoting Daniel (2012-02-25 16:34:15) From what I understand, at least the Python bindings deliver primarily author >names (not addresses), To clarify, `notmuch.Thread.get_authors` returns a comma separated list of the realname parts of all From-headers that occur in messages of this thread. > so it would seem more appropriate that this be done in the backend. I agree. I personally think this is a nice feature to have in all user interfaces to notmuch and therefore it makes sense to implement it once in the lib. Also because ~/.notmuch-config already contains a list of my addresses and therefore should have all information needed. Implementing this feature for alot in python is easily doable, by constructing the authors list from the messages From headers directly, comparing the address part with all known own addresses. We will do so if the response here is all too negative or nobody is brave enough to step forward and touch the lib in this respect. If I'm not mistaken, the lib extracts the authors name from the From-header of a message, which is indexed. Somewhere around line 248 in thread.cc, this string is added to a list of names. Cheers, /p ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-26 11:22 ` Patrick Totzke @ 2012-02-26 16:41 ` Daniel Schoepe 2012-02-26 16:51 ` David Bremner 0 siblings, 1 reply; 10+ messages in thread From: Daniel Schoepe @ 2012-02-26 16:41 UTC (permalink / raw) To: Patrick Totzke, Daniel, notmuch [-- Attachment #1: Type: text/plain, Size: 1162 bytes --] On Sun, 26 Feb 2012 11:22:10 +0000, Patrick Totzke <patricktotzke@googlemail.com> wrote: > > so it would seem more appropriate that this be done in the backend. > I agree. I personally think this is a nice feature to have in all > user interfaces to notmuch and therefore it makes sense to implement it once > in the lib. Also because ~/.notmuch-config already contains a list of my addresses > and therefore should have all information needed. I'm not sure if that's a good idea: A frontend might want to make this configurable, for example to give the user the opportunity to disable it (possibly to see to which of his mail adresses he used in that thread, if they have different real name components). It might also get tricky to distinguish between someone called "me" participating in the thread and the user, which might be relevant for highlighting the latter case differently, while it's rather easy for a frontend to do the transformation itself. At least it should not be done in the library, because it'd need to read the user's addresses from configuration file which the library is not supposed to access, as far as I understand. Cheers, Daniel [-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-26 16:41 ` Daniel Schoepe @ 2012-02-26 16:51 ` David Bremner 2012-02-26 21:59 ` Tom Prince 0 siblings, 1 reply; 10+ messages in thread From: David Bremner @ 2012-02-26 16:51 UTC (permalink / raw) To: Daniel Schoepe, notmuch On Sun, 26 Feb 2012 17:41:04 +0100, Daniel Schoepe <daniel@schoepe.org> wrote: > > At least it should not be done in the library, because it'd need to read > the user's addresses from configuration file which the library is not > supposed to access, as far as I understand. > One can work around this by passing in the relevant configuration data, but then it isn't clear how much of a win it is in code complexity. I have sometimes wondered about having another library layer making some of the current CLI functionality accessible to bindings. I'm not really sure of the pro's and con's of such approach. It would certainly be overkill for this one feature. d ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-26 16:51 ` David Bremner @ 2012-02-26 21:59 ` Tom Prince 2012-02-29 15:05 ` Jesse Rosenthal 0 siblings, 1 reply; 10+ messages in thread From: Tom Prince @ 2012-02-26 21:59 UTC (permalink / raw) To: David Bremner, Notmuch Mail On Sun, 26 Feb 2012 12:51:49 -0400, David Bremner <david@tethera.net> wrote: > I have sometimes wondered about having another library layer making some > of the current CLI functionality accessible to bindings. I'm not really > sure of the pro's and con's of such approach. It would certainly be > overkill for this one feature. It is probably overkill for any one feature, but it does seem like something useful to have. So maybe it would be worthwhile to create for this one feature, even it it is overkill. Tom ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-26 21:59 ` Tom Prince @ 2012-02-29 15:05 ` Jesse Rosenthal 2012-02-29 15:36 ` Austin Clements 0 siblings, 1 reply; 10+ messages in thread From: Jesse Rosenthal @ 2012-02-29 15:05 UTC (permalink / raw) To: Tom Prince, David Bremner, Notmuch Mail On Sun, 26 Feb 2012 16:59:53 -0500, Tom Prince <tom.prince@ualberta.net> wrote: > It is probably overkill for any one feature, but it does seem like > something useful to have. So maybe it would be worthwhile to create > for this one feature, even it it is overkill. I can think of other features where some layer like this would be useful. It would be great, for example, if it were possible to output search lines with recipients instead of senders, for the purposes of a "tag:sent" sort of window. (I actually have my own cobbled-together python thing which, connected with my other cobbled-together python remote thing, intercepts search calls for that tag and gives me a search view with non-me recipients. But obviously, as much as I love cobbling, it would be even better not to have to do that.) Best, Jesse ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-29 15:05 ` Jesse Rosenthal @ 2012-02-29 15:36 ` Austin Clements 2012-02-29 15:50 ` Jesse Rosenthal 0 siblings, 1 reply; 10+ messages in thread From: Austin Clements @ 2012-02-29 15:36 UTC (permalink / raw) To: Jesse Rosenthal; +Cc: Notmuch Mail Quoth Jesse Rosenthal on Feb 29 at 10:05 am: > On Sun, 26 Feb 2012 16:59:53 -0500, Tom Prince <tom.prince@ualberta.net> wrote: > > It is probably overkill for any one feature, but it does seem like > > something useful to have. So maybe it would be worthwhile to create > > for this one feature, even it it is overkill. > > I can think of other features where some layer like this would be > useful. It would be great, for example, if it were possible to output > search lines with recipients instead of senders, for the purposes of a > "tag:sent" sort of window. What if the output of search (say, specifically the JSON format) included information on each message in the thread such as the 'message' production from devel/schemata minus the body field? Then the frontend would have loads of information it could produce its own summaries from. (Plus, with a little tweaking, I don't think this would be any more expensive than producing the current notmuch search summary output.) ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-29 15:36 ` Austin Clements @ 2012-02-29 15:50 ` Jesse Rosenthal 2012-02-29 22:47 ` Austin Clements 0 siblings, 1 reply; 10+ messages in thread From: Jesse Rosenthal @ 2012-02-29 15:50 UTC (permalink / raw) To: Austin Clements; +Cc: Notmuch Mail On Wed, 29 Feb 2012 10:36:57 -0500, Austin Clements <amdragon@MIT.EDU> wrote: > What if the output of search (say, specifically the JSON format) > included information on each message in the thread such as the > 'message' production from devel/schemata minus the body field? Then > the frontend would have loads of information it could produce its own > summaries from. (Plus, with a little tweaking, I don't think this > would be any more expensive than producing the current notmuch search > summary output.) I was hoping for something like that when I started fiddling. But it's still going to end up being a library question, because notmuch-search.c, is tied pretty tightly to the lib: i.e. it uses functions like `notmuch_thread_get_authors (thread)'. I was using the python bindings, and I ended up having to make a second query off the thread id (I could have recursed through the messages too, I suppose). So I guess what I'm saying is that what you're suggesting sounds great, but we'd still have to either (a) add new library functions (`notmuch_thread_get_recipients', `notmuch_thread_abbrev_me'), (b) keep them all in the client and make pazz and scripters recreate them, or (c) play around in the sort of client-library space that it sounded like Bremner was suggesting. Best, Jesse ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-29 15:50 ` Jesse Rosenthal @ 2012-02-29 22:47 ` Austin Clements 2012-03-01 14:28 ` Jesse Rosenthal 0 siblings, 1 reply; 10+ messages in thread From: Austin Clements @ 2012-02-29 22:47 UTC (permalink / raw) To: Jesse Rosenthal; +Cc: Notmuch Mail On Wed, 29 Feb 2012 10:50:46 -0500, Jesse Rosenthal <jrosenthal@jhu.edu> wrote: > On Wed, 29 Feb 2012 10:36:57 -0500, Austin Clements <amdragon@MIT.EDU> wrote: > > What if the output of search (say, specifically the JSON format) > > included information on each message in the thread such as the > > 'message' production from devel/schemata minus the body field? Then > > the frontend would have loads of information it could produce its own > > summaries from. (Plus, with a little tweaking, I don't think this > > would be any more expensive than producing the current notmuch search > > summary output.) > > I was hoping for something like that when I started fiddling. But it's > still going to end up being a library question, because > notmuch-search.c, is tied pretty tightly to the lib: i.e. it uses > functions like `notmuch_thread_get_authors (thread)'. I was using the > python bindings, and I ended up having to make a second query off the > thread id (I could have recursed through the messages too, I suppose). > > So I guess what I'm saying is that what you're suggesting sounds great, > but we'd still have to either (a) add new library functions > (`notmuch_thread_get_recipients', `notmuch_thread_abbrev_me'), (b) keep > them all in the client and make pazz and scripters recreate them, or (c) > play around in the sort of client-library space that it sounded like > Bremner was suggesting. I was suggesting just using notmuch_thread_get_toplevel_messages in search (essentially, mixing a bit of show into search). No library changes necessary. It may still be useful to have a collection of *utilities* that could be reused in bindings; basically, things that currently live in the CLI but could be broken out. These should live outside of libnotmuch proper. My concern would be what we put in such a library. Currently, the CLI's internal architecture is quite agile, but as soon as you put some of that in a library, you have a library interface to support. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Replacing my name/email with "me" (or similar) in author lists 2012-02-29 22:47 ` Austin Clements @ 2012-03-01 14:28 ` Jesse Rosenthal 0 siblings, 0 replies; 10+ messages in thread From: Jesse Rosenthal @ 2012-03-01 14:28 UTC (permalink / raw) To: Austin Clements; +Cc: Notmuch Mail On Wed, 29 Feb 2012 17:47:46 -0500, Austin Clements <amdragon@MIT.EDU> wrote: > > On Wed, 29 Feb 2012 10:36:57 -0500, Austin Clements <amdragon@MIT.EDU> wrote: > > > What if the output of search (say, specifically the JSON format) > > > included information on each message in the thread such as the > > > 'message' production from devel/schemata minus the body field? > [...] > I was suggesting just using notmuch_thread_get_toplevel_messages in > search (essentially, mixing a bit of show into search). No library > changes necessary. In any event, I'd really love to see something like this. Because I work remotely, over an ssh tunnel, and it's nice to have various scripts local. However, things like notmuch_addresses and my recipient_search script have to run on the server, since they need bindings-level access to the database. If I could get the JSON you describe over the wire, I could probably just make one remote call and then confine my local work to JSON parsing. A niche need, I realize. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-03-01 14:27 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-25 16:34 Replacing my name/email with "me" (or similar) in author lists Daniel 2012-02-26 11:22 ` Patrick Totzke 2012-02-26 16:41 ` Daniel Schoepe 2012-02-26 16:51 ` David Bremner 2012-02-26 21:59 ` Tom Prince 2012-02-29 15:05 ` Jesse Rosenthal 2012-02-29 15:36 ` Austin Clements 2012-02-29 15:50 ` Jesse Rosenthal 2012-02-29 22:47 ` Austin Clements 2012-03-01 14:28 ` Jesse Rosenthal
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).