emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: "E.L.K." <some.any.key@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: [patch] When inserting entry template, don't include last newline in narrowed zone
Date: Sun, 28 Jun 2020 12:28:14 -0400	[thread overview]
Message-ID: <87h7uvb1ep.fsf@kyleam.com> (raw)
In-Reply-To: <CAF+cOoMXJOkeWWG7p4NdhtzkebNUrEiajtZbk9w8-q+Fa-ohHQ@mail.gmail.com>

E.L.K. writes:

> Hello.
>
> Org 9.3.6: when inserting the entry by capture mechanics, it narrows buffer
> in a way that cursor can be moved to the last line, which is the beginning
> of next (non-capture template) line in the original unnarowed buffer.
>
> So this allows to: start capture, move point to the very last char of the
> narrowed buffer, insert something. If this line in unnarowed buffer was
> start of heading, it breaks structure of document.
>
> This is patch in attempt to fix it. I followed same approach as in
> org-capture-place-item function.

Thanks.  AFAICT this issue, along with the hidden SCHEDULE line you
mention in the next commit, is resolved on the master branch (what will
be v9.4).  The last commit in this area is 6882478ca (capture: Fix
org-capture-place-entry narrow bounds, 2020-05-29).

> Common subdirectories: org-9.3.6/etc and /home/elk/.emacs.d/elpa/org-9.3.6/etc
> diff -U5 org-9.3.6/org-capture.el /home/elk/.emacs.d/elpa/org-9.3.6/org-capture.el
> --- org-9.3.6/org-capture.el	2020-06-15 19:04:19.061012833 +0300
> +++ /home/elk/.emacs.d/elpa/org-9.3.6/org-capture.el	2020-06-28 13:08:04.446045559 +0300

For future reference: This doesn't quite match this project's
conventions for patch submissions.  More information is here:
<https://orgmode.org/worg/org-contribute.html>.

Thanks again.


      parent reply	other threads:[~2020-06-28 16:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 10:14 [patch] When inserting entry template, don't include last newline in narrowed zone E.L.K.
2020-06-28 11:17 ` E.L.K.
2020-06-28 16:28 ` Kyle Meyer [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=87h7uvb1ep.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=some.any.key@gmail.com \
    /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).