Gnus development mailing list
 help / color / mirror / Atom feed
* Oddity: gnuclient invocation of gnus-url-mailto creates 2 frames
@ 2005-04-22 12:51 Karl Kleinpaste
  2005-04-26  2:34 ` Karl Kleinpaste
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Kleinpaste @ 2005-04-22 12:51 UTC (permalink / raw)


Not necessarily a bug, but definitely an oddity.

I've been using this shell script for a while, as my means of starting
Gnus from the GNOME panel, and for clicking a "mailto:" link in Firefox.

#!/bin/sh
export PATH=/usr/local/bin:"$PATH"
if [ "$1" = "" ] ; then
    exec xemacs -geometry 90x63 -f gnus-init
else
    if gnuclient -batch -eval t >/dev/null 2>&1 ; then
	exec gnuclient -eval "(gnus-url-mailto \"$1\")"
    else
	exec xemacs -geometry 90x63 \
	    -eval "(progn (require 'gnus-art) (gnus-url-mailto \"$1\") (font-lock-mode 1))"
    fi
fi
exec xmessage -center No XEmacs or gnuclient
echo no xemacs, no gnuclient, no xmessage
exit 1

What's significant here is the middle exec, using gnuclient to induce
Gnus to do gnus-url-mailto's thing.  When I click on a Firefox-
displayed link, Gnus produces not one but two new frames (using
Katsumi Yamaoka's message-multiple-frames.el).  One of them is the
size specified in message-multiple-frames (80x40); the other is my
default startup size of 90x63.

If I subsequently kill, postpone, or send the message...
1- From the default 90x63 frame, *both* frames disappear.
2- From the m-m-f frame, only that frame disappears, and the default
   90x63 frame resumes display of (only) *Summary*.

It's at worst a minor annoyance, but darn strange: What would be
causing Gnus to think that a single invocation of gnus-url-mailto
should deserve two separate and clearly very different (given geometry
choices) frame initializations?  It's not because the script is being
invoked more than once -- I've run the gnuclient command directly from
a shell prompt and still get 2 frames.

Guesses welcome.

--karl



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

* Re: Oddity: gnuclient invocation of gnus-url-mailto creates 2 frames
  2005-04-22 12:51 Oddity: gnuclient invocation of gnus-url-mailto creates 2 frames Karl Kleinpaste
@ 2005-04-26  2:34 ` Karl Kleinpaste
  2005-04-26 12:37   ` Oddity: gnuclient invocation of gnus-url-mailto creates 2 Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Kleinpaste @ 2005-04-26  2:34 UTC (permalink / raw)


Karl Kleinpaste <karl@charcoal.com> writes:
> 	exec gnuclient -eval "(gnus-url-mailto \"$1\")"
> When I click on a Firefox- displayed link, Gnus produces not one but
> two new frames

And the answer to my own foolish question is...

Include -batch in the gnuclient call, and only 1 window is created.

*sIGh*



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

* Re: Oddity: gnuclient invocation of gnus-url-mailto creates 2
  2005-04-26  2:34 ` Karl Kleinpaste
@ 2005-04-26 12:37   ` Katsumi Yamaoka
  2005-04-28  6:45     ` Katsumi Yamaoka
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2005-04-26 12:37 UTC (permalink / raw)


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

>>>>> In <vxkpswi4664.fsf@mesquite.charcoal.com> Karl Kleinpaste wrote:

>> 	exec gnuclient -eval "(gnus-url-mailto \"$1\")"
>> When I click on a Firefox- displayed link, Gnus produces not one but
>> two new frames

> And the answer to my own foolish question is...

> Include -batch in the gnuclient call, and only 1 window is created.

> *sIGh*

Otherwise, you can customize the gnuserv-frame variable.  For
example, put the following forms in your ~/.xemacs/init.el file:


[-- Attachment #2: Type: application/emacs-lisp, Size: 795 bytes --]

[-- Attachment #3: Type: text/plain, Size: 273 bytes --]



And then, replace gnus-url-mailto with gnuserv-gnus-url-mailto
in your shell script, or just type:

gnuclient -eval '(gnuserv-gnus-url-mailto "mailto:nobody@example.com")'

I'm normally using neither XEmacs nor gnuserv/gnuclient, so
don't be too hard on me, please.  ;-)

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

* Re: Oddity: gnuclient invocation of gnus-url-mailto creates 2
  2005-04-26 12:37   ` Oddity: gnuclient invocation of gnus-url-mailto creates 2 Katsumi Yamaoka
@ 2005-04-28  6:45     ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2005-04-28  6:45 UTC (permalink / raw)


>>>>> In <b9y7jipemsd.fsf@jpl.org> Katsumi Yamaoka wrote:

> Otherwise, you can customize the gnuserv-frame variable.  For
> example, put the following forms in your ~/.xemacs/init.el file:

> (defun gnuserv-gnus-url-mailto (url)
>   "Make sure the Gnus frame exists."

[...]

I've revised message-multiple-frames.el[1] so as to make such a
trick needless.  It is done by advising the message-pop-to-buffer
function.  Now you only need to put

(setq gnuserv-frame t)

in the init file or use the "-batch" option to the gnuclient
command.  You can also use emacsclient to launch message frames
without adding any setting except for `(server-start)'.  For
example:

emacsclient --eval '(gnus-url-mailto "mailto:nobody@example.com")'

In addition, that a strange behavior happened when using
gnus-user-agent as mail-user-agent has also been solved.

[1] ftp://ftp.jpl.org/pub/elisp/message-multiple-frames.el.gz
 or http://www.jpl.org/ftp/pub/elisp/message-multiple-frames.el.gz




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

end of thread, other threads:[~2005-04-28  6:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-22 12:51 Oddity: gnuclient invocation of gnus-url-mailto creates 2 frames Karl Kleinpaste
2005-04-26  2:34 ` Karl Kleinpaste
2005-04-26 12:37   ` Oddity: gnuclient invocation of gnus-url-mailto creates 2 Katsumi Yamaoka
2005-04-28  6:45     ` Katsumi Yamaoka

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