Can I tell org mode to just open the link without asking for confirmation?
Yes. Org provides the customizable variable org-link-elisp-skip-confirm-regexp. Set it accordingly:
(setq org-link-elisp-skip-confirm-regexp "\\`org-todo-list\\'")
You really want to include the begin-of-string (\` ) and end-of-string (\') matchers to catch links like [[elisp:(remove-all-files); org-todo-list]][Evil link]].
If you use more commands, add them to the regular expression as an alternative via |:
(setq org-link-elisp-skip-confirm-regexp "\\`\\(org-todo-list\\|org-agenda-list\\)\\'")
If you have many commands, you probably want to use a list for that instead:
(let ((safe-commands '(org-agenda-list
org-clock-goto
org-goto-calendar
org-tags-view
org-todo-list)))
(setq org-link-elisp-skip-confirm-regexp
(concat "\\`\\(" (mapconcat #'symbol-name safe-commands "\\|") "\\)\\'")))
For more information, see org-link-elisp-skip-confirm-regexp's documentation.
(LDAPsearch "computername"). So, the only dubious character I can think of is the quotation characters (ASCII character 34), though I escaped everything properly and it works just fine without string delimiters. – Phoenix Jan 02 '24 at 18:05