From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Yoichi NAKAYAMA Newsgroups: gmane.emacs.devel Subject: respect active region in browse-url.el Date: Sat, 22 May 2004 15:55:12 +0900 Organization: Geiin.org Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87isep9cj3.wl%yoichi@geiin.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by EMIKO 1.14.1 - "Choanoflagellata") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1085295469 16999 80.91.224.253 (23 May 2004 06:57:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 23 May 2004 06:57:49 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 23 08:57:41 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BRmvV-0002n6-00 for ; Sun, 23 May 2004 08:57:41 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BRmvU-00073c-00 for ; Sun, 23 May 2004 08:57:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BRmtw-0000vN-9H for emacs-devel@quimby.gnus.org; Sun, 23 May 2004 02:56:04 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BRiZZ-0008Ut-4Z for emacs-devel@gnu.org; Sat, 22 May 2004 22:18:45 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BRheC-00070M-Kp for emacs-devel@gnu.org; Sat, 22 May 2004 21:20:00 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BRhX7-0005zc-Os for emacs-devel@gnu.org; Sat, 22 May 2004 21:12:09 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by mx20.gnu.org with esmtp (Exim 4.34) id 1BRQPc-0003mP-4u for emacs-devel@gnu.org; Sat, 22 May 2004 02:55:16 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BRQOz-0002rX-00 for ; Sat, 22 May 2004 08:54:42 +0200 Original-Received: from 109.40.244.43.ap.yournet.ne.jp ([43.244.40.109]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 May 2004 08:54:37 +0200 Original-Received: from yoichi by 109.40.244.43.ap.yournet.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 22 May 2004 08:54:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 40 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 109.40.244.43.ap.yournet.ne.jp User-Agent: Wanderlust/2.11.28 (Wonderwall) EMIKO/1.14.1 (Choanoflagellata) LIMIT/1.14.8 (=?ISO-2022-JP?B?GyRCRVo7VSROTiQbKEI=?=) APEL/10.6 Emacs/21.3.50 (i686-pc-linux-gnu) MULE/5.0 (=?ISO-2022-JP?B?GyRCOC0bKEI=?= =?ISO-2022-JP?B?GyRCTFobKEI=?=) X-Face: wLZki+KbGjgKe0,<&3g*rA|R**vj[a8L%[v]ecJh1L(Uqm|LBx; v7Nq7n%?0d.aS]F#[~C\!{m?m,C&#U5}$_pZvBR>5VmX1Ol0`P\M-U8`sUF<5Quj'z&zzW8r|Zl9#W7Wut3duYzpKrP{n+AbarKtJ!i"Al7]P; -?[=iBZa*]r=>C':0~JECx]IH+RXq=/hUX}MB9e]oQKBxsDd/ X-SKK: Daredevil SKK/12.2.1 (Sone) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23842 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23842 Hi, Url in text sometimes splits into lines and `browse-url-url-at-point' detects only a part. Following change enables a user to explicitly specify url string part in text. emacs-w3m (http://emacs-w3m.namazu.org/index-en.html) has such feature and I'm using it conveniently. Index: browse-url.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/net/browse-url.el,v retrieving revision 1.36 diff -u -r1.36 browse-url.el --- browse-url.el 27 Apr 2004 14:03:10 -0000 1.36 +++ browse-url.el 22 May 2004 06:33:58 -0000 @@ -583,7 +583,13 @@ negation if a prefix argument was given." (let ((event (elt (this-command-keys) 0))) (and (listp event) (mouse-set-point event))) - (list (read-string prompt (browse-url-url-at-point)) + (list (read-string prompt (or (and transient-mark-mode mark-active + ;; rfc2396 Appendix E. + (replace-regexp-in-string + "[\t\r\f\n ]+" "" + (buffer-substring-no-properties + (region-beginning) (region-end)))) + (browse-url-url-at-point))) (not (eq (null browse-url-new-window-flag) (null current-prefix-arg))))) Reference: http://www.faqs.org/rfcs/rfc2396.html Regards, -- Yoichi NAKAYAMA