* Re: How can I change gnus window configuration for some groups?
[not found] <mailman.7430.1408802163.1147.help-gnu-emacs@gnu.org>
@ 2014-08-23 21:53 ` Emanuel Berg
2014-08-24 8:34 ` Alan Schmitt
0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2014-08-23 21:53 UTC (permalink / raw)
To: help-gnu-emacs
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> I would like to display one particular group with a
> smaller summary buffer. Searching in the
> documentation, I found that I want to play with
> gnus-buffer-configuration'. I see that in the default
> setup, it already has a conditional layout ...
You can add another condition there, of course. That I
think would be the simplest solution - some purists
will not like it, but they are not the ones who are
doing this, and later using it - you are.
> Is there a way to adapt this such that I use the
> layout ... when viewing the "nnvirtual:RSS" group?
> Should this be a global setting or a group parameter?
If you can make in into a group parameter specifically
associated to that group, that would be the most
elegant solution. But I don't know how to do that.
Gut feeling, I would do either of:
1. If you want "RET transparency". In the group buffer,
you select a group by hitting RET. I would rebind
that to a defun that runs this:
(string-equal "nnvirtual:RSS" (gnus-group-group-name) )
If `t', do special treatment. If `nil', do the
ordinary thing. You might want to use
current-prefix-arg to replicate ordinary usage of
the C-u (to quantify articles).
2. If you don't care for "RET transparency": Simply
assign a key for the RSS group. That key will open
the group, then change the configuration; or, if
that flickers, change configuration, open the RSS
group, then change the configuration back to normal.
--
underground experts united
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I change gnus window configuration for some groups?
2014-08-23 21:53 ` How can I change gnus window configuration for some groups? Emanuel Berg
@ 2014-08-24 8:34 ` Alan Schmitt
2014-08-24 9:47 ` Alan Schmitt
2014-08-24 15:25 ` Eric Abrahamsen
0 siblings, 2 replies; 6+ messages in thread
From: Alan Schmitt @ 2014-08-24 8:34 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]
On 2014-08-23 23:53, Emanuel Berg <embe8573@student.uu.se> writes:
> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> Is there a way to adapt this such that I use the
>> layout ... when viewing the "nnvirtual:RSS" group?
>> Should this be a global setting or a group parameter?
>
> If you can make in into a group parameter specifically
> associated to that group, that would be the most
> elegant solution. But I don't know how to do that.
>
> Gut feeling, I would do either of:
>
> 1. If you want "RET transparency". In the group buffer,
> you select a group by hitting RET. I would rebind
> that to a defun that runs this:
>
> (string-equal "nnvirtual:RSS" (gnus-group-group-name) )
>
> If `t', do special treatment. If `nil', do the
> ordinary thing. You might want to use
> current-prefix-arg to replicate ordinary usage of
> the C-u (to quantify articles).
Thanks for the suggestion, it's a nice way to do it.
As a less invasive option, I could test for the group name in the window
configuration definition. However it seems that `gnus-group-group-name'
does not work in the summary window (is returns `nil'). Is there
a similar function that returns the name of the current group in
a summary buffer?
Thanks again,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I change gnus window configuration for some groups?
2014-08-24 8:34 ` Alan Schmitt
@ 2014-08-24 9:47 ` Alan Schmitt
2014-08-24 15:25 ` Eric Abrahamsen
1 sibling, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2014-08-24 9:47 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]
On 2014-08-24 10:34, Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> As a less invasive option, I could test for the group name in the window
> configuration definition. However it seems that `gnus-group-group-name'
> does not work in the summary window (is returns `nil'). Is there
> a similar function that returns the name of the current group in
> a summary buffer?
As I could not find such a function, this is what I ended up
doing. Testing the buffer name is ugly, but it gets the job done.
#+begin_src emacs-lisp
(defun as/small-summary-p ()
(equal (buffer-name) "*Summary nnvirtual:RSS*"))
(gnus-add-configuration
'(article
(cond
((as/small-summary-p) '(vertical 1.0
(summary 4 point)
(article 1.0)))
(t '(vertical 1.0
(summary 0.25 point)
(article 1.0))))))
#+end_src
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How can I change gnus window configuration for some groups?
2014-08-24 8:34 ` Alan Schmitt
2014-08-24 9:47 ` Alan Schmitt
@ 2014-08-24 15:25 ` Eric Abrahamsen
2014-08-24 19:08 ` Alan Schmitt
1 sibling, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2014-08-24 15:25 UTC (permalink / raw)
To: help-gnu-emacs
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> On 2014-08-23 23:53, Emanuel Berg <embe8573@student.uu.se> writes:
>
>> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>>
>>> Is there a way to adapt this such that I use the
>>> layout ... when viewing the "nnvirtual:RSS" group?
>>> Should this be a global setting or a group parameter?
>>
>> If you can make in into a group parameter specifically
>> associated to that group, that would be the most
>> elegant solution. But I don't know how to do that.
>>
>> Gut feeling, I would do either of:
>>
>> 1. If you want "RET transparency". In the group buffer,
>> you select a group by hitting RET. I would rebind
>> that to a defun that runs this:
>>
>> (string-equal "nnvirtual:RSS" (gnus-group-group-name) )
>>
>> If `t', do special treatment. If `nil', do the
>> ordinary thing. You might want to use
>> current-prefix-arg to replicate ordinary usage of
>> the C-u (to quantify articles).
>
> Thanks for the suggestion, it's a nice way to do it.
>
> As a less invasive option, I could test for the group name in the window
> configuration definition. However it seems that `gnus-group-group-name'
> does not work in the summary window (is returns `nil'). Is there
> a similar function that returns the name of the current group in
> a summary buffer?
I think the gnus-newsgroup-name variable holds the value you want. Does
that work?
^ permalink raw reply [flat|nested] 6+ messages in thread
* How can I change gnus window configuration for some groups?
@ 2014-08-23 13:55 Alan Schmitt
0 siblings, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2014-08-23 13:55 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 839 bytes --]
Hello,
I would like to display one particular group with a smaller summary
buffer. Searching in the documentation, I found that I want to play with
`gnus-buffer-configuration'. I see that in the default setup, it already
has a conditional layout:
#+begin_src emacs-lisp
(article
(cond
(gnus-use-trees
'(vertical 1.0
(summary 0.25 point)
(tree 0.25)
(article 1.0)))
(t
'(vertical 1.0
(summary 0.25 point)
(article 1.0)))))
#+end_src
Is there a way to adapt this such that I use the layout
#+begin_src emacs-lisp
(vertical 1.0
(summary 3 point)
(article 1.0))
#+end_src
when viewing the "nnvirtual:RSS" group? Should this be a global setting
or a group parameter?
Thanks,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-08-24 19:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.7430.1408802163.1147.help-gnu-emacs@gnu.org>
2014-08-23 21:53 ` How can I change gnus window configuration for some groups? Emanuel Berg
2014-08-24 8:34 ` Alan Schmitt
2014-08-24 9:47 ` Alan Schmitt
2014-08-24 15:25 ` Eric Abrahamsen
2014-08-24 19:08 ` Alan Schmitt
2014-08-23 13:55 Alan Schmitt
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).