emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Adam Faryna <adamfaryna@gmail.com>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87o9i5ilss.fsf@bzg.fr> (raw)
In-Reply-To: CABEF3YHEtvFj_FYdPvKU5YamXdg7_2fYxmoktEfZVA+b02TSYg@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

Hi Adam,

Adam Faryna <adamfaryna@gmail.com> 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-capture.el.patch --]
[-- Type: text/x-diff, Size: 546 bytes --]

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))

      reply	other threads:[~2018-04-26 23:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 16:48 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/)] Adam Faryna
2018-04-26 23:34 ` Bastien [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9i5ilss.fsf@bzg.fr \
    --to=bzg@gnu.org \
    --cc=adamfaryna@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).