emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Miguel Morin <blind.pew@cantab.net>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]
Date: Tue, 11 Feb 2020 15:34:41 +0000	[thread overview]
Message-ID: <m2v9odp27i.fsf@cantab.net> (raw)
In-Reply-To: <87k151czrg.fsf@gnu.org>

Hi Bastien,

Yes, it works! I appreciate your work, thank you very much.

I tested the code with the Org 9.3.3 and confirm that the first issue I reported is fixed: now when I run `org-capture` and delete lines at the end of the org-capture buffer I cannot delete the newline that in the org buffer separates the capture item from the next heading.

The other issue I reported is still there, i.e. running this code:

```
(defun +org|insert-newlines ()
  (beginning-of-buffer) (insert "\nhello world!\n")
  (end-of-buffer) (insert "\nhello world!\n"))
+org|insert-newlines


(add-hook 'org-capture-before-finalize-hook #'+org|insert-newlines)
(+org|insert-newlines)
```

will insert "hello world!" at the beginning and end of the org buffer and not the org-capture buffer. I'm not sure if this is intended, and I never use this feature anyway. So I'm happy to close this matter here.

Miguel


On Wed, 05 Feb 2020 at 06:30 WET, Bastien wrote:

> Hi Miguel,
>
> I made a change in Org maint branch that could somehow impact the
> issue you reported.  Can you test and see if it does?
>
> Morin <blind.pew@cantab.net> writes:
>
>> In the course of fixing this, I found another bug in using the hook
>> `org-capture-before-finalize-hook`, which adds text at the beginning
>> and end of the org buffer and not in the beggining and end of the
>> capture item.
>
> If this is really another bug, please fill a different bug report for
> it, it helps us track all issues separately.
>
> Thanks,

  reply	other threads:[~2020-02-11 15:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-01 23:12 Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)] Miguel Morin
2020-01-02 22:46 ` Nicolas Goaziou
2020-01-09  7:54   ` Miguel Morin
2020-01-09 16:40     ` Nicolas Goaziou
2020-01-09 22:11       ` Miguel Morin
2020-01-11 15:58         ` Nicolas Goaziou
2020-01-11 20:13           ` Samuel Wales
2020-01-12  7:55           ` Miguel Morin
2020-02-11 11:38     ` Bastien
2020-02-14 22:22       ` Miguel Morin
2020-02-16 10:32         ` Bastien
2020-02-05  6:30 ` Bastien
2020-02-11 15:34   ` Miguel Morin [this message]
2020-02-11 16:44     ` Bastien

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=m2v9odp27i.fsf@cantab.net \
    --to=blind.pew@cantab.net \
    --cc=bzg@gnu.org \
    --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).