I just realized that the test for field being non-nil is superfluous in the example below -- the usual copy and paste mess got me. Thus, you may omit it, i.e. use
(concat "companie: " (buffer-substring ...)) instead of (concat "companie: " (and field (buffer-substring ...))) Bianca. On Tue, Aug 9, 2011 at 5:05 PM, Bianca Lutz <bia...@googlemail.com> wrote: > Hi Karl, > > I do not know how to accomplish this with a single field but the > following workaround might be sufficient: > > ,----[ ~/snippets/org-mode/vkcomp ] > | # name : expand link to company > | # -- > | [[file:~/share/all/org-mode/contacts.org::*$1][${2:$$(unless yas/modified-p > | (let ((field (nth 0 (yas/snippet-fields (first (yas/snippets-at-point)))))) > | (concat "companie: " > | (and field (buffer-substring > | (yas/field-start field) > | (yas/field-end field))))))]] $0 > `---- > > As long as the first field is active the second one is empty, thus, no > troublesome link hiding will occur. As I said, this isn't exactly what > you were asking for, since you have to press TAB a second time to > actually exit the snippet. > > Best regards, > Bianca.