Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* expanding the article window
@ 2007-08-24 17:41 Daniel C. Bastos
  2007-08-24 19:03 ` Daniel C. Bastos
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel C. Bastos @ 2007-08-24 17:41 UTC (permalink / raw)
  To: info-gnus-english


I (setq gnus-use-trees t) because I like to see that; but then sometimes
the article window becomes too small. I'd like to learn two things: 

(1) how to expand the article window with a keyboard shortcut for when
I'm on the console and so unable to open new frames on a new window.

(2) how to keep a new frame just for article reading (and possibly
following-up-to) and another just for the summary and tree view. Because
although I may keep a second frame with the article, the other frame
(the main frame) still opens the article in its own window defeating the
purpose of using a single window for the summary.

Just point me to the manual if there's a section that answers these
questions. Thank you.

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

* Re: expanding the article window
  2007-08-24 17:41 expanding the article window Daniel C. Bastos
@ 2007-08-24 19:03 ` Daniel C. Bastos
  2007-08-24 20:29   ` Steven E. Harris
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel C. Bastos @ 2007-08-24 19:03 UTC (permalink / raw)
  To: info-gnus-english

dbast0s@yahoo.com.br (Daniel C. Bastos) writes:

> I (setq gnus-use-trees t) because I like to see that; but then sometimes
> the article window becomes too small. I'd like to learn two things: 
> 
> (1) how to expand the article window with a keyboard shortcut for when
> I'm on the console and so unable to open new frames on a new window.

Hm, I've just discovered that h C-x 1 does (1).

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

* Re: expanding the article window
  2007-08-24 19:03 ` Daniel C. Bastos
@ 2007-08-24 20:29   ` Steven E. Harris
  2007-08-25 21:12     ` Daniel C. Bastos
  0 siblings, 1 reply; 13+ messages in thread
From: Steven E. Harris @ 2007-08-24 20:29 UTC (permalink / raw)
  To: info-gnus-english

dbast0s@yahoo.com.br (Daniel C. Bastos) writes:

> I've just discovered that h C-x 1 does (1).

As does C-x 0. But that's not as nice as =.

-- 
Steven E. Harris

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

* Re: expanding the article window
  2007-08-24 20:29   ` Steven E. Harris
@ 2007-08-25 21:12     ` Daniel C. Bastos
  2007-08-26 17:02       ` Steven E. Harris
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel C. Bastos @ 2007-08-25 21:12 UTC (permalink / raw)
  To: info-gnus-english

"Steven E. Harris" <seh@panix.com> writes:

> dbast0s@yahoo.com.br (Daniel C. Bastos) writes:
>
>> I've just discovered that h C-x 1 does (1).
>
> As does C-x 0. But that's not as nice as =.

But = expands the summary window; I'd like to expand the article
window. I wish I would press something like ``='' and kill the tree
window, or make the article window take the whole frame.

I do see, however, that by pressing = and then the spacebar, I get an
expanded article window. First, the summary window takes the whole
frame, and after pressing space on a thread-item, the article window
comes back with the tree window taking less of the frame.

It's something. I'm using it.

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

* Re: expanding the article window
  2007-08-25 21:12     ` Daniel C. Bastos
@ 2007-08-26 17:02       ` Steven E. Harris
  2007-08-27 14:30         ` Daniel C. Bastos
  0 siblings, 1 reply; 13+ messages in thread
From: Steven E. Harris @ 2007-08-26 17:02 UTC (permalink / raw)
  To: info-gnus-english

dbast0s@yahoo.com.br (Daniel C. Bastos) writes:

> But = expands the summary window; I'd like to expand the article
> window. I wish I would press something like ``='' and kill the tree
> window, or make the article window take the whole frame.

Yes, I know; I was too terse. I meant that while C-x 0 works, it doesn't
work as conveniently as = which, unfortunately, does the wrong thing,
meaning that it would be nice to have a single non-shifted character key
binding that does what you're describing. We're in agreement here.

-- 
Steven E. Harris

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

* Re: expanding the article window
  2007-08-26 17:02       ` Steven E. Harris
@ 2007-08-27 14:30         ` Daniel C. Bastos
  2007-08-27 16:13           ` Daniel C. Bastos
       [not found]           ` <84r6lpymyk.fsf@blade3.tol\x04edo.com>
  0 siblings, 2 replies; 13+ messages in thread
From: Daniel C. Bastos @ 2007-08-27 14:30 UTC (permalink / raw)
  To: info-gnus-english

"Steven E. Harris" <seh@panix.com> writes:

> dbast0s@yahoo.com.br (Daniel C. Bastos) writes:
> 
> > But = expands the summary window; I'd like to expand the article
> > window. I wish I would press something like ``='' and kill the tree
> > window, or make the article window take the whole frame.
> 
> Yes, I know; I was too terse. I meant that while C-x 0 works, it doesn't
> work as conveniently as = which, unfortunately, does the wrong thing,
> meaning that it would be nice to have a single non-shifted character key
> binding that does what you're describing. We're in agreement here.

I just quickly looked into emacs macros: info: Basic Keyboard Macro. I
defined a macro with ``C-x ( h C-x 1 C-x )'' which switches to the
article window with h and then makes the buffer take the whole frame. I
can now run that with C-x e. If I could bind this macro to a non-shifted
key, then we're done. Ideas?

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

* Re: expanding the article window
  2007-08-27 14:30         ` Daniel C. Bastos
@ 2007-08-27 16:13           ` Daniel C. Bastos
       [not found]             ` <7yodgr8qu9.fsf@fillmore.spawar.navy.mil>
       [not found]           ` <84r6lpymyk.fsf@blade3.tol\x04edo.com>
  1 sibling, 1 reply; 13+ messages in thread
From: Daniel C. Bastos @ 2007-08-27 16:13 UTC (permalink / raw)
  To: info-gnus-english

dbast0s@yahoo.com.br (Daniel C. Bastos) writes:

> "Steven E. Harris" <seh@panix.com> writes:
>
>> dbast0s@yahoo.com.br (Daniel C. Bastos) writes:
>> 
>> > But = expands the summary window; I'd like to expand the article
>> > window. I wish I would press something like ``='' and kill the tree
>> > window, or make the article window take the whole frame.
>> 
>> Yes, I know; I was too terse. I meant that while C-x 0 works, it doesn't
>> work as conveniently as = which, unfortunately, does the wrong thing,
>> meaning that it would be nice to have a single non-shifted character key
>> binding that does what you're describing. We're in agreement here.
>
> I just quickly looked into emacs macros: info: Basic Keyboard Macro. I
> defined a macro with ``C-x ( h C-x 1 C-x )'' which switches to the
> article window with h and then makes the buffer take the whole frame. I
> can now run that with C-x e. If I could bind this macro to a non-shifted
> key, then we're done. Ideas?

Here's what I did: first I downloaded and installed the new gnu emacs:
directly from the cvs repository --- not that this was required, but I
was reading the info files of the gnu emacs 22.1.1 and the one I was
using for news was 21.x and the instructions I was getting was not
making sense on the 21.x. Also, I missed M-x info-apropos in 21.x which
was what kept me from reading the info files on it. I don't know how to
search through the info files very well.

Now with the gnu emacs 22.1.1, I defined the macro as above, then I ran
C-x C-k n to give it a name: I called it

                  gnus-article-expand-article-window.

Then I ran M-x insert-kbd-macro to get the macro's definition in lisp
code. Then I wrote in my .emacs:

(fset 'gnus-article-expand-article-window
   (lambda (&optional arg) "Keyboard macro." (interactive "p")
         (kmacro-exec-ring-item (quote ("h^X1" 0 "%d")) arg)))

(global-set-key (kbd "C-c e") 'gnus-article-expand-article-window)

It's not what we want, but at least now we don't have to define the
macro et every session. How can we bind this macro to a non-shifted key
that would work only when in the summary of articles in gnus?

-- 
Warning: I had a non-printable ^X in the code above which I replaced by
a printable ^X.

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

* Re: expanding the article window
       [not found]             ` <7yr6ln47az.fsf@fillmore.spawar.navy.mil>
@ 2007-08-29 20:00               ` Daniel C. Bastos
  2007-08-30  1:25                 ` Steven E. Harris
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel C. Bastos @ 2007-08-29 20:00 UTC (permalink / raw)
  To: info-gnus-english

"Steven E. Harris" <seh@panix.com> writes:

> dbast0s@yahoo.com.br (Daniel C. Bastos) writes:
>
>> How can we bind this macro to a non-shifted key that would work only
>> when in the summary of articles in gnus?
>
> I'm not sure if the last message I posted here will make it through; it
> may have been lost. Just in case, I'll restate it here.
>
> Try the following, which binds "+" (Sh-=) to focus on the article
> buffer:
>
> ,----
> | (define-key gnus-summary-mode-map ?\+
> |   (lambda ()
> |     (interactive)
> |     (gnus-configure-windows 'edit-article 'force)))
> `----
>
> Note that it doesn't ensure that the content of the *Article* buffer
> matches the current article under the point in the summary buffer.

I get an error when evaluating this code. The debugger report doesn't
look very friendly. Shall I show that to you somehow? The first line is

     Debugger entered--Lisp error: (wrong-type-argument arrayp 43)

I'm not even sure the rest would be useful, but I will show it to you in
whatever way you'd like; would you like an e-mail? I'm not posting
because there seems to be to many non-printable chars to be changed and
very long lines which even after fill-region, I'd still need to manually
break some apart.

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

* Re: expanding the article window
       [not found]             ` <7yodgr8qu9.fsf@fillmore.spawar.navy.mil>
@ 2007-08-29 20:09               ` Daniel C. Bastos
  2007-08-30  1:30                 ` Steven E. Harris
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel C. Bastos @ 2007-08-29 20:09 UTC (permalink / raw)
  To: info-gnus-english

"Steven E. Harris" <seh@panix.com> writes:

> dbast0s@yahoo.com.br (Daniel C. Bastos) writes:
>
>> How can we bind this macro to a non-shifted key that would work only
>> when in the summary of articles in gnus?
>
> I'm not sure if the last message I posted here will make it through; it
> may have been lost. Just in case, I'll restate it here.

Thanks. It was posted, it seems. Its ID was

               <7yk5rfa6yc.fsf@fillmore.spawar.navy.mil>

> Try the following, which binds "+" (Sh-=) to focus on the article
> buffer:

By the way, I wouldn't bind + because what we want is a non-shifted key,
remember? To use +, I'd prefer sticking to "C-c e" which I can do with
my left hand only; the corner of my palm is usually very close to the
control key, and that's not the case with my right hand.

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

* Re: expanding the article window
  2007-08-29 20:00               ` Daniel C. Bastos
@ 2007-08-30  1:25                 ` Steven E. Harris
  0 siblings, 0 replies; 13+ messages in thread
From: Steven E. Harris @ 2007-08-30  1:25 UTC (permalink / raw)
  To: info-gnus-english

dbast0s@yahoo.com.br (Daniel C. Bastos) writes:

> I get an error when evaluating this code. The debugger report doesn't
> look very friendly. Shall I show that to you somehow? The first line
> is
>
>      Debugger entered--Lisp error: (wrong-type-argument arrayp 43)

My guess is that in your Emacs the argument to `define-key' must be a
vector. Note that 43 is the character code for '+'.

Try using

  '(?\+)

instead of just ?\+.

-- 
Steven E. Harris

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

* Re: expanding the article window
  2007-08-29 20:09               ` Daniel C. Bastos
@ 2007-08-30  1:30                 ` Steven E. Harris
  2007-08-31 17:08                   ` Daniel C. Bastos
  0 siblings, 1 reply; 13+ messages in thread
From: Steven E. Harris @ 2007-08-30  1:30 UTC (permalink / raw)
  To: info-gnus-english

dbast0s@yahoo.com.br (Daniel C. Bastos) writes:

> I wouldn't bind + because what we want is a non-shifted key, remember?

Yes, I remember. I was just trying to come up with some example
single-character for the `define-key' form, and I noticed that Sh-=
wasn't taken, so it was safe for illustration. It's sort of symmetric
with the default binding for '='.

> To use +, I'd prefer sticking to "C-c e" which I can do with my left
> hand only; the corner of my palm is usually very close to the control
> key, and that's not the case with my right hand.

Sure, that makes sense. Try

  [(control c) (e)]

instead of ?\+ in the `define-key' form. Emacs may require a different
syntax to define the keystroke sequence.

-- 
Steven E. Harris

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

* Re: expanding the article window
  2007-08-30  1:30                 ` Steven E. Harris
@ 2007-08-31 17:08                   ` Daniel C. Bastos
  2007-09-01 16:58                     ` Steven E. Harris
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel C. Bastos @ 2007-08-31 17:08 UTC (permalink / raw)
  To: info-gnus-english

"Steven E. Harris" <seh@panix.com> writes:

> dbast0s@yahoo.com.br (Daniel C. Bastos) writes:
>
>> I wouldn't bind + because what we want is a non-shifted key, remember?
>
> Yes, I remember. I was just trying to come up with some example
> single-character for the `define-key' form, and I noticed that Sh-=
> wasn't taken, so it was safe for illustration. It's sort of symmetric
> with the default binding for '='.

Got it.

>> To use +, I'd prefer sticking to "C-c e" which I can do with my left
>> hand only; the corner of my palm is usually very close to the control
>> key, and that's not the case with my right hand.
>
> Sure, that makes sense. Try
>
>   [(control c) (e)]
>
> instead of ?\+ in the `define-key' form. Emacs may require a different
> syntax to define the keystroke sequence.

Okay. First, let's try '(?\+)

 (define-key gnus-summary-mode-map '(?\+)
   (lambda ()
     (interactive)
     (gnus-configure-windows 'edit-article 'force)))

Still get:

Debugger entered--Lisp error: (wrong-type-argument arrayp (43))

Now let's try: 

 (define-key gnus-summary-mode-map [(control c) (e)]
   (lambda ()
     (interactive)
     (gnus-configure-windows 'edit-article 'force)))

This worked. I now replaced [(control c) (e)] by [(w)] so that I just
can 'w' and have it expanded. Thanks, Steven.

What's the difference between ?\+ and [(w)]. I suppose the second is an
array of lists? But what about the '?' in the first? What does it do?

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

* Re: expanding the article window
  2007-08-31 17:08                   ` Daniel C. Bastos
@ 2007-09-01 16:58                     ` Steven E. Harris
  0 siblings, 0 replies; 13+ messages in thread
From: Steven E. Harris @ 2007-09-01 16:58 UTC (permalink / raw)
  To: info-gnus-english

dbast0s@yahoo.com.br (Daniel C. Bastos) writes:

> What's the difference between ?\+ and [(w)]. I suppose the second is
> an array of lists? But what about the '?' in the first? What does it
> do?

The first one is an atom -- a character -- while the second is an array
(or vector) composed of one list with one symbol.

See the Lisp Reference Section 8.4.3 for a discussion of the syntax for
denoting characters; that's where the question mark and backslash come
from. It's analogous to the "#\" ("sharpsign backslash") read macro in
Common Lisp, though the backslash isn't always necessary in Emacs Lisp.

For the vector, see the Lisp Reference Section 8.4.9. The read syntax
automatically quotes the values, so it's not necessary to quote the "w"
symbol above. This syntax is similar to the "#nA" ("sharpsign A") read
macro in Common Lisp, where the vector above can be written "#1A((w))".

-- 
Steven E. Harris

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

end of thread, other threads:[~2007-09-01 16:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-24 17:41 expanding the article window Daniel C. Bastos
2007-08-24 19:03 ` Daniel C. Bastos
2007-08-24 20:29   ` Steven E. Harris
2007-08-25 21:12     ` Daniel C. Bastos
2007-08-26 17:02       ` Steven E. Harris
2007-08-27 14:30         ` Daniel C. Bastos
2007-08-27 16:13           ` Daniel C. Bastos
     [not found]             ` <7yodgr8qu9.fsf@fillmore.spawar.navy.mil>
2007-08-29 20:09               ` Daniel C. Bastos
2007-08-30  1:30                 ` Steven E. Harris
2007-08-31 17:08                   ` Daniel C. Bastos
2007-09-01 16:58                     ` Steven E. Harris
     [not found]           ` <84r6lpymyk.fsf@blade3.tol\x04edo.com>
     [not found]             ` <7yr6ln47az.fsf@fillmore.spawar.navy.mil>
2007-08-29 20:00               ` Daniel C. Bastos
2007-08-30  1:25                 ` Steven E. Harris

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