From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60204 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Oddity: gnuclient invocation of gnus-url-mailto creates 2 Date: Tue, 26 Apr 2005 21:37:54 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1114518851 19923 80.91.229.2 (26 Apr 2005 12:34:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Apr 2005 12:34:11 +0000 (UTC) Original-X-From: ding-owner+M8732@lists.math.uh.edu Tue Apr 26 14:34:05 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DQPGJ-0007il-3o for ding-account@gmane.org; Tue, 26 Apr 2005 14:33:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DQPKN-0005l3-00; Tue, 26 Apr 2005 07:38:11 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DQPKJ-0005ky-00 for ding@lists.math.uh.edu; Tue, 26 Apr 2005 07:38:07 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DQPKE-0003iV-KG for ding@lists.math.uh.edu; Tue, 26 Apr 2005 07:38:02 -0500 Original-Received: from washington.hostforweb.net ([69.61.11.2]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DQPKD-000570-00 for ; Tue, 26 Apr 2005 14:38:01 +0200 Original-Received: from localhost ([127.0.0.1]) by washington.hostforweb.net with esmtpa (Exim 4.44) id 1DQPKC-0007uz-Ba for ding@gnus.org; Tue, 26 Apr 2005 08:38:00 -0400 Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4.17 (linux) Cancel-Lock: sha1:cA9UxVe/1jWad2k5w+QataMxi8s= X-Hashcash: 1:20:050426:ding@gnus.org::rOPNkgZrcYq4/KR4:00002AYV X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -4.7 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60204 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:60204 --=-=-= Content-Type: text/plain; charset=iso-8859-1 >>>>> In 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: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defun gnuserv-gnus-url-mailto (url) "Make sure the Gnus frame exists." (when (device-on-window-system-p) (let (windows window frame) (save-excursion (walk-windows (lambda (w) (set-buffer (window-buffer w)) (cond ((eq major-mode 'gnus-summary-mode) (push (cons 0 w) windows)) ((eq major-mode 'gnus-article-mode) (push (cons 1 w) windows)) ((eq major-mode 'gnus-group-mode) (push (cons 2 w) windows)))) 'ignore-minibuf 'visible)) (select-frame (if (setq window (cdar (sort windows 'car-less-than-car= ))) (window-frame window) (make-frame))))) (gnus-url-mailto url)) ;; Put the focus on the message frame. (setq gnuserv-frame (lambda (type) (when (memq type '(x gtk mswindows)) (selected-frame)))) --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline 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. ;-) --=-=-=--