diff options
author | Bastien Guerry <bzg@altern.org> | 2011-03-05 10:08:19 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-03-05 10:08:19 +0100 |
commit | ae8d522a6ca94be487669bdc946c1da0e64f0b0e (patch) | |
tree | 2fae4b5d8278a42f56f5338f4ef709c5281d0e36 | |
parent | 18c1bcf6454c58ed4aeb0427951b52579c79ae5f (diff) | |
download | org-mode-ae8d522a6ca94be487669bdc946c1da0e64f0b0e.tar.gz |
New variables to skip confirmation for elisp/shell links.
* org.el (org-confirm-shell-link-not-regexp)
(org-confirm-elisp-link-not-regexp): New custom variables.
(org-open-at-point): Use the new custom variables.
-rw-r--r-- | lisp/org.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index 3a07cfd..76f0aa8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1587,6 +1587,11 @@ single keystroke rather than having to type \"yes\"." 'safe-local-variable '(lambda (x) (member x '(yes-or-no-p y-or-n-p)))) +(defcustom org-confirm-shell-link-not-regexp "" + "A regexp to skip confirmation for shell links." + :group 'org-link-follow + :type 'regexp) + (defcustom org-confirm-elisp-link-function 'yes-or-no-p "Non-nil means ask for confirmation before executing Emacs Lisp links. Elisp links can be dangerous: just think about a link @@ -1607,6 +1612,11 @@ single keystroke rather than having to type \"yes\"." 'safe-local-variable '(lambda (x) (member x '(yes-or-no-p y-or-n-p)))) +(defcustom org-confirm-elisp-link-not-regexp "" + "A regexp to skip confirmation for Elisp links." + :group 'org-link-follow + :type 'regexp) + (defconst org-file-apps-defaults-gnu '((remote . emacs) (system . mailcap) @@ -9314,7 +9324,8 @@ application the system uses for this file type." ((string= type "shell") (let ((cmd path)) - (if (or (not org-confirm-shell-link-function) + (if (or (string-match org-confirm-shell-link-not-regexp cmd) + (not org-confirm-shell-link-function) (funcall org-confirm-shell-link-function (format "Execute \"%s\" in shell? " (org-add-props cmd nil @@ -9326,7 +9337,8 @@ application the system uses for this file type." ((string= type "elisp") (let ((cmd path)) - (if (or (not org-confirm-elisp-link-function) + (if (or (string-match org-confirm-elisp-link-not-regexp cmd) + (not org-confirm-elisp-link-function) (funcall org-confirm-elisp-link-function (format "Execute \"%s\" as elisp? " (org-add-props cmd nil |