From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eHWeD7K29mG2AgEAgWs5BA (envelope-from ) for ; Sun, 30 Jan 2022 17:02:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id mExKCLK29mE3bwAAG6o9tA (envelope-from ) for ; Sun, 30 Jan 2022 17:02:58 +0100 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 31B8410B0F for ; Sun, 30 Jan 2022 17:02:57 +0100 (CET) Received: from localhost ([::1]:47520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nECfH-0001OV-MP for larch@yhetil.org; Sun, 30 Jan 2022 11:02:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nECe5-0001OL-22 for emacs-orgmode@gnu.org; Sun, 30 Jan 2022 11:01:41 -0500 Received: from gauss.matem.unam.mx ([132.248.17.1]:53353) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1nECe2-0007nr-Ds for emacs-orgmode@gnu.org; Sun, 30 Jan 2022 11:01:40 -0500 Received: from penguin (unknown [201.137.89.173]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: omar) by gauss.matem.unam.mx (Postfix) with ESMTP id 83E2254220 for ; Sun, 30 Jan 2022 10:01:33 -0600 (CST) From: =?utf-8?Q?Omar_Antol=C3=ADn_Camarena?= To: emacs-orgmode@gnu.org Subject: [BUG] Confirmation message for elisp links is badly formatted [9.5.2 (9.5.2-gfbff08 @ /home/omarantolin/.emacs.d/elpa/org-9.5.2/)] Date: Sun, 30 Jan 2022 10:01:32 -0600 Message-ID: <87sft58b6r.fsf@matem.unam.mx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=132.248.17.1; envelope-from=omar@matem.unam.mx; helo=gauss.matem.unam.mx X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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 X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643558577; 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=9xQx4B55VEP1xIru4ANa5ymGKty4bdWwsxa0gWF68Cw=; b=StRAkN78EQf3xZrnBseGSMF+SWAudu9YNIL6FKkRsBR4RFbar6nGmAr1B9hg0bAX0EQEHv Qxw+6sKUoU+tGRIBo3tjPZOp6uaEYLAO5V6rCyW9CjXTZQob8z1Nzh84jJ/PcPA/xr81bB MtPmrsnypCIaGx7dlD5Gkgam0F8QEyAfQvD0gtJq0lMeTky1BgfTOeSU/ZI5ZAfpDB2G3j Oi0oVV2imFILc7bXsFZGeYnnZOWVAtSk5Nti3cdb33N7d5UTyr51Z/0daJ7WQyf/5IB5Zp Nqpy9cazyDyRNvAO4je3uWfRDxAOKXkUw6HQcN2SpGMhaoPJPPoxILdl9VMRtQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643558577; a=rsa-sha256; cv=none; b=SVEbJDo4nCYWMnx7ekL2Do67i2TFzNOiGlZm/iqhqeIcVw73IRe5BgX86NWt7xbYAXUzub 95w3/6j9CwzpemhTlHpYEldOBdQFxg4uKrJzU/6v7fnadBYlle2H1mJyTuT7YdsGfwnqX5 wlN4ZQ+TpKP1A1W7cTgHoSePRTcEf+DLKqIW0fIDGW9EHe+wFkGLSWMOMufHhBvqwLf1Cf IjTdhAeZJcCVEFsxcd1FNm57nq3RuNXTQAooV/v6eucJVK30UEMIPnUzTu8oVDbDMPMXvk /qThmM2iXFh4L7dClxaa0vpDRS4JdQhimo9VLiJ04B1FP2hJchO8FzEK8vNhNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.83 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 31B8410B0F X-Spam-Score: -3.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: 78dXX+qT1azN 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. ------------------------------------------------------------------------ By default Org prompts you to make sure you really want to execute the code= in an elisp link; as the docstring for org-link-elisp-confirm-function say= s, just think about a link like [[elisp:(shell-command "rm -rf ~/*")][Web S= earch]]! But the formatting of the default confirmation message leaves something to = be desired. The function org-link--open-elisp which is in charge of confirm= ing that you want to execute the code does this: #+begin_src emacs-lisp (funcall org-link-elisp-confirm-function (format "Execute %S as Elisp? " (org-add-props path nil 'face 'org-warning))) #+end_src emacs-lisp And the combination of capital %S with the propertized path produces confir= mation prompts like the following: Execute #("(describe-variable 'org-capture-templates)" 0 42 (face org-warn= ing)) as Elisp?=20 Notice that instead of /being/ propertized with the org-warning face it sho= ws a textual representation of the propertize string! I'd suggest fixing this by /not/ propertizing the link target. Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24= .5, cairo version 1.16.0) of 2021-04-04, unofficial emacs-snapshot build: http://emacs.ganneff.de/, = git commit dd5ba88afbb63f54603cc632fc55993c04531a85 Package: Org mode version 9.5.2 (9.5.2-gfbff08 @ /home/omarantolin/.emacs.d= /elpa/org-9.5.2/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq org-link-elisp-confirm-function 'y-or-n-p org-directory "~/Notes" org-hide-emphasis-markers t org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n= (fn ENTRY)"] org-agenda-files '("~/Notes/Refile.org" "~/Notes/Daily.org" "~/Notes/Work.org" "~/Notes/Someday.org") org-capture-templates '(("s" "Someday" entry (file "Someday.org") "* %?\n") ("d" "Daily" entry (file+olp+datetree "Daily.org") "* TODO %?\n") ("r" "Refile" entry (file "Refile.org") "* %?\n") ("j" "Journal entry" plain (file+olp+datetree "Journal.org")) ("e" "Emacs templates") ("ei" "Idea" entry (file+olp "Editors/Emacs.org" "Ideas") "* %?\n") ("et" "Tip" entry (file+olp "Editors/Emacs.org" "Tips") "* %?\n") ("eq" "Question" entry (file+olp "Editors/Emacs.org" "Questions") "* %?\= n") ("ep" "Package" entry (file+olp "Editors/Emacs.org" "Packages") "* %?\n= ") ) org-refile-targets '((nil :maxlevel . 2) ("~/Notes/Notes.org" :maxlevel . = 2) ("~/Notes/Someday.org" :level . 0) ("~/Notes/Daily.org" :level . 3) ("~/Notes/Work.org" :maxlevel . 2) ("~/Notes/Math.org" :maxlevel . 2)) org-export-before-parsing-hook '(org-attach-expand-links) org-refile-use-outline-path 'file org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-link-from-user-regexp "\\\\|\\" org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append loc= al] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-a= ll append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes #[0 "\301\211\207" [imenu-create-index-function org-imenu-get-tree] 2] add-pretty-entities-hook org-tweak-syntax-table turn-off-visual-line-mode turn-on-auto-fill echo-area-tooltips ediff-with-org-show-all turn-on-org-cdlatex beginend-org-mode) outline-mode-hook '(beginend-outline-mode) org-ellipsis "=E2=80=A6" org-confirm-shell-link-function 'yes-or-no-p org-reveal-start-hook '(org-decrypt-entry) outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-highlight-latex-and-related '(latex script entities) org-agenda-mode-hook '(beginend-org-agenda-mode) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-latex-packages-alist '(("AUTO" "babel" t ("pdflatex"))) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'y-or-n-p org-hide-leading-stars t org-todo-keywords '((sequence "TODO" "|" "DONE" "NOPE") (type "WAIT")) org-structure-template-alist '(("a" . "export ascii") ("c" . "center") ("C" . "comment") ("e" . "example") ("E" . "export") ("h" . "export html") ("l" . "export latex") ("q" . "quote") ("s" . "src") ("v" . "verse") ("thm" . "theorem") ("pf" . "proof") ("lem" . "lemma") ("cor" . "corollary") ("def" . "definition") ("rem" . "remark") ("exer" . "exercise") ("prop" . "propositio= n") ("el" . "src emacs-lisp")) org-pretty-entities t org-preview-latex-image-directory "~/.cache/ltximg/" org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-confirm-babel-evaluate nil org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-lin= k) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-lin= k) ("irc" :follow org-irc-visit :store org-irc-store-li= nk :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :export org-link-doi-export :follow org-link-doi-open) ("arXiv" :face org-link :follow #[some ugly bytecode with null characters in it]) ("https" :follow #[some ugly bytecode with null characters in it]) ("ftp" :follow #[some ugly bytecode with null characters in it]) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-metaup-hook '(org-babel-load-in-session-maybe) org-refile-allow-creating-parent-nodes 'confirm org-outline-path-complete-in-steps nil org-special-ctrl-a/e t org-tags-column -55 org-src-lang-modes '(("latex-macros" . latex) ("inline-js" . javascript) ("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh) ("beamer" . latex) ("calc" . fundamenta= l) ("cpp" . c++) ("ditaa" . artist) ("dot" . fundamental) ("elisp" . emacs-lisp) ("ocaml" . tuareg) ("screen" . shell-script) ("shell" . sh) ("sqlite" . sql)) )