From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id eKd2N7p/+F5hFwAA0tVLHw (envelope-from ) for ; Sun, 28 Jun 2020 11:32:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oHRJM7p/+F6lCAAAB5/wlQ (envelope-from ) for ; Sun, 28 Jun 2020 11:32:10 +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 2ABCB94051F for ; Sun, 28 Jun 2020 11:32:10 +0000 (UTC) Received: from localhost ([::1]:40344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpVXb-0001MC-E0 for larch@yhetil.org; Sun, 28 Jun 2020 07:32:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpVJU-0005KR-Ty for emacs-orgmode@gnu.org; Sun, 28 Jun 2020 07:17:32 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:45915) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpVJR-0003tS-I3 for emacs-orgmode@gnu.org; Sun, 28 Jun 2020 07:17:32 -0400 Received: by mail-wr1-x42b.google.com with SMTP id s10so13607263wrw.12 for ; Sun, 28 Jun 2020 04:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=2dm98w//99KE7CPWiMpE/z7TfmKNtCtgX/uvHFA6Ydc=; b=AktMooGCVTTfvFpIJcNMTC9qvu8cAmoUf0hOni2x9+UPyFMA0YAfnVTlb/s26PZfxQ wmQ1W6kbg/JPD1e2dp9UnDofM9VRjLDTTBFYg5kI7tgjBrEkiPy/RY72g9Eb8RdtvLiL GsPZ0YDj30NtxjTKCV5/sTYbJx22lE12elmbMt708/QJ7hmIH0RlDb1Z+q/3XdufuDv+ xdb50j0Uv3tXjXVufQ5UpsByKpRuiR2FWjs3io0nJhQmBjiiXTFDmuYAkFO9O6BeVOOH bWZ4XxcRFwBNU5zQmrX9L6RpasxTgBVMVycW07yOPgNFiTk3kL+tXujk67NrpLPecRqy ANMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=2dm98w//99KE7CPWiMpE/z7TfmKNtCtgX/uvHFA6Ydc=; b=cVVkeD76tJZSmk3kOgNO7gZC7zSV1CnRs4V4r/ttmXpY0zmwJZmU+S71JUfIkigIv/ kwT359UZ9TgDFEzZPeDHwkzVHjR+Yflg/EkrLOQel8yQvxAaSDxMYkHYQ0WL+sO3N2gM LlrL29OXaL8wPDS0GxC9UPMwYXO35svFVtAxTINl60/iqP+qvL75zQ+x9DVOHnBnan6Q bSykyIMz2EJId52b/YfMt9ERoA7yeSuplXtklcTUPhUyh650qX8RGPJ3IG2ppEyNZHzo GDYakTla9K70egM2lnlQgYgnsA/ODJkuHPKzNZBlNmBVSXrBIfnf3TO8YX6PMNbIIKFl uW2g== X-Gm-Message-State: AOAM5316habO4fa8oo8+KIQWqPECxi0MYX3erR17idnC0De9e1riflWT rloh4v33wLwzL6CC0xVBFInB/ME/nz7uKMj7uX5VnOXN X-Google-Smtp-Source: ABdhPJxPSLZ5vxMNlsJvMCfOco4XBvoRlpo1J8ZdT/YQd6yEsURVxaaS1pGSKnkblTYtV3qwaBn00QgVUm13xoTryOs= X-Received: by 2002:adf:c142:: with SMTP id w2mr11837500wre.337.1593343047708; Sun, 28 Jun 2020 04:17:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "E.L.K." Date: Sun, 28 Jun 2020 14:17:16 +0300 Message-ID: Subject: Re: [patch] When inserting entry template, don't include last newline in narrowed zone To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000005d335805a92316c2" Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=some.any.key@gmail.com; helo=mail-wr1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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=gmail.com header.s=20161025 header.b=AktMooGC; dmarc=pass (policy=none) header.from=gmail.com; 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.71 X-TUID: HWDOc0OCpsCK --0000000000005d335805a92316c2 Content-Type: text/plain; charset="UTF-8" Just found an issue with this patch: if I try to schedule the item, SCHEDULED and timestamp get inserted into invisible area. Thanks, Alexey On Sun, Jun 28, 2020 at 1:14 PM E.L.K. wrote: > 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, > Alexey > --0000000000005d335805a92316c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Just found an issue with this patch:= if I try to schedule the item, SCHEDULED and timestamp get inserted into i= nvisible area.

Thanks,
Alexey
<= /div>
O= n Sun, Jun 28, 2020 at 1:14 PM E.L.K. <some.any.key@gmail.com> wrote:
Hello.
Org 9.3.6: when inserting the entry by capture mechanics, it na= rrows buffer in a way that cursor can be moved to the last line, which is t= he beginning of next (non-capture template) line in the original unnarowed = buffer.

So this allows to: start capture, mov= e 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 fo= llowed same approach as in org-capture-place-item function.

<= /div>
Thanks,
Alexey
--0000000000005d335805a92316c2--