unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Configurable deleted tags in notmuch-emacs
@ 2021-11-27 21:20 João Pedro
  2021-11-29 20:33 ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: João Pedro @ 2021-11-27 21:20 UTC (permalink / raw)
  To: notmuch

Hello everyone.

I'd like to suggest that the list of tags to applied to deleted drafts,
in notmuch-emacs, is made user configurable. To be more precise, with
notmuch-emacs version 0.34.1, under line 105 we have

(defun notmuch-draft--mark-deleted ()
  "Tag the last saved draft deleted.

Used when a new version is saved, or the message is sent."
  (when notmuch-draft-id
    (notmuch-tag notmuch-draft-id '("+deleted"))))

where the +deleted tag is hard coded. I, and I suppose a lot of other
users, use different tags for deleted emails. Currently I just override
notmuch-draft--mark-deleted, but it seems like it would be just a matter
of adding a defcustom akin to notmuch-draft-tags, though I'm not sure if
notmuch-draft.el would be the most appropriate location, or if it could
be reused in other scenarios.

-- 
João Pedro de Amorim Paula
Computer Science undergraduate at Universidade Federal do Rio Grande do Norte (UFRN)\r

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Configurable deleted tags in notmuch-emacs
  2021-11-27 21:20 Configurable deleted tags in notmuch-emacs João Pedro
@ 2021-11-29 20:33 ` David Bremner
  2021-11-30 20:11   ` João Pedro de Amorim Paula
  0 siblings, 1 reply; 3+ messages in thread
From: David Bremner @ 2021-11-29 20:33 UTC (permalink / raw)
  To: João Pedro, notmuch

João Pedro <jpedrodeamorim@gmail.com> writes:

> Hello everyone.
>
> I'd like to suggest that the list of tags to applied to deleted drafts,
> in notmuch-emacs, is made user configurable. To be more precise, with
> notmuch-emacs version 0.34.1, under line 105 we have
>
> (defun notmuch-draft--mark-deleted ()
>   "Tag the last saved draft deleted.
>
> Used when a new version is saved, or the message is sent."
>   (when notmuch-draft-id
>     (notmuch-tag notmuch-draft-id '("+deleted"))))
>
> where the +deleted tag is hard coded. I, and I suppose a lot of other
> users, use different tags for deleted emails. Currently I just override
> notmuch-draft--mark-deleted, but it seems like it would be just a matter
> of adding a defcustom akin to notmuch-draft-tags, though I'm not sure if
> notmuch-draft.el would be the most appropriate location, or if it could
> be reused in other scenarios.

Sounds plausible. "deleted" is also hardcoded in
notmuch-tag.el. notmuch-lib.el might be a reasonable place for the
defcustom. There is already a defcustom there for notmuch-archive-tags.\r

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Configurable deleted tags in notmuch-emacs
  2021-11-29 20:33 ` David Bremner
@ 2021-11-30 20:11   ` João Pedro de Amorim Paula
  0 siblings, 0 replies; 3+ messages in thread
From: João Pedro de Amorim Paula @ 2021-11-30 20:11 UTC (permalink / raw)
  To: David Bremner, notmuch

On 29 November 2021 16:33, David Bremner <david@tethera.net> wrote:

> João Pedro <jpedrodeamorim@gmail.com> writes:
>
>> Hello everyone.
>>
>> I'd like to suggest that the list of tags to applied to deleted drafts,
>> in notmuch-emacs, is made user configurable. To be more precise, with
>> notmuch-emacs version 0.34.1, under line 105 we have
>>
>> (defun notmuch-draft--mark-deleted ()
>>   "Tag the last saved draft deleted.
>>
>> Used when a new version is saved, or the message is sent."
>>   (when notmuch-draft-id
>>     (notmuch-tag notmuch-draft-id '("+deleted"))))
>>
>> where the +deleted tag is hard coded. I, and I suppose a lot of other
>> users, use different tags for deleted emails. Currently I just override
>> notmuch-draft--mark-deleted, but it seems like it would be just a matter
>> of adding a defcustom akin to notmuch-draft-tags, though I'm not sure if
>> notmuch-draft.el would be the most appropriate location, or if it could
>> be reused in other scenarios.
>
> Sounds plausible. "deleted" is also hardcoded in
> notmuch-tag.el. notmuch-lib.el might be a reasonable place for the
> defcustom. There is already a defcustom there for notmuch-archive-tags.

All right, I'll try to structure what I already have in my custom
configuration in the notmuch-{lib,draft}.el, with the appropriate
documentation and all, and submit a patch by the end of this week.

-- 
João Pedro de Amorim Paula
IT undergraduate at Universidade Federal do Rio Grande do Norte (UFRN)\r

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-30 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-27 21:20 Configurable deleted tags in notmuch-emacs João Pedro
2021-11-29 20:33 ` David Bremner
2021-11-30 20:11   ` João Pedro de Amorim Paula

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).