How to disable this pop-up warning for orgmode commands such as:

shell:ls *.org

For which I would wish just to click once? Thanks!

1 Answer 1


(setq org-confirm-shell-link-function nil)


Shell links can be dangerous: just think about a link

[[shell:rm -rf ~/*][Google Search]]

This link would show up in your Org document as "Google Search", but really it would remove your entire home directory. Therefore we advise against setting this variable to nil. Just change it to ‘y-or-n-p’ if you want to confirm with a single keystroke rather than having to type "yes".

Cf. C-h f org-confirm-shell-link-function

See also org-link-shell-skip-confirm-regexp. You can allow specific commands through it. But beware of the possibility of a command like ls *.org && rm -rf ~/*: ^ls.* is obviously not enough.

  • 1
    Very useful and nice explanation.
    – Adelita
    Commented Jul 23, 2021 at 12:14
  • However, those links do not run independent from clicking. So one must still click. Is there the option to avoid the warning per buffer?
    – Adelita
    Commented Jul 23, 2021 at 13:55
  • @Adelita I'm not sure what do you mean by running links independently. Do you want to run all shell links on the buffer ? Or one link, but asynchronously ? Or maybe both ? BTW, you can also press C-c C-o on the link instead of clicking at it. For the latter question, you can set org-confirm-shell-link-function locally so that it works per buffer. Cf. this question to do so. Commented Jul 23, 2021 at 15:58
  • Thanks, I think that's what I was looking for.
    – Adelita
    Commented Jul 23, 2021 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.