From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [bug] Org link dialog escapes URL spaces incorrectly Date: Fri, 04 Nov 2011 14:25:42 -0400 Message-ID: <26969.1320431142@alphaville.dokosmarshall.org> References: <23807.1320424380@alphaville.dokosmarshall.org> <24425.1320425559@alphaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMOSX-0003pB-Nu for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 14:25:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMOSW-0003yV-It for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 14:25:45 -0400 Received: from g4t0015.houston.hp.com ([15.201.24.18]:38434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMOSW-0003yQ-BZ for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 14:25:44 -0400 In-Reply-To: Message from Nick Dokos of "Fri, 04 Nov 2011 12:52:39 EDT." <24425.1320425559@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Cc: Jeff Horn , Org-mode ml , nicholas.dokos@hp.com Nick Dokos wrote: > It probably does, but that's probably not the best place to do it: it might be > better to do it in the (setq link on line 9090 or thereabouts. Otherwise, in > the *other* case (editing the link at point), we'll end up unescaping twice: > probably not a problem, since unescaping should be idempotent (in contrast to > escaping ;-) ) but why do it twice? > Brian Wightman pointed out to me that the idempotent part of the statement above is definitely wrong (d'oh). The original URL that Jeff Horn posted, when unescaped once, would be completely free of % signs. But if the second (doubly-escaped) form is pasted into the minibuffer, then unescaping once would not be enough. So I presume the thing to do is to take the URL and unescape it repeatedly until it loses all escapes, and then escape it *once* before inserting it in the org buffer. Sounds icky, kludgy, dirty. The question is: 1) is it a solution? and 2) is there a better one? Nick