emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Timothy <tecosaur@gmail.com>
To: "Omar Antolín Camarena" <omar@matem.unam.mx>
Cc: emacs-orgmode@gnu.org
Subject: Re: [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: Mon, 31 Jan 2022 19:38:18 +0800	[thread overview]
Message-ID: <87v8y0m8xa.fsf@gmail.com> (raw)
In-Reply-To: <87sft58b6r.fsf@matem.unam.mx>

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

Hi Omar,

Thanks for the report, I’ve fixed this in b3ceafd0 :)

Omar Antolín Camarena <omar@matem.unam.mx> writes:

> 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 says, just
> think about a link like [Web Search]!
>
> But the formatting of the default confirmation message leaves something to be
> desired. The function org-link–open-elisp which is in charge of confirming 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 confirmation prompts like the following:
>
>  Execute #(“(describe-variable ‘org-capture-templates)” 0 42 (face org-warning)) as Elisp?
>
> Notice that instead of /being/ propertized with the org-warning face it shows a textual representation of the propertize string!
>
> I’d suggest fixing this by /not/ propertizing the link target.

All the best,
Timothy


[Web Search] <elisp:(shell-command "rm -rf ~/*")>

  reply	other threads:[~2022-01-31 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30 16:01 [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/)] Omar Antolín Camarena
2022-01-31 11:38 ` Timothy [this message]
2022-02-01  1:06   ` Omar Antolín Camarena
2022-02-01 11:35   ` Max Nikulin
2022-02-01 11:57     ` Timothy
2022-02-02 12:04       ` Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8y0m8xa.fsf@gmail.com \
    --to=tecosaur@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=omar@matem.unam.mx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).