From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Perepelytsya Subject: Bug: Using org-capture with a template adds an unnecessary newline regardless of flags set [9.0.5 (9.0.5-elpa @ /home/igor/.emacs.d/elpa/org-20170210/)] Date: Sat, 15 Apr 2017 05:57:01 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1140da426e41aa054d31948b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czKS1-0003N4-Jf for emacs-orgmode@gnu.org; Sat, 15 Apr 2017 05:57:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czKS0-0004VX-NQ for emacs-orgmode@gnu.org; Sat, 15 Apr 2017 05:57:05 -0400 Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:35820) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1czKS0-0004Uy-Ed for emacs-orgmode@gnu.org; Sat, 15 Apr 2017 05:57:04 -0400 Received: by mail-lf0-x22c.google.com with SMTP id 75so49485039lfs.2 for ; Sat, 15 Apr 2017 02:57:03 -0700 (PDT) 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: emacs-orgmode@gnu.org --001a1140da426e41aa054d31948b Content-Type: text/plain; charset=UTF-8 Using a template with org-capture to create a new org entry will add an unwanted newline after it. This occurs regardless of the contents of the template file, whether or not the 'empty-lines 1' / 'empty-lines-after 1' checkboxes are ticked in org-customize, or `empty-lines` / `empty-lines-after` keys are set to 0 manually. I expected that there would be no newline added by default after a template is inserted into an org-capture buffer. This appears to happen because `org-capture-place-(entry/plain-text/etc)` defuns in org-capture.el have `(org-capture-empty-lines-after 1)` in them by default. Changing this to `(org-capture-empty-lines-after)` and byte-compiling the file fixes the issue. I am not aware of any reason for 1 to be the default forced value here. Emacs : GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.30) of 2016-09-24 Package: Org mode version 9.0.5 (9.0.5-elpa @ /home/igor/.emacs.d/elpa/org-20170210/) --001a1140da426e41aa054d31948b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Using a template with org-capture to create a new org entr= y will add an
unwanted newline after it. This occurs regardless of the c= ontents of the
template file, whether or not the 'empty-lines 1'= / 'empty-lines-after
1' checkboxes are ticked in org-customize,= or `empty-lines` /
`empty-lines-after` keys are set to 0 manually. I ex= pected that there
would be no newline added by default after a template = is inserted into
an org-capture buffer.

This appears to happen be= cause
`org-capture-place-(entry/plain-text/etc)` defuns in org-capture.e= l have
`(org-capture-empty-lines-after 1)` in them by default. Changing = this to
`(org-capture-empty-lines-after)` and byte-compiling the file fi= xes the
issue. I am not aware of any reason for 1 to be the default forc= ed value
here.

Emacs=C2=A0 : GNU Emacs 25.1.1 (x86_64-unknown-lin= ux-gnu, GTK+ Version 2.24.30)
=C2=A0of 2016-09-24
Package: Org mode v= ersion 9.0.5 (9.0.5-elpa @ /home/igor/.emacs.d/elpa/org-20170210/)

<= /div> --001a1140da426e41aa054d31948b--