From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Li 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 Message-ID: References: <87k1n0ydpx.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7GFK-0003ne-UJ for emacs-orgmode@gnu.org; Tue, 02 Oct 2018 04:41:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7GFI-00044A-AR for emacs-orgmode@gnu.org; Tue, 02 Oct 2018 04:41:34 -0400 Received: from mail-it1-x12f.google.com ([2607:f8b0:4864:20::12f]:35918) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g7GFH-00043o-3N for emacs-orgmode@gnu.org; Tue, 02 Oct 2018 04:41:32 -0400 Received: by mail-it1-x12f.google.com with SMTP id c85-v6so2579192itd.1 for ; Tue, 02 Oct 2018 01:41:30 -0700 (PDT) In-Reply-To: <87k1n0ydpx.fsf@nicolasgoaziou.fr> 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: Org Mode List On Tue, Oct 2, 2018 at 8:06 AM Nicolas Goaziou wrote: > > 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. 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