From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id tylUFLmxYGBieAEAgWs5BA (envelope-from ) for ; Sun, 28 Mar 2021 18:41:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OD1GDbmxYGCXFgAA1q6Kng (envelope-from ) for ; Sun, 28 Mar 2021 16:41:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AD44910F92 for ; Sun, 28 Mar 2021 18:41:28 +0200 (CEST) Received: from localhost ([::1]:39588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQYTf-0004TM-NK for larch@yhetil.org; Sun, 28 Mar 2021 12:41:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQYSM-0004Sg-JY for emacs-orgmode@gnu.org; Sun, 28 Mar 2021 12:40:08 -0400 Received: from ciao.gmane.io ([116.202.254.214]:57946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQYSK-00051p-G8 for emacs-orgmode@gnu.org; Sun, 28 Mar 2021 12:40:05 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lQYSI-0006oL-Af for emacs-orgmode@gnu.org; Sun, 28 Mar 2021 18:40:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: [PATCH 2/2] Add quotes to emacsclient arguments in examples Date: Sun, 28 Mar 2021 23:38:59 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616949688; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=C58eCo+0Fk402BQqL9ePyAXiI99suFzBEeXA/dboAF4=; b=iBYw5HQb9YyrHtWYNbOFnZUGJo9QIqDAwzYZEdV26gRXud+Dot4+TjNPi84xsMkGX61JnL X2YACeyEBiYYTMiZyhIO+YLhkNpaziQZON7j0orN0F97+I7nxr/av1f9NyUSwwGYy+kQPU 9M5gOK3n4ZKRWW7jbHqJuI+96KddUJTPUD2aVnDZ3R/6yDLOwbqbkFwMohmZ2iyZlEHuRp cBYGl1hkRxkrA5U3w9lVtW6z6BveZ8PrqAUcrUZ7k52lM4kYFOn62+mqk2NgpEeYSImZW4 w0ViAEgar7V8prx6/wZx5vnBLP7XxJK4dIP/5Cwy8TuAJbssyj1nSrC96kvdFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616949688; a=rsa-sha256; cv=none; b=Gj5IlSRFz0vuGeEu7JrF2JPn46ds58zYBxn+TFUnom+YYJlTxRQRi9rzS6igy5yTjjkWl0 3eCflx1/w3xs1BDMUSWi9Qns5vm5srrfpDFWAa2sRIBZeOPKmZc0iu9Rk09IIr0DfNCqN2 264EZpSQwPH2Ju6K2s17DkqmOua+BgB1hRiq5IqptBt1cBettwXhwG1sSgENBtzG5M/yen HbALzxnWn0BI4R6Z3D8Pc+jZE/smKXww1WhefZUJm+ENGAoHX5fKwDLEqUR9fRHKpInmgO 40VsNl+o9m/nzbqwZKhUyLtMuEwGW/ZNka7LhGpUoj/uBSB5Uem8p9eFKV5Hxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: AD44910F92 X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: keMJRhjuDCR5 * 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&key2=val2 +: emacsclient "org-protocol://PROTOCOL?key1=val1&key2=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=TITLE +: emacsclient "org-protocol://store-link?url=URL&title=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=URL&title=TITLE&body=BODY +: emacsclient "org-protocol://capture?template=X&url=URL&title=TITLE&body=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&title=The%20title +;; "org-protocol://store-link?url=http:%2F%2Flocalhost%2Findex.html&title=The%20title" ;; ;; 5.) Optionally add custom sub-protocols and handlers: ;; -- 2.25.1