From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: don@donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#572: marked as done (thing-at-point 'url gets confused if url has paren) Date: Thu, 7 Aug 2008 12:25:07 -0700 Message-ID: References: <03625014-7638-464D-87AB-773848C25295@xahlee.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1218137107-25059-0" X-Trace: ger.gmane.org 1218137336 26366 80.91.229.12 (7 Aug 2008 19:28:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Aug 2008 19:28:56 +0000 (UTC) To: joakim@verona.se Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 07 21:29:46 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KRBBA-0005gK-5w for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Aug 2008 21:29:44 +0200 Original-Received: from localhost ([127.0.0.1]:58309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRBAE-0005Rq-ME for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Aug 2008 15:28:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KRB8y-0004XY-4D for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2008 15:27:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KRB8w-0004WI-K9 for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2008 15:27:27 -0400 Original-Received: from [199.232.76.173] (port=33707 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KRB8w-0004W9-3y for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2008 15:27:26 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53604) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KRB8v-0002Qb-RD for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2008 15:27:26 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m77JRNIC026235; Thu, 7 Aug 2008 12:27:23 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m77JP7li025277; Thu, 7 Aug 2008 12:25:07 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com X-Emacs-PR-Message: closed 572 X-Emacs-PR-Package: emacs X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19111 Archived-At: This is a multi-part message in MIME format... ------------=_1218137107-25059-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Thu, 07 Aug 2008 21:17:09 +0200 with message-id and subject line commited a fix has caused the Emacs bug report #572, regarding thing-at-point 'url gets confused if url has paren to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact don@donarmstrong.com immediately.) --=20 572: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D572 Emacs Bug Tracking System Contact don@donarmstrong.com with problems ------------=_1218137107-25059-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.1 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 18 Jul 2008 12:42:43 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m6ICgc8L027900 for ; Fri, 18 Jul 2008 05:42:39 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJpIC-0007Rf-Oe for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2008 08:42:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJpI8-0007Px-HS for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2008 08:42:34 -0400 Received: from [199.232.76.173] (port=35573 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJpI7-0007Pi-NS for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2008 08:42:32 -0400 Received: from mout.perfora.net ([74.208.4.197]:61255) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJpI6-0000iI-SC for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2008 08:42:31 -0400 Received: from [192.168.1.5] (c-24-6-97-120.hsd1.ca.comcast.net [24.6.97.120]) by mrelay.perfora.net (node=mrus1) with ESMTP (Nemesis) id 0MKpCa-1KJpHi1d3t-0004i0; Fri, 18 Jul 2008 08:42:07 -0400 Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: quoted-printable Message-Id: <03625014-7638-464D-87AB-773848C25295@xahlee.org> Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed To: bug-gnu-emacs@gnu.org From: xah lee Subject: thing-at-point 'url gets confused if url has paren Date: Fri, 18 Jul 2008 05:41:38 -0700 X-Mailer: Apple Mail (2.753.1) X-Provags-ID: V01U2FsdGVkX18clfRNxcCf9/uthQxAYrP1urXXZ9nbih2p6U9 s4597Yq13cPMu/S18AWVV5+waL5RrC6+R3qP8J8MJtSmIRNseH ICQ5Y1i1wGFPAa00Wv7SQ== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) (thing-at-point 'url) gets confused if the url contains a parenthesis such as in http://en.wikipedia.org/wiki/Oz_(programming_language) Note that, according to http://en.wikipedia.org/wiki/Percent-encoding parenthesis in uri do not necessarily needs to be percent encoded, =20 depending on the context the uri is used. Quote: =C2=ABWhen a character =20= from the reserved set (a "reserved character") has special meaning (a =20= "reserved purpose") in a certain context, and a URI scheme says that =20 it is necessary to use that character for some other purpose, then =20 the character must be percent-encoded.=C2=BB But anyhow, practically speaking, often uri will contain parens. e.g. =20= Wikipedia has lots of article with url containing paren, and in =20 browser they are shown as paren, and this is often copied and pasted =20 as is to editors. the above should be the complete bug description. The following are supplementary to this bug report. -------------------------------------------- Here's a sample code (defun wrap-url () "Make the url at cursor point into a html link. If there is a region, use the region as url instead. This function is interface wrapper for `wrap-url-string'. See that function for detail." (interactive) (let (bds p1 p2 url) (if (and transient-mark-mode mark-active) (progn (setq p1 (region-beginning)) (setq p2 (region-end)) ) (progn (setq bds (bounds-of-thing-at-point 'url)) (setq p1 (car bds)) (setq p2 (cdr bds)) ) ) (setq url (buffer-substring-no-properties p1 p2)) (delete-region p1 p2) (goto-char p1) (insert (wrap-url-string url)) ) ) the error from the above code when the cursor is on the following line: http://en.wikipedia.org/wiki/Oz_(programming_language) is: setq: Wrong type argument: integer-or-marker-p, nil presumably because the boundary p1 or p2 is not a integer or marker. ----------------- In GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0) of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp Windowing system distributor `Apple Inc.', version 10.4.11 Xah =E2=88=91 http://xahlee.org/ =E2=98=84 =E2=98=84 ------------=_1218137107-25059-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 572-done) by emacsbugs.donarmstrong.com; 7 Aug 2008 19:17:25 +0000 Received: from gate.verona.se (IDENT:0@iwfs.imcode.com [82.115.149.64]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m77JHMDX023292 for <572-done@emacsbugs.donarmstrong.com>; Thu, 7 Aug 2008 12:17:23 -0700 Received: from chopper (IDENT:1005@localhost [127.0.0.1]) by gate.verona.se (8.13.4/8.11.4) with ESMTP id m77JHFn2012944 for <572-done@emacsbugs.donarmstrong.com>; Thu, 7 Aug 2008 21:17:15 +0200 From: joakim@verona.se To: 572-done@emacsbugs.donarmstrong.com Subject: commited a fix User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Date: Thu, 07 Aug 2008 21:17:09 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Thanks for the thorough bug report! -- Joakim Verona ------------=_1218137107-25059-0--