emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Allen Li <darkfeline@felesatra.moe>
Cc: 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, 02 Oct 2018 10:14:22 -0400	[thread overview]
Message-ID: <877ej0xwox.fsf@norang.ca> (raw)
In-Reply-To: <87k1n0ydpx.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 02 Oct 2018 10:06:34 +0200")

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

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

I also prefer the current behaviour.

I regularly use C-c C-, e C-c ' C-y C-c '

to create and populate my example blocks.  This handles the newline
correctly and does not break the syntax.  This also has the benefit of
properly escaping text that interferes with org's syntax.

When you have text in the kill buffer that looks like org headlines it
pastes outside the example block -- which is proper behaviour when
moving headlines around.

try this:

C-c C-, e C-y
with the following your yank buffer

--------
*** one
some text
*** two
more text
--------

You can't paste that inside

#begin_example
#end_example

or

#begin_example

#end_example

Regards,
Bernt

  parent reply	other threads:[~2018-10-02 14:14 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
2018-10-02 14:14   ` Bernt Hansen [this message]
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=877ej0xwox.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=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).