From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bodo Schulze Newsgroups: gmane.emacs.bugs Subject: Function `browse-url-mozilla' in browse-url.el Date: Sat, 09 Aug 2003 21:38:51 +0200 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1060459746 8268 80.91.224.253 (9 Aug 2003 20:09:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Aug 2003 20:09:06 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 09 22:09:05 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19la1Q-00017M-00 for ; Sat, 09 Aug 2003 22:09:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19la1M-000052-0k for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Aug 2003 16:09:00 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19la1I-0008Sm-0f for bug-gnu-emacs@gnu.org; Sat, 09 Aug 2003 16:08:56 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19la0l-0007oO-21 for bug-gnu-emacs@gnu.org; Sat, 09 Aug 2003 16:08:55 -0400 Original-Received: from [62.26.116.129] (helo=webmail.tiscali.de) by monty-python.gnu.org with esmtp (Exim 4.20) id 19la0i-0007ne-ON for bug-gnu-emacs@gnu.org; Sat, 09 Aug 2003 16:08:20 -0400 Original-Received: from mardochee (62.246.191.236) by webmail.tiscali.de (6.7.019) id 3F2FA5810014884F for bug-gnu-emacs@gnu.org; Sat, 9 Aug 2003 22:08:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=letras.net) by mardochee with esmtp (Exim 3.35 #1 (Debian)) id 19lZYB-0000g0-00 for ; Sat, 09 Aug 2003 21:38:51 +0200 Original-To: bug-gnu-emacs@gnu.org X-Mailer: mh-e 6.1; nmh 1.0.4+dev; Emacs 21.2 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5518 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5518 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-03-22 on raven, modified by Debian configured using `configure i386-debian-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes --with-x-toolkit=athena --without-gif' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: C value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: de_DE locale-coding-system: iso-latin-1 default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Dear Emacs hackers, placing point on the string "file:///usr/local/doc/HOWTO/Text-Terminal-HOWTO-9.html" in a buffer being in text-mode, I get a "Wrong type argument: stringp, nil" error when calling `browse-url-mozilla'. (I use Mozilla version 1.0.0) In browse-url.el, I placed an edebug-defun break after the closing parenthesis of the `append' form in defun `browse-url-mozilla' (process (apply 'start-process (concat "mozilla " url) nil browse-url-mozilla-program (append browse-url-mozilla-arguments (list "-remote") (list "openurl(" url (if new-window ",new-window") ")"))!))) ^ break and get this result in *Messages* Break Result: ("-remote" "openurl(""file:///usr/local/doc/HOWTO/Text-Terminal-HOWTO-9.html" nil ")") Go... edebug-signal: Wrong type argument: stringp, nil I guess it's the 'nil' that produces the stringp error. Also correcting this by adding the empty string in the ELSE branch of the IF, like this (if new-window ",new-window" "") does not do the job, since the argument passed to the -remote Option must not be a list, but a string. Here is a patch that I found to correct the error. *** browse-url.el.orig Sat Aug 9 19:58:27 2003 --- browse-url.el Sat Aug 9 19:58:27 2003 *************** *** 849,859 **** browse-url-mozilla-program (append browse-url-mozilla-arguments ! (list "-remote") ! (list "openurl(" ! url ! (if new-window ",new-window") ! ")"))))) (set-process-sentinel process `(lambda (process change) (browse-url-mozilla-sentinel process ,url))))) --- 849,863 ---- browse-url-mozilla-program (append browse-url-mozilla-arguments ! (list "-remote" ! ;; The following should not be a list but a string, ! ;; so the ELSE-Branch must not be nil but the ! ;; empty string ! (concat ! "openurl(" url ! (if new-window ",new-window" "") ! ")")))))) (set-process-sentinel process `(lambda (process change) (browse-url-mozilla-sentinel process ,url))))) Hope this may help. Additional remark: As of version 1.0.1, 1.1 and beyond, Mozilla also supports the option 'new-tab'. Mozilla-Help on -remote option *openURL (/URL/, new-window)* Creates a new window displaying the specified document. *openURL (/URL/, new-tab)* Creates a new tab displaying the specified document. /(Available in 1.0.1, 1.1 and beyond)/ Emacs just knows the flag `browse-url-new-window-flag'. Should there be an additional flag `browse-url-new-tab-flag'?. Best regards, Bodo Schulze Recent messages: edebug-signal: Loading debug...done Entering debugger... [2 times] Break Result: ("-remote" "openurl(" "file:///usr/local/doc/HOWTO/Text-Terminal-HOWTO-9.html" nil ")") Go... edebug-signal: Wrong type argument: stringp, nil Mark set Loading emacsbug...done