Kristoffer Balintona <krisbalint...@gmail.com> writes: > I did, yes. I want to confirm because I wasn't quite sure which > direction you were trying to nudge me toward: would you like me to > ensure that the behavior introduced by the patch works well with > :prepend?
Sorry for the delay. I wanted to make sure that your patch does not create an impression that :prepend does not work with it or, alternative, to hear arguments why you think that :prepend should be ignored. > If that's the case, then is the following the expected behavior: > 1. For all three target specifications, if :prepend is nil or omitted > and the olp (for file+olp and file+olp+datetree) or headline (for > file+headline) is nil or omitted, insert the new entry at the end of > the <file-spec>. (Already done.) Nitpick: after reading this sentence again, I think we can just say "at the end of the file". Otherwise, it reads confusing. > 2. However, if :prepend is t and the olp/headline is omitted, insert the > new entry such that it is the first headline in the <file-spec>. (Or, > for file+olp+datetree, insert the datetree such that it's beginning is > the first headline.) (Not implemented.) It kind of implemented (try it). My comment was rather about the docstring that sounded like your intention is to ignore :prepend on purpose. > If the above is accurate, I'll work on a new version of the patch. Would > you recommend setting :exact-position to achieve 2, or would that get in > the way of other org-capture features? I think it should be very simple. You probably do not need to bother with setting point at all. :prepend is handled just fine by `org-capture-place-plain-text' , `org-capture-place-table-line', `org-capture-place-item', and `org-capture-place-entry'. So, it may be enough to modify the patch simply adjusting the docstring I commented on and (goto-char (point-max)) in the patch - that goto-char does nothing. Maybe you can also play around with plain/table-line/checkitem/item capture types to see if your patch is resilient. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>