From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre =?utf-8?Q?T=C3=A9choueyres?= Subject: [PATCH] Possible bug in org-protocol Date: Thu, 07 Mar 2019 23:48:12 +0100 Message-ID: <87d0n29u8j.fsf@killashandra.ballybran.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h21oM-00019R-Fz for emacs-orgmode@gnu.org; Thu, 07 Mar 2019 17:48:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h21oK-0002N8-Da for emacs-orgmode@gnu.org; Thu, 07 Mar 2019 17:48:22 -0500 Received: from smtp4-g21.free.fr ([2a01:e0c:1:1599::13]:59998) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h21oH-0002GE-W9 for emacs-orgmode@gnu.org; Thu, 07 Mar 2019 17:48:18 -0500 Received: from killashandra.ballybran.fr.free.fr (unknown [IPv6:2a01:e0a:1e2:f8b0:9cc3:35bf:aa81:ccf7]) by smtp4-g21.free.fr (Postfix) with ESMTPS id 2979C19F58A for ; Thu, 7 Mar 2019 23:48:12 +0100 (CET) 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" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hello Org developers, I'm facing an unexpected behaviour since some days : When I want to record some link from web sites using Org Capture extension (https://github.com/sprig/org-capture-extension) for Firefox all my text and links are encoded like urls. It's look like the commit #cc7c4a673 removed some url decoding when the org-protocol url is processed. See bellow the steps to reproduce : 1) define some templates for org-protocol, mine are bellow #+begin_src elisp (setq org-capture-templates '(("L" "Protocol Link" entry (file+olp ,inbox "Web") ,(concat "* %:description :@website:\n" " Captured On: %a, %U\n" " %?\n\n")) ("p" "Protocol Selection" entry (file+olp ,inbox "Web") ,(concat "* %:description :@website:\n" " Source: %a, %U\n" " #+begin_quote\n%i\n #+end_quote\n" " %?\n\n")))) #+end_src 2) use emacsclient to trigger org-protocol like this #+begin_src sh emacsclient -n "org-protocol://capture?template=p&url=https%3A%2F%2Fgithub.com%2FCruiserX%2Fsha256_plsql&title=CruiserX%2Fsha256_plsql%3A%20SHA256%20PL%2FSQL%20Implementation%20for%20Oracle%2010g%2C11g.&body=SHA256%20PL%2FSQL%20Implementation%20for%20Oracle%2010g%2C11g.%20" #+end_src the resulting buffer is : #+begin_example ** CruiserX%2Fsha256_plsql%3A%20SHA256%20PL%2FSQL%20Implementation%20for%20Oracle%2010g%2C11g. :@website: Source: [[https%253A%252F%252Fgithub.com%252FCruiserX%252Fsha256_plsql][CruiserX%2Fsha256_plsql%3A%20SHA256%20PL%2FSQL%20Implementation%20for%20Oracle%2010g%2C11g.]], [2019-03-07 jeu. 23:36] #+begin_quote SHA256%20PL%2FSQL%20Implementation%20for%20Oracle%2010g%2C11g.%20 #+end_quote #+end_example I think that one possible fix could be to rollback one part of the git commit #cc7c4a673 like in the patch bellow. What do you think ? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=pte-org-protocol-unescape.patch Content-Description: Fix org-protocol unescape diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index f3e7281ee..d9fdef00e 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -381,7 +381,7 @@ If INFO is already a property list, return it unchanged." (while data (setq result (append result - (list (pop data) (pop data))))) + (list (pop data) (org-link-unescape (pop data)))))) result) (let ((data (org-protocol-split-data info t org-protocol-data-separator))) (if default-order --=-=-= Content-Type: text/plain Pierre. --=-=-=--