unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [Vagrant Cascadian] Bug#795243: notmuch-emacs: reply-to encrypted messages in tree view fails to quote and defaults to unencrypted message
@ 2015-08-12 10:03 David Bremner
  2015-08-12 11:39 ` David Bremner
  0 siblings, 1 reply; 7+ messages in thread
From: David Bremner @ 2015-08-12 10:03 UTC (permalink / raw)
  To: notmuch


[-- Attachment #0: Type: message/rfc822, Size: 6174 bytes --]

[-- Attachment #1.1: Type: text/plain, Size: 1436 bytes --]

Package: notmuch-emacs
Version: 0.18.2-1
Severity: normal

Thanks for maintaining notmuch!

When in tree view mode, if I reply to an encrypted message and the
point is the selected message in the threaded tree (as opposed to the
currently viewed message), the message reply doesn't contain any
quoted content (even though decryption was successful), and defaults
to an unencrypted message.

If the point is in the currently viewed message, it behaves as
expected, quoting the message and defaulting to signencrypt.

It would be ideal if it would default to containing the quoted text of
the replied to message and defaulting to encrypting in both cases,
otherwise the user may accidentally send information unencrypted, or
possibly even reply to the wrong message without realizing it.


live well,
  vagrant


-- System Information:
Debian Release: 8.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (120, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages notmuch-emacs depends on:
ii  emacs24         24.4+1-5
ii  emacsen-common  2.0.8
ii  notmuch         0.18.2-1

notmuch-emacs recommends no packages.

notmuch-emacs suggests no packages.

-- no debconf information

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [Vagrant Cascadian] Bug#795243: notmuch-emacs: reply-to encrypted messages in tree view fails to quote and defaults to unencrypted message
  2015-08-12 10:03 [Vagrant Cascadian] Bug#795243: notmuch-emacs: reply-to encrypted messages in tree view fails to quote and defaults to unencrypted message David Bremner
@ 2015-08-12 11:39 ` David Bremner
  2015-08-15  7:08   ` [PATCH] emacs: tree bugfix Mark Walters
  0 siblings, 1 reply; 7+ messages in thread
From: David Bremner @ 2015-08-12 11:39 UTC (permalink / raw)
  To: notmuch; +Cc: 795243


Vagrant wrote:

,----
| When in tree view mode, if I reply to an encrypted message and the point
| is the selected message in the threaded tree (as opposed to the
| currently viewed message), the message reply doesn't contain any quoted
| content (even though decryption was successful), and defaults to an
| unencrypted message.
| 
| If the point is in the currently viewed message, it behaves as
| expected, quoting the message and defaulting to signencrypt.
`----

I can duplicate this behaviour in 20.2

d

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

* [PATCH] emacs: tree bugfix
  2015-08-12 11:39 ` David Bremner
@ 2015-08-15  7:08   ` Mark Walters
  2015-08-16  8:57     ` David Bremner
  2015-10-15 18:46     ` Mark Walters
  0 siblings, 2 replies; 7+ messages in thread
From: Mark Walters @ 2015-08-15  7:08 UTC (permalink / raw)
  To: notmuch

Formerly replying to an encrypted message in tree-view did not
work. This is a first attempt to make it work.
---

notmuch-mua-reply decides whether to process crypto based on the
buffer-local variable notmuch-show-process-crypto. This sets to its
default value (which is notmuch-crypto-process-mime) in tree-mode
buffers.

As I do not have any crypto setup please can someone test? You will
need to set notmuch-crypto-process-mime to t first: I have no idea if
that is a bad thing to do! Any comments on whether it is a bad thing
would be very useful as (assuming this bascically fixes the problem)
the easy actual fix is to do this and let the user toggle
process-crypto for the whole tree buffer.

Best wishes

Mark


emacs/notmuch-tree.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 182235e..5695b68 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -867,6 +867,11 @@ (defun notmuch-tree-worker (basic-query &optional query-context target open-targ
   (setq notmuch-tree-query-context query-context)
   (setq notmuch-tree-target-msg target)
   (setq notmuch-tree-open-target open-target)
+  ;; Set the default value for `notmuch-show-process-crypto' in this
+  ;; buffer. Although we don't use this some of the functions we call
+  ;; (such as reply) do. It is a buffer local variable so setting it
+  ;; will not affect genuine show buffers.
+  (setq notmuch-show-process-crypto notmuch-crypto-process-mime)
 
   (erase-buffer)
   (goto-char (point-min))
-- 
2.1.4

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

* Re: [PATCH] emacs: tree bugfix
  2015-08-15  7:08   ` [PATCH] emacs: tree bugfix Mark Walters
@ 2015-08-16  8:57     ` David Bremner
  2015-10-15 18:46     ` Mark Walters
  1 sibling, 0 replies; 7+ messages in thread
From: David Bremner @ 2015-08-16  8:57 UTC (permalink / raw)
  To: Mark Walters, notmuch

Mark Walters <markwalters1009@gmail.com> writes:

> Formerly replying to an encrypted message in tree-view did not
> work. This is a first attempt to make it work.
> ---
>
> notmuch-mua-reply decides whether to process crypto based on the
> buffer-local variable notmuch-show-process-crypto. This sets to its
> default value (which is notmuch-crypto-process-mime) in tree-mode
> buffers.

Thanks for working on this Mark. Indeed it seems to fix the problem in
my tests.

Maybe just move some of the discussion into the commit message and we'll
merge it?

d

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

* [PATCH] emacs: tree bugfix
  2015-08-15  7:08   ` [PATCH] emacs: tree bugfix Mark Walters
  2015-08-16  8:57     ` David Bremner
@ 2015-10-15 18:46     ` Mark Walters
  2015-10-15 19:04       ` Tomi Ollila
  2015-10-17 20:56       ` David Bremner
  1 sibling, 2 replies; 7+ messages in thread
From: Mark Walters @ 2015-10-15 18:46 UTC (permalink / raw)
  To: notmuch

Formerly replying to an encrypted message in tree-view did not work:
the message was not decrypted. This commit makes notmuch-tree respect
the setting of notmuch-crypto-process-mime. In particular, if
notmuch-crypto-process-mime is set to t, then replying to encrypted
messages in tree mode will now decrypt the reply (as it already did in
show mode).
---
The same patch as before but with an updated commit message.

Best wishes

Mark

 emacs/notmuch-tree.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 182235e..5695b68 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -867,6 +867,11 @@ the same as for the function notmuch-tree."
   (setq notmuch-tree-query-context query-context)
   (setq notmuch-tree-target-msg target)
   (setq notmuch-tree-open-target open-target)
+  ;; Set the default value for `notmuch-show-process-crypto' in this
+  ;; buffer. Although we don't use this some of the functions we call
+  ;; (such as reply) do. It is a buffer local variable so setting it
+  ;; will not affect genuine show buffers.
+  (setq notmuch-show-process-crypto notmuch-crypto-process-mime)
 
   (erase-buffer)
   (goto-char (point-min))
-- 
2.1.4

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

* Re: [PATCH] emacs: tree bugfix
  2015-10-15 18:46     ` Mark Walters
@ 2015-10-15 19:04       ` Tomi Ollila
  2015-10-17 20:56       ` David Bremner
  1 sibling, 0 replies; 7+ messages in thread
From: Tomi Ollila @ 2015-10-15 19:04 UTC (permalink / raw)
  To: Mark Walters, notmuch

On Thu, Oct 15 2015, Mark Walters <markwalters1009@gmail.com> wrote:

> Formerly replying to an encrypted message in tree-view did not work:
> the message was not decrypted. This commit makes notmuch-tree respect
> the setting of notmuch-crypto-process-mime. In particular, if
> notmuch-crypto-process-mime is set to t, then replying to encrypted
> messages in tree mode will now decrypt the reply (as it already did in
> show mode).
> ---
> The same patch as before but with an updated commit message.

This looks tolerable to me...

Tomi


>
> Best wishes
>
> Mark
>
>  emacs/notmuch-tree.el | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
> index 182235e..5695b68 100644
> --- a/emacs/notmuch-tree.el
> +++ b/emacs/notmuch-tree.el
> @@ -867,6 +867,11 @@ the same as for the function notmuch-tree."
>    (setq notmuch-tree-query-context query-context)
>    (setq notmuch-tree-target-msg target)
>    (setq notmuch-tree-open-target open-target)
> +  ;; Set the default value for `notmuch-show-process-crypto' in this
> +  ;; buffer. Although we don't use this some of the functions we call
> +  ;; (such as reply) do. It is a buffer local variable so setting it
> +  ;; will not affect genuine show buffers.
> +  (setq notmuch-show-process-crypto notmuch-crypto-process-mime)
>  
>    (erase-buffer)
>    (goto-char (point-min))
> -- 
> 2.1.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

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

* Re: [PATCH] emacs: tree bugfix
  2015-10-15 18:46     ` Mark Walters
  2015-10-15 19:04       ` Tomi Ollila
@ 2015-10-17 20:56       ` David Bremner
  1 sibling, 0 replies; 7+ messages in thread
From: David Bremner @ 2015-10-17 20:56 UTC (permalink / raw)
  To: Mark Walters, notmuch

Mark Walters <markwalters1009@gmail.com> writes:

> Formerly replying to an encrypted message in tree-view did not work:
> the message was not decrypted. This commit makes notmuch-tree respect
> the setting of notmuch-crypto-process-mime. In particular, if
> notmuch-crypto-process-mime is set to t, then replying to encrypted
> messages in tree mode will now decrypt the reply (as it already did in
> show mode).

pushed to release

d

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

end of thread, other threads:[~2015-10-17 20:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 10:03 [Vagrant Cascadian] Bug#795243: notmuch-emacs: reply-to encrypted messages in tree view fails to quote and defaults to unencrypted message David Bremner
2015-08-12 11:39 ` David Bremner
2015-08-15  7:08   ` [PATCH] emacs: tree bugfix Mark Walters
2015-08-16  8:57     ` David Bremner
2015-10-15 18:46     ` Mark Walters
2015-10-15 19:04       ` Tomi Ollila
2015-10-17 20:56       ` David Bremner

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