emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] org-link-search: Augment signature?


From: Jambunathan K
Subject: Re: [Orgmode] org-link-search: Augment signature?
Date: Fri, 20 Aug 2010 15:18:04 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (windows-nt)

    >> 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.





    




reply via email to

[Prev in Thread] Current Thread [Next in Thread]