From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen 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 Message-ID: <877ej0xwox.fsf@norang.ca> References: <87k1n0ydpx.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7LRm-0008Lu-1u for emacs-orgmode@gnu.org; Tue, 02 Oct 2018 10:14:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7LRg-0008Bs-9N for emacs-orgmode@gnu.org; Tue, 02 Oct 2018 10:14:46 -0400 Received: from outbound1b.ore.mailhop.org ([54.200.247.200]:23051) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g7LRg-0008Ap-2Q for emacs-orgmode@gnu.org; Tue, 02 Oct 2018 10:14:40 -0400 In-Reply-To: <87k1n0ydpx.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 02 Oct 2018 10:06:34 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Allen Li Cc: Org Mode List Nicolas Goaziou writes: > Hello, > > Allen Li 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