emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Allen Li <darkfeline@felesatra.moe>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Bug: org-insert-structure-template leaves point at inconvenient place [9.1.14 (9.1.14-932-gf82a30-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180923/)]
Date: Tue, 2 Oct 2018 08:41:18 +0000	[thread overview]
Message-ID: <CADbSrJzfK3__0qfG3hJGyr-CD1sM1D7QciTBbMBNifQhF4ycZg@mail.gmail.com> (raw)
In-Reply-To: <87k1n0ydpx.fsf@nicolasgoaziou.fr>

On Tue, Oct 2, 2018 at 8:06 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
> Hello,
>
> Allen Li <darkfeline@felesatra.moe> writes:
>
> > org-insert-structure-template (C-c C-,) leaves point at an inconvenient
> > place (X marks the spot):
> >
> > #+begin_example
> > X#+end_example
> >
> > My expectation is that right after inserting the template, I can start
> > typing or yank right into it:
> >
> > #+begin_example
> > X
> > #+end_example
>
> Use `C-o'.
>
> I think the current behaviour is better because you can yank text within
> the newly created block without dealing with a blank line later on.

But it works less well when you yank text that doesn't have a trailing newline.

Either you need to press C-o in one case, or DEL/backspace in the
other (to get rid of the extra blank line).

I guess I don't have a huge preference, but the current behavior is
annoying because it's the opposite of the old template behavior (e.g.
< s TAB).

One advantage that I can think of is that an extra newline is an
annoyance but otherwise harmless, whereas missing a newline messes up
the syntax.

#+begin_example
yanked text

#+end_example

#+begin_example
yanked text#+end_example

>
> Regards,
>
> --
> Nicolas Goaziou

  reply	other threads:[~2018-10-02  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02  0:01 Bug: org-insert-structure-template leaves point at inconvenient place [9.1.14 (9.1.14-932-gf82a30-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180923/)] Allen Li
2018-10-02  8:06 ` Nicolas Goaziou
2018-10-02  8:41   ` Allen Li [this message]
2018-10-02 14:14   ` Bernt Hansen
2018-10-02 19:16     ` Allen Li
2018-10-02 19:35       ` Nicolas Goaziou

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=CADbSrJzfK3__0qfG3hJGyr-CD1sM1D7QciTBbMBNifQhF4ycZg@mail.gmail.com \
    --to=darkfeline@felesatra.moe \
    --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).