unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Goto-Address mode hides the body toggle button on messages of zero depth.
@ 2009-12-30 12:25 Pablo Oliveira
  2009-12-30 12:47 ` Pablo Oliveira
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Oliveira @ 2009-12-30 12:25 UTC (permalink / raw)
  To: notmuch

In this patch we increment depth by one for all messages, so that the 
first character of the header is always a space. Without this patch, 
the first character may be part of the sender email address, which is 
buttonized by Goto-Address minor mode, therefore hiding the 
notmuch-button-body-toggle-type button, and forcing us to do an 
additional C-e to hit it.

Signed-off-by: Pablo Oliveira <pablo@sifflez.org>
---
 notmuch.el |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index 97914f2..93f61c5 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -774,7 +774,11 @@ and each reply increases depth by 1)."
   (if (re-search-forward notmuch-show-message-begin-regexp nil t)
       (let ((message-begin (match-beginning 0)))
 	(re-search-forward notmuch-show-depth-match-regexp)
-	(let ((depth (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))
+	;; We increment depth by one, so that the first character of the header
+	;; is a space. Before this, the first character was part of the sender
+	;; email address, which is buttonized by Goto-Address minor mode,
+	;; therefore hiding the notmuch-button-body-toggle-type button.
+	(let ((depth (1+ (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))))
 	      (match (string= "1" (buffer-substring (match-beginning 2) (match-end 2))))
               (btn nil))
 	  (setq btn (notmuch-show-markup-header message-begin depth))
-- 
1.6.3.3

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

* Re: [PATCH] Goto-Address mode hides the body toggle button on messages of zero depth.
  2009-12-30 12:25 [PATCH] Goto-Address mode hides the body toggle button on messages of zero depth Pablo Oliveira
@ 2009-12-30 12:47 ` Pablo Oliveira
  2010-02-08 22:54   ` Carl Worth
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Oliveira @ 2009-12-30 12:47 UTC (permalink / raw)
  To: notmuch


Hello all,

I heard about notmuch some weeks ago and I'm already liking it
a lot. At first I was a little disapointed by the slow tagging, 
but that was fixed by Kan-Ru's great patch for Xapian. I have
started using it daily, so many thanks for this mail reader !

On Wed, 30 Dec 2009 13:25:40 +0100, Pablo Oliveira <pablo@sifflez.org> wrote:
> In this patch we increment depth by one for all messages, so that the 
> first character of the header is always a space. Without this patch, 
> the first character may be part of the sender email address, which is 
> buttonized by Goto-Address minor mode, therefore hiding the 
> notmuch-button-body-toggle-type button, and forcing us to do an 
> additional C-e to hit it.

One of the things I find counter-intuitive is that on closed messages
of zero depth, the toggle body button is hidden by the email address
button, so when working with the keyboard, it seems one cannot open
the message, without moving further on the header button.

I propose above fix because it is very simple, but I do not like that
we lose one level of indentation on all the threads (screen space
is precious). Another solution would be to change the name-email 
order in the header... Or maybe we should deactivate somehow, the
Goto-Address mode on headers ? What do you think ?

Regards,

Pablo.



  

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

* Re: [PATCH] Goto-Address mode hides the body toggle button on messages of zero depth.
  2009-12-30 12:47 ` Pablo Oliveira
@ 2010-02-08 22:54   ` Carl Worth
  0 siblings, 0 replies; 3+ messages in thread
From: Carl Worth @ 2010-02-08 22:54 UTC (permalink / raw)
  To: Pablo Oliveira, notmuch

[-- Attachment #1: Type: text/plain, Size: 2198 bytes --]

On Wed, 30 Dec 2009 13:47:45 +0100, Pablo Oliveira <pablo@sifflez.org> wrote:
> Hello all,

Olá Pablo! Bem-vindo a notmuch!

> I heard about notmuch some weeks ago and I'm already liking it
> a lot. At first I was a little disapointed by the slow tagging, 
> but that was fixed by Kan-Ru's great patch for Xapian. I have
> started using it daily, so many thanks for this mail reader !

I'm delighted to hear you're having a good experience with notmuch. And
I apologize that I wasn't able to reply any sooner. (Perhaps I can
excuse myself somewhat since the original message arrived on my wedding
anniversary? No I'm still *really* late.)

> One of the things I find counter-intuitive is that on closed messages
> of zero depth, the toggle body button is hidden by the email address
> button, so when working with the keyboard, it seems one cannot open
> the message, without moving further on the header button.

Yes, this is really annoying. I'd like to see a proper fix for this.

> I propose above fix because it is very simple, but I do not like that
> we lose one level of indentation on all the threads (screen space
> is precious). Another solution would be to change the name-email 
> order in the header... Or maybe we should deactivate somehow, the
> Goto-Address mode on headers ? What do you think ?

For me, I'm getting the sender's name before their email address, so I
only run into this problem in the case where there is no name displayed,
but only an email address. Is that the same for you?

I don't want to remove the goto-address-mode on the header, because it
is very convenient (for those people who use a mouse) to be able to just
click on an email address to begin composing a new message to that
address.

I think I might be willing to have the email address deactivated for
keypresses if that were possible (so that pressing Enter anywhere on the
row would reliably toggle the message).

In the meantime, I agree that incrementing the depth universally doesn't
make sense. How about simply displaying a single ' ' character when
there's no full name available? I think that might solve the problem for
most people.

-Carl

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2010-02-08 22:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-30 12:25 [PATCH] Goto-Address mode hides the body toggle button on messages of zero depth Pablo Oliveira
2009-12-30 12:47 ` Pablo Oliveira
2010-02-08 22:54   ` Carl Worth

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