From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UH1XK0HF+F7xXQAA0tVLHw (envelope-from ) for ; Sun, 28 Jun 2020 16:28:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wBYHJ0HF+F5xIgAAbx9fmQ (envelope-from ) for ; Sun, 28 Jun 2020 16:28:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0A7A69400C1 for ; Sun, 28 Jun 2020 16:28:49 +0000 (UTC) Received: from localhost ([::1]:36724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpaAi-00026q-0Y for larch@yhetil.org; Sun, 28 Jun 2020 12:28:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpaAJ-000269-Fa for emacs-orgmode@gnu.org; Sun, 28 Jun 2020 12:28:23 -0400 Received: from pb-smtp20.pobox.com ([173.228.157.52]:61977) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpaAH-0007kr-4x for emacs-orgmode@gnu.org; Sun, 28 Jun 2020 12:28:23 -0400 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id B8E55C96C9; Sun, 28 Jun 2020 12:28:18 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=FAO/77TaRb0zAKmthz4noA1p2c4=; b=VBnMjT OZWQRU2bzGi68LTmFKdGAYl6/3fFxWmXZOBy61/4At9Rr2CNCTGhSPX4piite0sb /AflP+0/nLfvl6q0LalbxBNzEofmJtxkDe9hbeOvS9cotLxMzBhaSYoYFL8aVna+ MK3Fn+6NVG9eqBH3cN0zqREf5AZcIQy9iF0w8= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id B1406C96C8; Sun, 28 Jun 2020 12:28:18 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=8NgOVhqSLf4tZVYc4bIA4+4nLXHfEto8DAVNO8saZeQ=; b=Lo0iPykP+GNYqtIT3lbTCE4k2YNYtYcfBNJ4w5arlOF8BmMGut79L1ri3zdKt0eXv9vmU7WSFoTSrzA5UozFR2JU7lY8tbYi2mXMdltLbMFnkJNnLkwFjP8zISCqeIsl7jO8/5opVEkzqseTUvofWw2GiuFVs53L9ipMrmJdBns= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 32B0DC96C7; Sun, 28 Jun 2020 12:28:16 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: "E.L.K." , emacs-orgmode@gnu.org Subject: Re: [patch] When inserting entry template, don't include last newline in narrowed zone In-Reply-To: References: Date: Sun, 28 Jun 2020 12:28:14 -0400 Message-ID: <87h7uvb1ep.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 5E866450-B95C-11EA-9D7D-B0405B776F7B-24757444!pb-smtp20.pobox.com Received-SPF: pass client-ip=173.228.157.52; envelope-from=kyle@kyleam.com; helo=pb-smtp20.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/28 12:28:18 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=VBnMjT O; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=Lo0iPykP; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: Tn0sHfQRSNGE E.L.K. writes: > Hello. > > Org 9.3.6: when inserting the entry by capture mechanics, it narrows buffer > in a way that cursor can be moved to the last line, which is the beginning > of next (non-capture template) line in the original unnarowed buffer. > > So this allows to: start capture, move point to the very last char of the > narrowed buffer, insert something. If this line in unnarowed buffer was > start of heading, it breaks structure of document. > > This is patch in attempt to fix it. I followed same approach as in > org-capture-place-item function. Thanks. AFAICT this issue, along with the hidden SCHEDULE line you mention in the next commit, is resolved on the master branch (what will be v9.4). The last commit in this area is 6882478ca (capture: Fix org-capture-place-entry narrow bounds, 2020-05-29). > Common subdirectories: org-9.3.6/etc and /home/elk/.emacs.d/elpa/org-9.3.6/etc > diff -U5 org-9.3.6/org-capture.el /home/elk/.emacs.d/elpa/org-9.3.6/org-capture.el > --- org-9.3.6/org-capture.el 2020-06-15 19:04:19.061012833 +0300 > +++ /home/elk/.emacs.d/elpa/org-9.3.6/org-capture.el 2020-06-28 13:08:04.446045559 +0300 For future reference: This doesn't quite match this project's conventions for patch submissions. More information is here: . Thanks again.