From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uP5EIjJla1+jFQAA0tVLHw (envelope-from ) for ; Wed, 23 Sep 2020 15:09:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8L9eHjJla1/sUQAA1q6Kng (envelope-from ) for ; Wed, 23 Sep 2020 15:09:38 +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 07854940653 for ; Wed, 23 Sep 2020 15:09:37 +0000 (UTC) Received: from localhost ([::1]:47426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL6Ol-0002Ie-Jd for larch@yhetil.org; Wed, 23 Sep 2020 11:09:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kL6OC-0002Gb-TI for emacs-orgmode@gnu.org; Wed, 23 Sep 2020 11:09:00 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:46327) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kL6OB-0002Gb-3E; Wed, 23 Sep 2020 11:09:00 -0400 Received: by mail-pl1-x629.google.com with SMTP id f1so6984265plo.13; Wed, 23 Sep 2020 08:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=O3PxmCRTkZFxuh6TqKsQdjiPWyZxh7CtSo+q4yVH1Wo=; b=ItibylZliyh8fJkySi800buefvslYaMpPPrXs3X5KOPmEn9Y+ntp7BESws+RYU310Q Wa/wgXNJ5vjqRUEWDj1Kxo49t2ycPjAHPUkCH83NUefw3jh31svvmOrbdttdtcqm1svS 5hChUGVA/aiWkeLKG8sqY8NZ8V7AZbPXo8WjBH3g0vG6BhwFpqbYsbzqZtcoFUA4+sD5 MmEL0et8TrcqJXIZe6uhVe/PpqdbMZ2ELuxmMf0fTcsD+i9hm4UjjyCvojIhWZgtPjsF vQKorOiG+oEpj09dINUN4ocQF6einXctkmeDU2rpUwZ8IovfUJHx+PaOcYz7Z8ck3xCB CsFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=O3PxmCRTkZFxuh6TqKsQdjiPWyZxh7CtSo+q4yVH1Wo=; b=rmTzvNZC8q0bzftoxgtnGCIhARBklizqkfFDwhOpE4rXJtr/rOLAEq9BiKmzsnQ7Pj cxOFxr4QFyg9IrGF0LZIgw+0LqNVFW4Vto9suCCObdUHxQLK6LcgJB6ObkCg79gSU1JV VPmc/Xy0LoVSa06wYSIH40LDj5VIOKtovLX6v9/xbExJlACWwvtBhE5VB6vcZ71fMK0f t2M9MH3qYFqMQ0aQHfm7rXipwE76X2dOSYraE438ktvaeZgg4SQJaKSv0jXWtlrPvJKq GBELMoSVndhfv+51nxZKcsZGh0TBqFada+SXDCEf/By6EkttyuCoAIz26v4KHZ/z32Xq lzvQ== X-Gm-Message-State: AOAM533w5BoM8IkBrs9j0+bPMHTkKtARvOK92I1c/rjWYxuVxVvfdCm8 cIh1GRUCavTpxJLGOOPeDzM= X-Google-Smtp-Source: ABdhPJyLhiroRJmRDsMhJ7DFLrSCwpR49nk/GOTWN2YfEhwUiefZuqSl/oHswgER+A9gkSUvoawpVQ== X-Received: by 2002:a17:902:a512:b029:d2:22a3:31ce with SMTP id s18-20020a170902a512b02900d222a331cemr247890plq.77.1600873737399; Wed, 23 Sep 2020 08:08:57 -0700 (PDT) Received: from localhost ([173.254.200.139]) by smtp.gmail.com with ESMTPSA id y4sm76683pfr.46.2020.09.23.08.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 08:08:56 -0700 (PDT) From: Ihor Radchenko To: numbchild@gmail.com, Bastien Subject: Re: Bug: org-cycle stops working on Org files with empty lines at end of buffer [9.4 (9.4-elpaplus @ /home/brentg/.emacs.d/elpa/org-plus-contrib-20200914/)] In-Reply-To: <5f6b56a1.1c69fb81.ea6da.e0f1@mx.google.com> References: <50f165b2-bdaf-4861-aab5-122cfef7d67c@www.fastmail.com> <5f6aa2e2.1c69fb81.9bff7.9127@mx.google.com> <87k0wkheik.fsf@gnu.org> <5f6b56a1.1c69fb81.ea6da.e0f1@mx.google.com> Date: Wed, 23 Sep 2020 23:07:51 +0800 Message-ID: <87d02c5y60.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=yantar92@gmail.com; helo=mail-pl1-x629.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: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: , Cc: Nicholas Savage , emacs-orgmode@gnu.org 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=ItibylZl; 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.21 X-TUID: HylpILhE6W2I > I did a git bisect test, found the bad commit. > "ee3c3b554 | * bad org.el: Allow empty subtrees to be folded back" Additional observation: The unfolding does not happen because org-cycle-show-empty-lines _always_ reveals trailing empty lines at the end of buffer. It breaks the assumption in org-cycle-internal-local that end of folded subtree must always be the same as the end of the folded region. Before ee3c3b554, that situation was handled by additional check, but it is not the case anymore. Best, Ihor stardiviner writes: > Bastien writes: > >> Hi, >> >> stardiviner writes: >> >>> I also did a bisect debug. Found the function ~org-cycle-show-empty-lines~ in hook >>> ~org-cycle-hook~ caused this problem. >> >> Did you find the commit that introduces this bug? > > I did a git bisect test, found the bad commit. > > "ee3c3b554 | * bad org.el: Allow empty subtrees to be folded back" > >> >> Also, if you can provide a patch, please go ahead. >> > > Can't help on this. Don't know much on regexp matching and position boundries etc. > > Will keep improving skill. > > -- > [ stardiviner ] > I try to make every word tell the meaning that I want to express. > > Blog: https://stardiviner.github.io/ > IRC(freenode): stardiviner, Matrix: stardiviner > GPG: F09F650D7D674819892591401B5DF1C95AE89AC3