From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yAJ+FlFoaWIdzQAAbAwnHQ (envelope-from ) for ; Wed, 27 Apr 2022 17:59:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YP+3FVFoaWLt4wAAG6o9tA (envelope-from ) for ; Wed, 27 Apr 2022 17:59:13 +0200 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 EF55224D4E for ; Wed, 27 Apr 2022 17:59:12 +0200 (CEST) Received: from localhost ([::1]:35832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njk4N-0002kj-An for larch@yhetil.org; Wed, 27 Apr 2022 11:59:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njk3p-0002k3-QL for emacs-orgmode@gnu.org; Wed, 27 Apr 2022 11:58:37 -0400 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]:34731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njk3o-0004pn-22 for emacs-orgmode@gnu.org; Wed, 27 Apr 2022 11:58:37 -0400 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-2f7c424c66cso24187157b3.1 for ; Wed, 27 Apr 2022 08:58:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rIHJIlvAcvfYKCwUR3or3hN5ag2NSwVrEpHgEEK6stA=; b=C2J0gh4Q81v+MjkiR1zB+PWD7SeVPnxALk8zbGnFRXrs8riotFY7p+J9RjezeWGwKN zXyezT631+0GTN2GunDbxCvm0eMP2Std2Z8XCZ1O+PPKLlQnpL2hJ73MWRGL47JssrB6 XSJt3g0ToIdUI48Kn/FuBJzBEOB+ftESz7JFAJjJQjWjvOZc9vImsHA4RGALrvh7HsMl 8gUv719Bh8Tnzn47W6YnurqyRUC2InEyPtDSvFpaZy2ZRbuOTVDofaqt1LvCf2bDOUHQ q588H+EjbC9rkQrsBJt223aNFxXKZU5Jz/9UqU4B/xhmXqnzSycyPBpNKe2QbtnQ9d+K ymKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rIHJIlvAcvfYKCwUR3or3hN5ag2NSwVrEpHgEEK6stA=; b=QpPa6UR2L+IabX7+csNxr89IixIy9LxAmrLt1+hK1mWQPRryBx8Kx5DaGwyFK4qW6A rn9S0oNPAUtsqu+t+KQMf19am/55kqtFDkGDOmPdj6E6ar/CPnQktntYye08YivfQdWe gI/GDh8w4R6H5/nBn7deQCZJ2t0W/bKxqa5Mz1j5FIRExv6Bdv57tOzbMxpVq70zHAO5 hWEePrL/Hq/AAJpvUZDX9tQQMDu1y7U0EqdS0/zTFkPGGLkyndfW3SAkBIganuzyARnv C0JR1Z0L5cvNB0Evfj8SOnQocBSN8Mw4NU4jd9nYw1sRkUmIJhP90uq1kpJme0OsNyFK pUOQ== X-Gm-Message-State: AOAM531T4Kxfq832UJab+4909cgkI9dmEtnqAer+eaLU7K8oDtcEUNqo SztF1K6pNEZaQu51Wu9hBRXQnKCN9ik8pWR5sgRpK3TpzalM9w== X-Google-Smtp-Source: ABdhPJxmGZd50evm6zzciQ3nPoOhDE4IJsHddG+mCBTwkALXL5rK2iYqEeSI6yQ8s1OE/BRYFDVbU1VX46uX7A34VQI= X-Received: by 2002:a05:690c:d:b0:2d0:e02a:6cda with SMTP id bc13-20020a05690c000d00b002d0e02a6cdamr29651408ywb.192.1651075114960; Wed, 27 Apr 2022 08:58:34 -0700 (PDT) MIME-Version: 1.0 References: <87o80mvrkv.fsf@localhost> In-Reply-To: <87o80mvrkv.fsf@localhost> From: Skip Collins Date: Wed, 27 Apr 2022 11:58:24 -0400 Message-ID: Subject: Re: [BUG] buffer displays incorrectly after capture To: Ihor Radchenko Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::112a; envelope-from=skip.collins@gmail.com; helo=mail-yw1-x112a.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-org list Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651075153; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rIHJIlvAcvfYKCwUR3or3hN5ag2NSwVrEpHgEEK6stA=; b=C0UIeiHv1/n1KhOQYbrhPMfvahQdQkjGTZ+XoiGQK8VxI+avi7t5CWksaJEJLLkVbW01zt d3Iy1Xel7xzqv8uIM5VedrF4odB58Bni393OmPnmwoGwxFwc/XiMv7riDp1VNfTTVSd2BU p6ZiRWzWPCGBX5DPG84f2qH5reYx/1q7Bk8ZQrxBU9xuGHmqQRf5yr+ugOPHApzuwh0+OL GSHvleS0jxLFs4V2WDicfv1U0yCDkjMERGq0ZTrESiJ1Qm26aUsGQdi8GiyPtLx7k7t83i n+htMJ3jE1YD3xf1lORVizogtfwATGhfrorl0bhqR+uOUc9Ea+fr3bw00WZk1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651075153; a=rsa-sha256; cv=none; b=CwgIpYwrjp+fP9Exgd6d3EylQ6Bn2/HWE1JSUba+PnyBB+iS3PdD+LK7asafAaIyRVED17 JiZqyFo3cGYYEVnC4IjM14B3CVmxdmzeAQpXOHzxfkWLKtbe3gnDDoSAIc6HX4ZMjq6NN+ M/QEo2OwPU95u2A1pGBflcW5/RoW+SRMfuqdBPoMRp6hSFNHeKDaoCtDGYbvz5PXH0kXmZ 955qJ4+ITUYFSVukDpE9FX/SdApwazIxqjanF1XuVJe6HfFJTYi9XOIOjp8ooulITby+xG 9jtUY3PCai4O9YVShhi1b8dmR5i27TYj7udqOY0XsIMlA2sIdOf3uurImq7R4g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=C2J0gh4Q; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=C2J0gh4Q; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EF55224D4E X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: jkmLR68Uny60 On Wed, Apr 27, 2022 at 4:48 AM Ihor Radchenko wrote: > Fixed in 2d6f26c05 on main. And no, it was not that easy to fix. > Captured headlines may or may not need to be unfolded. Thanks. I confirm that behavior is correct for folded level 1 headlines. But the problem still exists at level 2 and deeper: 1. Open emacs with an empty file: emacs test.org 2. From emacs, enable auto-revert-mode: M-x auto-revert-mode 3. From a shell, add text to the file: echo "* foo\nsome text\n** bar\nmore text\n" >>test.org 4. From emacs, cycle global visibility twice, so that the second level headline is visible but folded: S-TAB S-TAB 5. Observe the two folded headlines: * foo... ** bar... 6. From the shell, add another level 2 headline at the end of the file: echo "** baz\n" >>test.org 7. Observe that the new level 2 headline is not displayed as expected: * foo... ** bar... 8. From emacs, move the cursor onto the "** bar" headline and cycle visibility: TAB 9. Observe that the new level 2 headline still does not appear, but a misplaced folding ellipsis does appear at the end: * foo... ** bar more text ... 10. Cycle global visibility twice: S-TAB S-TAB 11. Observe the correct display of all headlines: * foo... ** bar... ** baz