emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo Vivier <leo.vivier@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org.el: Fix newline at eob in org-insert-heading
Date: Sat, 16 Feb 2019 10:31:19 +0100	[thread overview]
Message-ID: <87va1kgjvc.fsf@hidden> (raw)
In-Reply-To: <878sygp1pc.fsf@nicolasgoaziou.fr>

Hello,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> The problem is due to `eobp' returning t when point is on the last
>> character of the narrowed buffer (as explained in its docstring).
>> Since those `eobp' predicates in `org-insert-heading' are probably
>> there to ensure a newline at the end of the *file*, checking whether
>> the buffer is *narrowed* (with `buffer-narrowed-p') prior to inserting
>> the newline fixes the problem.
>
> I don't think this would be a sufficient fix, because the buffer can be
> narrowed and, yet, showing the end of the file.

Yes, this is also something that I noticed, and I’d sent another patch
that address issue as a reply to the original email.  However, not
knowing whether to submit the patch as is, squash it with the previous
one, or send it as a new thread altogether, I ended doing a clumsy job.

If you check it, you’ll see at the end of the commit message an appended
note on that issue.

> Anyway, I don't think this final newline is needed. I removed it. This
> should fix your issue. Please let me know if you encounter other
> glitches in that area.

Thank you.  I’ll let you know if I encounter anything unexpected.

Best,

P.S.: I’d sent the patches with the wrong email.  This is now resolved.
-- 
Leo Vivier
English Studies & General Linguistics
Master Student, English Department
Université Rennes 2

      reply	other threads:[~2019-02-16  9:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-11 13:38 [PATCH] org.el: Fix newline at eob in org-insert-heading Leo Vivier
2019-02-11 14:40 ` Leo Vivier
2019-02-16  8:38 ` Nicolas Goaziou
2019-02-16  9:31   ` Leo Vivier [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=87va1kgjvc.fsf@hidden \
    --to=leo.vivier@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).