--- ../org.el 2006-05-21 21:40:41.873116136 -0400 +++ org.el 2006-05-21 21:45:26.301876392 -0400 @@ -987,6 +987,26 @@ (const :tag "with y-or-n (faster)" y-or-n-p) (const :tag "no confirmation (dangerous)" nil))) + + +(defcustom org-confirm-elisp-links 'yes-or-no-p + "Non-nil means, ask for confirmation before executing elisp links. + Elisp links can be dangerous, just thing about a link + + [[elisp:(shell-command \"rm -rf ~/*\")][Google Search]] + +This link would show up in your Org-mode document as \"Google Search\" +but really it would remove your entire home directory. Dangerous indeed. +Therefore I *definitely* advise agains setting this varaiable to nil. +Just change it to `y-or-n-p' of you want to confirm with a single key press +rather than having to type \"yes\"." + :group 'org-link-follow + :type '(choice + (const :tag "with yes-or-no (safer)" yes-or-no-p) + (const :tag "with y-or-n (faster)" y-or-n-p) + (const :tag "no confirmation (dangerous)" nil))) + + (defconst org-file-apps-defaults-gnu '((t . mailcap)) "Default file applications on a UNIX or GNU/Linux system. @@ -2666,7 +2686,7 @@ (defconst org-non-link-chars "]\t\n\r<>") (defconst org-link-types '("https?" "ftp" "mailto" "file" "news" "bbdb" "vm" - "wl" "mhe" "rmail" "gnus" "shell")) + "wl" "mhe" "rmail" "gnus" "shell" "elisp")) (defconst org-link-re-with-space (concat " %s" cmd (eval (read cmd))) + (error "Abort")))) + (t (browse-url-at-point)))))) @@ -8022,6 +8052,7 @@ (delete-window (get-buffer-window "*BBDB*")) (error "No matching BBDB record"))))) + (defun org-follow-gnus-link (&optional group article) "Follow a Gnus link to GROUP and ARTICLE." (require 'gnus) @@ -12569,7 +12600,7 @@ (not descp)))) (concat "") (concat "" desc ""))))) - ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell")) + ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell" "elisp")) (setq rpl (concat "<" type ":" (save-match-data (org-link-unescape path)) ">"))))