* gnus-buffer-configuration and wide screens
@ 2012-05-07 5:06 Eric S Fraga
2012-05-07 6:45 ` Katsumi Yamaoka
0 siblings, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2012-05-07 5:06 UTC (permalink / raw)
To: ding
Hello,
I have recently moved to using a wide screen on my main
computer. Unfortunately, it's not one that can swivel (I prefer a
portrait orientation to my monitors) so I am having to adapt to it.
Gnus provides the really useful gnus-buffer-configuration for arranging
the various buffers. I have set mine up as follows:
(setq gnus-buffer-configuration
'((group (horizontal 1.0 (group 1.0 point)))
(summary (horizontal 1.0 (summary 0.6 point) (group 1.0)))
(article (horizontal 1.0 (article 0.6) (summary 1.0 point)))
(forward (horizontal 1.0 (message 0.6 point) (article 1.0)))
(message (horizontal 1.0 (message 0.6 point) (article 1.0)))
(reply (horizontal 1.0 (message 0.6 point) (article 1.0)))
(reply-yank (horizontal 1.0 (message 0.6 point) (article 1.0)))))
This works quite nicely. The buffer of interest is always the one to
the left of the screen where my eyes tend to focus first.
I have two questions:
1. The settings are quite symmetric except for one: the article is shown
to the left but the point is on the summary window. In all other
cases, point is on the left buffer. If, however, I try to have point
be in the article buffer,
(article (horizontal 1.0 (article 0.6 point) (summary 1.0)))
I get an error:
,----
| Debugger entered--Lisp error: (args-out-of-range 0)
| get-char-property(0 invisible)
| gnus-summary-show-thread()
| gnus-summary-scroll-up(1)
| call-interactively(gnus-summary-scroll-up nil nil)
`----
2. I have tried adding the "server" buffer to the group display, again
for symmetry, but this doesn't seem to work. The server buffer
becomes inactive. I haven't explored this one fully so I may have
done something wrong. However, if anybody has the server buffer
shown simultaneously with the group buffer, can you please send me
your buffer configuration settings? Anyway, this one is much less
important than point 1 above!
All of this is with gnus from git up to date a few minutes ago.
thanks,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 + Ma Gnus v0.6
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus-buffer-configuration and wide screens
2012-05-07 5:06 gnus-buffer-configuration and wide screens Eric S Fraga
@ 2012-05-07 6:45 ` Katsumi Yamaoka
2012-05-07 11:43 ` Eric Fraga
0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2012-05-07 6:45 UTC (permalink / raw)
To: ding
Eric S Fraga wrote:
[...]
> (article (horizontal 1.0 (article 0.6 point) (summary 1.0)))
> I get an error:
> ,----
>| Debugger entered--Lisp error: (args-out-of-range 0)
>| get-char-property(0 invisible)
>| gnus-summary-show-thread()
>| gnus-summary-scroll-up(1)
>| call-interactively(gnus-summary-scroll-up nil nil)
> `----
Many summary commands assume the point to be in a summary buffer.
So, some of the ones, that run (gnus-configure-windows 'article),
need to be modified like the following, I think.
(defun gnus-summary-* ()
...
(gnus-configure-windows 'article)
+ (gnus-eval-in-buffer-window gnus-summary-buffer
...)
+ )
> 2. I have tried adding the "server" buffer to the group display, again
> for symmetry, but this doesn't seem to work. The server buffer
> becomes inactive. I haven't explored this one fully so I may have
> done something wrong. However, if anybody has the server buffer
> shown simultaneously with the group buffer, can you please send me
> your buffer configuration settings? Anyway, this one is much less
> important than point 1 above!
How about this one?
(group
(horizontal 1.0
(group 0.6 point)
(progn (gnus-group-enter-server-mode)
'(server 1.0))))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus-buffer-configuration and wide screens
2012-05-07 6:45 ` Katsumi Yamaoka
@ 2012-05-07 11:43 ` Eric Fraga
2012-05-08 0:22 ` Katsumi Yamaoka
0 siblings, 1 reply; 5+ messages in thread
From: Eric Fraga @ 2012-05-07 11:43 UTC (permalink / raw)
To: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> Eric S Fraga wrote:
> [...]
>> (article (horizontal 1.0 (article 0.6 point) (summary 1.0)))
>
>> I get an error:
>
>> ,----
>>| Debugger entered--Lisp error: (args-out-of-range 0)
>>| get-char-property(0 invisible)
>>| gnus-summary-show-thread()
>>| gnus-summary-scroll-up(1)
>>| call-interactively(gnus-summary-scroll-up nil nil)
>> `----
>
> Many summary commands assume the point to be in a summary buffer.
Sure but point is allowed to be in the article window and gnus works
just fine with point there although obviously some commands are not
available and/or work differently.
> So, some of the ones, that run (gnus-configure-windows 'article),
> need to be modified like the following, I think.
>
> (defun gnus-summary-* ()
> ...
> (gnus-configure-windows 'article)
> + (gnus-eval-in-buffer-window gnus-summary-buffer
> ...)
> + )
I didn't understand this at all. Sorry.
My question is why cannot point be placed in the article window
automatically using the gnus configuration settings? I can obviously
display the article and then immediately hit "h" to put point in the
article window and gnus works fine when I do so.
>> 2. I have tried adding the "server" buffer to the group display, again
[...]
> How about this one?
>
> (group
> (horizontal 1.0
> (group 0.6 point)
> (progn (gnus-group-enter-server-mode)
> '(server 1.0))))
Thanks. I'll try this out.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 + Ma Gnus v0.6
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus-buffer-configuration and wide screens
2012-05-07 11:43 ` Eric Fraga
@ 2012-05-08 0:22 ` Katsumi Yamaoka
2012-05-08 1:47 ` Eric S Fraga
0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2012-05-08 0:22 UTC (permalink / raw)
To: ding
Eric Fraga wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:
[...]
>>>| Debugger entered--Lisp error: (args-out-of-range 0)
>>>| get-char-property(0 invisible)
>>>| gnus-summary-show-thread()
>>>| gnus-summary-scroll-up(1)
>>>| call-interactively(gnus-summary-scroll-up nil nil)
>> Many summary commands assume the point to be in a summary buffer.
(It is necessary for such commands to work in the summary buffer,
for looking up buffer-local variables, text properties, etc.)
> Sure but point is allowed to be in the article window and gnus works
> just fine with point there although obviously some commands are not
> available and/or work differently.
Some summary commands, that work even when launched from the article
buffer, make sure that themselves are in the summary buffer.
`gnus-summary-next-article' is the very case:
(defun gnus-summary-next-article (&optional unread subject backward push)
[...]
;; Make sure we are in the summary buffer.
(unless (eq major-mode 'gnus-summary-mode)
(set-buffer gnus-summary-buffer))
Gnus also offers the other way to make summary commands work in
the summary buffer certainly. Though such commands are currently
`AS' and `C-d' only (cf. `gnus-article-read-summary-keys').
Moreover, this way is not effective to a summary command that runs
(gnus-configure-windows 'article), that will overturn the focus to
the article buffer if the article window configuration has `point'
in the `article' element.
For other summary commands causing an error when being invoked from
the article buffer, I guess there were no developers customizing
the window configuration so as to focus to the article buffer by
default.
>> So, some of the ones, that run (gnus-configure-windows 'article),
>> need to be modified like the following, I think.
>>
>> (defun gnus-summary-* ()
>> ...
>> (gnus-configure-windows 'article)
>> + (gnus-eval-in-buffer-window gnus-summary-buffer
>> ...)
>> + )
> I didn't understand this at all. Sorry.
I meant:
--8<---------------cut here---------------start------------->8---
diff -au6 gnus-sum.el~ gnus-sum.el
--- gnus-sum.el~ 2012-05-01 22:53:58.705382400 +0000
+++ gnus-sum.el 2012-05-08 00:18:22.105907100 +0000
@@ -7997,22 +7997,24 @@
(defun gnus-summary-scroll-up (lines)
"Scroll up (or down) one line current article.
Argument LINES specifies lines to be scrolled up (or down if negative).
If no article is selected, then the current article will be selected first."
(interactive "p")
(gnus-configure-windows 'article)
+ (gnus-eval-in-buffer-window gnus-summary-buffer
(gnus-summary-show-thread)
(when (eq (gnus-summary-select-article nil nil 'pseudo) 'old)
(gnus-eval-in-buffer-window gnus-article-buffer
(cond ((> lines 0)
(when (gnus-article-next-page lines)
(gnus-message 3 "End of message")))
((< lines 0)
(gnus-article-prev-page (- lines))))))
(gnus-summary-recenter)
(gnus-summary-position-point))
+ )
(defun gnus-summary-scroll-down (lines)
"Scroll down (or up) one line current article.
Argument LINES specifies lines to be scrolled down (or up if negative).
If no article is selected, then the current article will be selected first."
(interactive "p")
--8<---------------cut here---------------end--------------->8---
This should fix a bug that you first posted. But it's easy to
imagine summary commands that should be fixed are not only this.
> My question is why cannot point be placed in the article window
> automatically using the gnus configuration settings? I can obviously
> display the article and then immediately hit "h" to put point in the
> article window and gnus works fine when I do so.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gnus-buffer-configuration and wide screens
2012-05-08 0:22 ` Katsumi Yamaoka
@ 2012-05-08 1:47 ` Eric S Fraga
0 siblings, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2012-05-08 1:47 UTC (permalink / raw)
To: ding
Katsumi Yamaoka <yamaoka@jpl.org> writes:
[...]
> Some summary commands, that work even when launched from the article
> buffer, make sure that themselves are in the summary buffer.
> `gnus-summary-next-article' is the very case:
This makes sense.
[...]
> For other summary commands causing an error when being invoked from
> the article buffer, I guess there were no developers customizing
> the window configuration so as to focus to the article buffer by
> default.
I will try things outs with the patch you have sent below and will feed
back any interesting behaviour.
I guess gnus should either allow point to be placed in the article
buffer using gnus-buffer-configuration, with appropriate corrections to
gnus code to support this, *or* it should disallow this setting? At the
very least, I guess the documentation may make some mention of the
restriction?
In any case, thanks for the explanation and the patch. None of this is
critical to the performance of gnus, only to my idiosyncratic wishes for
symmetry!
Thanks again,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 + Ma Gnus v0.6
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-08 1:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 5:06 gnus-buffer-configuration and wide screens Eric S Fraga
2012-05-07 6:45 ` Katsumi Yamaoka
2012-05-07 11:43 ` Eric Fraga
2012-05-08 0:22 ` Katsumi Yamaoka
2012-05-08 1:47 ` Eric S Fraga
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 NNTP newsgroup(s).