From 9a7f9eda3c7792953f66654bb3edfb66370fb5d2 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 5 Mar 2011 11:36:15 +0100 Subject: [PATCH] Fix bug when using org-confirm-shell/elisp-link-not-regexp. --- lisp/org.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 7a071f18b..659cbe885 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9324,7 +9324,8 @@ application the system uses for this file type." ((string= type "shell") (let ((cmd path)) - (if (or (string-match org-confirm-shell-link-not-regexp cmd) + (if (or (and (not (zerop (length org-confirm-shell-link-not-regexp))) + (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? " @@ -9337,7 +9338,8 @@ application the system uses for this file type." ((string= type "elisp") (let ((cmd path)) - (if (or (string-match org-confirm-elisp-link-not-regexp cmd) + (if (or (and (not (zerop (length org-confirm-elisp-link-not-regexp))) + (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? "