>> On a related note, how would I accomplish this - "Create the >> headline automagically everytime but suppress the prompt". >> >> This is the code snippet as it is in git today - >> >> ((and (not org-link-search-inhibit-query) (eq >> org-link-search-must-match-exact-headline 'query-to-create) >> (y-or-n-p "No match - create this as a new heading? ")) >> (goto-char (point-max)) (or (bolp) (newline)) (insert "* " s >> "\n") (beginning-of-line 0)) >> >> >> Shouldn't the above block should instead read thus >> >> ((and (eq org-link-search-must-match-exact-headline >> 'query-to-create) (or org-link-search-inhibit-query (y-or-n-p "No >> match - create this as a new heading? ")) (goto-char (point-max)) >> (or (bolp) (newline)) (insert "* " s "\n") (beginning-of-line 0))
> Why??? > The above code would stop at the first form that returns nil, for > example (insert ...) or even (newline) Mistake on my part. (Not a native speaker of elisp here) ((and (eq org-link-search-must-match-exact-headline 'query-to-create) (or org-link-search-inhibit-query (y-or-n-p "No match - create this as a new heading? "))) (goto-char (point-max)) (or (bolp) (newline)) (insert "* " s "\n") (beginning-of-line 0)) My gut feeling is that there is some inconsistency in the way org-link-search-must-match-exact-headline and org-link-search-inhibit-query work together. Jambunathan K. _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode