From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id F/o2OhvrVmBBBgAA0tVLHw (envelope-from ) for ; Sun, 21 Mar 2021 06:43:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 5RtyNRvrVmCZFwAAB5/wlQ (envelope-from ) for ; Sun, 21 Mar 2021 06:43:39 +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 205D72347B for ; Sun, 21 Mar 2021 07:43:38 +0100 (CET) Received: from localhost ([::1]:52384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNroI-0004lX-3F for larch@yhetil.org; Sun, 21 Mar 2021 02:43:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNrnv-0004lM-Nk for emacs-orgmode@gnu.org; Sun, 21 Mar 2021 02:43:15 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:55235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNrnt-0000As-BQ for emacs-orgmode@gnu.org; Sun, 21 Mar 2021 02:43:15 -0400 Received: from localhost ([::ffff:41.202.241.53]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E082.000000006056EADF.00002DE3; Sat, 20 Mar 2021 23:42:39 -0700 From: Jean Louis To: emacs-orgmode@gnu.org Subject: Bug: org-protocol-protocol-alist: needs better description, not mentioning key/value [9.4.4 (release_9.4.4 @ /home/admin/Programming/Software/emacs/lisp/org/)] Date: Sun, 21 Mar 2021 09:41:41 +0300 Message-ID: <86v99lf1p6.fsf@protected.rcdrun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.170.207.13; envelope-from=support1@rcdrun.com; helo=stw1.rcdrun.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-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=1616309019; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=WZ6amX6D0X8X0oent1SaAeOYHt5p8Thl2LJhlWpLkMY=; b=E7EpzFqGYfDmGNUc2EIU5pnJTOQ8JSJRvtSjV6o0kRAgaRiozJhd30bwtbm+8iwt2kYdqp PgttiYVnrYxZcD5OWANg5HWU9nWRydNJaWMLH1r1JcVNhgtKi/bCgxORA2GwSdEKMk7pq6 rsbnXAV7v0h39VAZImneEtpAj0MNxtnzmW2PkBmmU/OE5qPQubkHeU/gI3vxcDlEAJEEND 1Syv0ecYc2c2mYtplKVPYV8qE0LaF+Et/87//TSJ5adgIjQoRLx21D9M9Y+fMygzGB/sBC BrXmzdfOIleBceFTonTj0FZATQG5BE2fHnDTaajRYEKumEqGvI6K6UsJe9B4+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616309019; a=rsa-sha256; cv=none; b=TL9R79MhzE1l/POiXFnvfm3tyEMhhulGKc3S+IFea1vVcDz5Hgh5PxwgGS0843I2kRVq92 wMyAa9m+IyFn3Pya4gzhZ2UArvsmsd4GXX4cEP4Ox6/Vvf9+zwivzQ45wMPB9J4o9W6nmW 5o6bHXr0zNW8Tc0c+fJ4zxc/QuI106YU34WpgxusLP9RGotjHRIq4OVeK2TNTh12m6NTEJ DfkKTXls3zGj7snHfS0QWFRlDwoDiPWH2TliAsT6T76gRAm27luMcVPCqbKcnU4a/PmBGU PN5dp7qN2iPIekMinm3r4Me0yxy51SiH+MzREMw4cCzyhkerLN0RhuE/is+K2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 205D72347B X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: kZ1xnA11Rn1w Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ The variable `org-protocol-protocol-alist' is describing what it has to contain, but does not describe what `key' has to contain and what `value' has to contain, as those are entries where user has to enter something. Key -- should contain the module name in quotes, this fact is not described, example on my side is: Key: "Hyperscope Store Hyperlink" Value -- should contain the list, but how is that list formatted is not explained here. On my side I have tried by providing quoted list, that did not work, then I figured out myself I would to provide this: Value:=20 (:protocol "store-link" :function hyperscope-org-protocol-store-link) And I first tried quoting with: function 'hyperscope-org-protocol-store-link which did not work, then I tried the above version which did work. It is a guess work. The text below should be corrected by developers to tell to users what belongs to `key' and what exactly belongs to `value', and example of entering data should be clearly given. Hide Org Protocol Protocol Alist: Alist: INS DEL Key: nil Value: nil INS State : EDITED, shown value does not take effect until you set or save = it. Register custom handlers for org-protocol. Hide =20=20=20 Each element of this list must be of the form: =20=20=20 (module-name :protocol protocol :function func :kill-client nil) =20=20=20 protocol - protocol to detect in a filename without trailing colon and slashes. See rfc1738 section 2.1 for more on this. If you define a protocol "my-protocol", =E2=80=98org-protocol-check-filename-for-protocol=E2=80=99 wi= ll search filenames for "org-protocol:/my-protocol" and trigger your action for every match. =E2=80=98org-protocol= =E2=80=99 is defined in =E2=80=98org-protocol-the-protocol=E2=80=99. D= ouble and triple slashes are compressed to one by emacsclient. =20=20=20 function - function that handles requests with protocol and takes one argument. If a new-style link (key=3Dval&key2=3Dval2) is given, the argument will be a property list with the values from the link. If an old-style link is given (val1/val2), the argument will be the filename with all protocols stripped. =20=20=20 If the function returns nil, emacsclient and -server do nothing. Any non-nil return value is considered a valid filename and thus passed to the server. =20=20=20 =E2=80=98org-protocol.el=E2=80=99 provides some support for h= andling old-style filenames, if you follow the conventions used for the standard handlers in =E2=80=98org-protocol-protocol-alist-default=E2=80=99. See =E2=80=98org-protocol-parse-parameters=E2=80=99. =20=20=20 kill-client - If t, kill the client immediately, once the sub-protocol is detected. This is necessary for actions that can be interrup= ted by =E2=80=98C-g=E2=80=99 to avoid dangling emacsclients. Note t= hat all other command line arguments but the this one will be discarded. Greedy ha= ndlers still receive the whole list of arguments though. =20=20=20 Here is an example: =20=20=20 (setq org-protocol-protocol-alist '(("my-protocol" :protocol "my-protocol" :function my-protocol-handler-function) ("your-protocol" :protocol "your-protocol" :function your-protocol-handler-function))) Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo = version 1.17.4, Xaw scroll bars) of 2021-03-15 Package: Org mode version 9.4.4 (release_9.4.4 @ /home/admin/Programming/So= ftware/emacs/lisp/org/) --=20 Thanks, Jean Louis =E2=8E=94 =CE=BB =F0=9F=84=AF =F0=9D=8D=84 =F0=9D=8C=A1 =F0=9D=8C=9A