* [BUG?] Pressing SPACEbar is not doing what's expected.
@ 2011-12-21 23:08 Xavier Maillard
2011-12-21 23:19 ` Jameson Graef Rollins
0 siblings, 1 reply; 9+ messages in thread
From: Xavier Maillard @ 2011-12-21 23:08 UTC (permalink / raw)
To: notmuch
Hi,
I recently upgraded my notmuch installation here (passing from 0.6 or
such to latest 0.10.x series).
Problem is now, pressing SPACE in a notmuch-show buffer no longer scroll
in the message as it used to do.
SPC is bound to run command notmuch-show-advance-and-archive and its
docstring says:
This command is intended to be one of the simplest ways to
process a thread of email. It does the following:
If the current message in the thread is not yet fully visible,
scroll by a near screenful to read more of the message.
Otherwise, (the end of the current message is already within the
current window), advance to the next open message.
Finally, if there is no further message to advance to, and this
last message is already read, then archive the entire current
thread, (remove the "inbox" tag from each message). Also kill
this buffer, and display the next thread from the search from
which this thread was originally shown.
What happens here is just what is described in paragraph 2. Although I
am in situation described in first paragraph, pressing SPC just advance
to next message and never scroll to see the next part of the current
message.
How can I change this behaviour ? Does I need to do something in my
.emacs file ?
Thank you very much.
/Xavier
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] Pressing SPACEbar is not doing what's expected.
2011-12-21 23:08 [BUG?] Pressing SPACEbar is not doing what's expected Xavier Maillard
@ 2011-12-21 23:19 ` Jameson Graef Rollins
2011-12-22 8:14 ` Xavier Maillard
0 siblings, 1 reply; 9+ messages in thread
From: Jameson Graef Rollins @ 2011-12-21 23:19 UTC (permalink / raw)
To: Xavier Maillard, notmuch
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
On Thu, 22 Dec 2011 00:08:38 +0100, Xavier Maillard <xma@gnu.org> wrote:
> What happens here is just what is described in paragraph 2. Although I
> am in situation described in first paragraph, pressing SPC just advance
> to next message and never scroll to see the next part of the current
> message.
Hi, Xavier. I have noticed this as well, and it's definitely a bug and
not a feature (there's no way to change this behavior). I think it has
to do with there being hidden text at the end of the current message,
and notmuch somehow assuming that it is at the end of the message when
it's really not.
This issue has actually been addressed once, with a patch in fact [0].
However, somehow my patch to split the "and-archive" bit out of the
notmuch-show-advance-and-archive function [1] seems to have exposed a
problem.
I've been meaning to give it a look, but I'm hoping Dmitry can look at
it, since he understands this stuff better than I do.
jamie.
[0] id:"1320570241-30733-2-git-send-email-dmitry.kurochkin@gmail.com"
[1] id:"1321219008-11690-2-git-send-email-jrollins@finestructure.net"
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [BUG?] Pressing SPACEbar is not doing what's expected.
2011-12-21 23:19 ` Jameson Graef Rollins
@ 2011-12-22 8:14 ` Xavier Maillard
2011-12-22 14:24 ` [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Aaron Ecay
0 siblings, 1 reply; 9+ messages in thread
From: Xavier Maillard @ 2011-12-22 8:14 UTC (permalink / raw)
To: Jameson Graef Rollins, notmuch
Hi Jamie,
On Wed, 21 Dec 2011 15:19:24 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
> On Thu, 22 Dec 2011 00:08:38 +0100, Xavier Maillard <xma@gnu.org> wrote:
> > What happens here is just what is described in paragraph 2. Although I
> > am in situation described in first paragraph, pressing SPC just advance
> > to next message and never scroll to see the next part of the current
> > message.
>
> Hi, Xavier. I have noticed this as well, and it's definitely a bug and
> not a feature (there's no way to change this behavior). I think it has
> to do with there being hidden text at the end of the current message,
> and notmuch somehow assuming that it is at the end of the message when
> it's really not.
Well, the good news is that I am not alone :D At the beginning, I
thought it was me.
> This issue has actually been addressed once, with a patch in fact [0].
> However, somehow my patch to split the "and-archive" bit out of the
> notmuch-show-advance-and-archive function [1] seems to have exposed a
> problem.
I hope you (notmuch hackers) will find a solution to this bug.
Take care guys and thank you for such an awesome tool !
/Xavier
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] emacs: fix off-by-one bug in notmuch-show-archive
2011-12-22 8:14 ` Xavier Maillard
@ 2011-12-22 14:24 ` Aaron Ecay
2011-12-22 22:37 ` Xavier Maillard
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Aaron Ecay @ 2011-12-22 14:24 UTC (permalink / raw)
To: notmuch
Text properties change between characters; prev-s-c-property-change
returns the position after the change. Thus, it is still inside the
invisible region.
---
emacs/notmuch-show.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f52f233..905c9ec 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1169,8 +1169,9 @@ current window), advance to the next open message."
(ret nil))
(while (invisible-p visible-end-of-this-message)
(setq visible-end-of-this-message
- (previous-single-char-property-change visible-end-of-this-message
- 'invisible)))
+ (max (point-min)
+ (1- (previous-single-char-property-change
+ visible-end-of-this-message 'invisible)))))
(cond
;; Ideally we would test `end-of-this-message' against the result
;; of `window-end', but that doesn't account for the fact that
--
1.7.8
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: fix off-by-one bug in notmuch-show-archive
2011-12-22 14:24 ` [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Aaron Ecay
@ 2011-12-22 22:37 ` Xavier Maillard
2011-12-22 22:45 ` Jameson Graef Rollins
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Xavier Maillard @ 2011-12-22 22:37 UTC (permalink / raw)
To: Aaron Ecay, notmuch
Hey Aaron,
On Thu, 22 Dec 2011 09:24:20 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> Text properties change between characters; prev-s-c-property-change
> returns the position after the change. Thus, it is still inside the
> invisible region.
This patch works for me (at least on all the messages I tested it
on). Thank you very much !
/Xavier
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: fix off-by-one bug in notmuch-show-archive
2011-12-22 14:24 ` [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Aaron Ecay
2011-12-22 22:37 ` Xavier Maillard
@ 2011-12-22 22:45 ` Jameson Graef Rollins
2011-12-23 12:38 ` David Bremner
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Jameson Graef Rollins @ 2011-12-22 22:45 UTC (permalink / raw)
To: Aaron Ecay, notmuch
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
On Thu, 22 Dec 2011 09:24:20 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> Text properties change between characters; prev-s-c-property-change
> returns the position after the change. Thus, it is still inside the
> invisible region.
Thanks Aaron! I just tested this and it does seem to fix the issue.
Definitely +1 for this.
jamie.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: fix off-by-one bug in notmuch-show-archive
2011-12-22 14:24 ` [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Aaron Ecay
2011-12-22 22:37 ` Xavier Maillard
2011-12-22 22:45 ` Jameson Graef Rollins
@ 2011-12-23 12:38 ` David Bremner
2011-12-23 15:00 ` Dmitry Kurochkin
2011-12-23 15:00 ` Dmitry Kurochkin
4 siblings, 0 replies; 9+ messages in thread
From: David Bremner @ 2011-12-23 12:38 UTC (permalink / raw)
To: Aaron Ecay, notmuch
On Thu, 22 Dec 2011 09:24:20 -0500, Aaron Ecay <aaronecay@gmail.com> wrote:
> Text properties change between characters; prev-s-c-property-change
> returns the position after the change. Thus, it is still inside the
> invisible region.
Pushed,
d
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: fix off-by-one bug in notmuch-show-archive
2011-12-22 14:24 ` [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Aaron Ecay
` (2 preceding siblings ...)
2011-12-23 12:38 ` David Bremner
@ 2011-12-23 15:00 ` Dmitry Kurochkin
2011-12-23 15:00 ` Dmitry Kurochkin
4 siblings, 0 replies; 9+ messages in thread
From: Dmitry Kurochkin @ 2011-12-23 15:00 UTC (permalink / raw)
To: Aaron Ecay, notmuch
Hi Aaron.
Thanks for the fix.
Would be nice to have a test for it :)
Regards,
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: fix off-by-one bug in notmuch-show-archive
2011-12-22 14:24 ` [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Aaron Ecay
` (3 preceding siblings ...)
2011-12-23 15:00 ` Dmitry Kurochkin
@ 2011-12-23 15:00 ` Dmitry Kurochkin
4 siblings, 0 replies; 9+ messages in thread
From: Dmitry Kurochkin @ 2011-12-23 15:00 UTC (permalink / raw)
To: Aaron Ecay, notmuch
Hi Aaron.
Thanks for the fix.
Would be nice to have a test for it :)
Regards,
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-12-23 15:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 23:08 [BUG?] Pressing SPACEbar is not doing what's expected Xavier Maillard
2011-12-21 23:19 ` Jameson Graef Rollins
2011-12-22 8:14 ` Xavier Maillard
2011-12-22 14:24 ` [PATCH] emacs: fix off-by-one bug in notmuch-show-archive Aaron Ecay
2011-12-22 22:37 ` Xavier Maillard
2011-12-22 22:45 ` Jameson Graef Rollins
2011-12-23 12:38 ` David Bremner
2011-12-23 15:00 ` Dmitry Kurochkin
2011-12-23 15:00 ` Dmitry Kurochkin
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).