Re: [PATCH 2/2] Add quotes to emacsclient arguments in examples

2021-03-29 Thread Maxim Nikulin
On 28/03/2021 23:38, Maxim Nikulin wrote:
> * doc/org-manual.org, lisp/org-protocol.el: Quote emacsclient arguments
> in examples to prevent interpreting of ampersands as intent
> to run processes in background by bash and similar shells.
> Single quotes may cause a problem with cmd.exe, so use
> double quotes despite they are a bit less safe in bash and Co.

Let's remove it from the list of pending patches.

Applied by Kyle Meyer as commit a17243f9a5, see mid:87lfa67eul@kyleam.com




[PATCH 2/2] Add quotes to emacsclient arguments in examples

2021-03-28 Thread Maxim Nikulin
* doc/org-manual.org, lisp/org-protocol.el: Quote emacsclient arguments
in examples to prevent interpreting of ampersands as intent
to run processes in background by bash and similar shells.
Single quotes may cause a problem with cmd.exe, so use
double quotes despite they are a bit less safe in bash and Co.
---
 doc/org-manual.org   | 6 +++---
 lisp/org-protocol.el | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index e2fbdceb4..efe956877 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -19588,7 +19588,7 @@ passed to Emacs through the =emacsclient= command, so 
you also need to
 ensure an Emacs server is running.  More precisely, when the
 application calls
 
-: emacsclient org-protocol://PROTOCOL?key1=val1=val2
+: emacsclient "org-protocol://PROTOCOL?key1=val1=val2"
 
 #+texinfo: @noindent
 Emacs calls the handler associated to {{{var(PROTOCOL)}}} with
@@ -19611,7 +19611,7 @@ Using the ~store-link~ handler, you can copy links, to 
that they can
 be inserted using {{{kbd(M-x org-insert-link)}}} or yanking.  More
 precisely, the command
 
-: emacsclient org-protocol://store-link?url=URL=TITLE
+: emacsclient "org-protocol://store-link?url=URL=TITLE"
 
 #+texinfo: @noindent
 stores the following link:
@@ -19640,7 +19640,7 @@ 
javascript:location.href='org-protocol://store-link?url='+
 Activating the "capture" handler pops up a =Capture= buffer in Emacs,
 using acapture template.
 
-: emacsclient org-protocol://capture?template=X=URL=TITLE=BODY
+: emacsclient "org-protocol://capture?template=X=URL=TITLE=BODY"
 
 To use this feature, add a bookmark with an arbitrary name, e.g.,
 =Org: capture=, and enter this as =Location=:
diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 6f8cf00e9..731f51e19 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -49,7 +49,7 @@
 ;;   4.) Try this from the command line (adjust the URL as needed):
 ;;
 ;;   $ emacsclient \
-;; 
org-protocol://store-link?url=http:%2F%2Flocalhost%2Findex.html=The%20title
+;; 
"org-protocol://store-link?url=http:%2F%2Flocalhost%2Findex.html=The%20title"
 ;;
 ;;   5.) Optionally add custom sub-protocols and handlers:
 ;;
-- 
2.25.1