From mboxrd@z Thu Jan 1 00:00:00 1970 From: pinard@iro.umontreal.ca (=?utf-8?Q?Fran=C3=A7ois?= Pinard) Subject: Capture failure [7.7] Date: Sun, 11 Dec 2011 23:24:28 -0500 Message-ID: <8739cqo1s3.fsf@iro.umontreal.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZxRG-0005Sp-9X for emacs-orgmode@gnu.org; Sun, 11 Dec 2011 23:24:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RZxRF-0005ad-Df for emacs-orgmode@gnu.org; Sun, 11 Dec 2011 23:24:30 -0500 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:54523 helo=mercure.epsilon-ti.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZxRF-0005aZ-9r for emacs-orgmode@gnu.org; Sun, 11 Dec 2011 23:24:29 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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=C3=A7ois 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)))