Hi, Org mode people. I had some misery trying to debug a special personal machinery to capture URLs from Chrome into Org. Not worth detailing here. And moreover, as it works now, I'm happy with this.
However, I had to make the following modification to get it going. I'm not sure what are the meaning of "beg" and "end" in this function, so someone knowledgeable should check if (point) is appropriate as a value. One sure thing is that "beg" and "end" should be initialized, as they get later consulted in the function, and whenever :exact-position got a value, that initialization does not occur. François P.S. This is using a copy of the Git repository as updated yesterday. diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 566fb96..783fe70 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -913,7 +913,8 @@ it. When it is a variable, retrieve the value. Return whatever we get." beg end) (cond ((org-capture-get :exact-position) - (goto-char (org-capture-get :exact-position))) + (goto-char (org-capture-get :exact-position)) + (setq beg (point) end (point))) ((not target-entry-p) ;; Insert as top-level entry, either at beginning or at end of file (setq beg (point-min) end (point-max)))