From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Bug: org-capture when :prepend t org-capture-kill removes one char too much from target buffer [9.1.7 (9.1.7-18-g2f587d-elpaplus @ /Users/devil/.emacs.d/elpa/org-plus-contrib-20180312/)] Date: Fri, 27 Apr 2018 01:34:59 +0200 Message-ID: <87o9i5ilss.fsf@bzg.fr> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBqPo-0008LD-1Q for emacs-orgmode@gnu.org; Thu, 26 Apr 2018 19:35:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBqPn-0001hW-0a for emacs-orgmode@gnu.org; Thu, 26 Apr 2018 19:35:04 -0400 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" To: Adam Faryna Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Adam, Adam Faryna writes: > When use org-capture which template that targets file with :prepend > t, org-capture-kill removes one char too much from target buffer, in > result next item in target file looses one of asterisk. Do you still have this issue? If so, can you test the attached patch against org-capture.el? If reverts 2f587d4, which may be problematic in your case. Thanks a lot for reopening and double-checking this issue. Best, -- Bastien --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=org-capture.el.patch diff --git a/lisp/org-capture.el b/lisp/org-capture.el index cd54491..fe308e0 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1114,7 +1114,7 @@ may have been stored before." (setq level (org-get-valid-level (if (org-at-heading-p) (org-outline-level) 1) 1)) - (if reversed? (outline-next-heading) (org-end-of-subtree t t))) + (if reversed? (outline-next-heading) (org-end-of-subtree t))) ;; Insert as a top-level entry at the beginning of the file. (reversed? (goto-char (point-min)) --=-=-=--