From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GJePETA09WG9RwAAgWs5BA (envelope-from ) for ; Sat, 29 Jan 2022 13:33:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2DUvDjA09WFhKQAAauVa8A (envelope-from ) for ; Sat, 29 Jan 2022 13:33:52 +0100 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 C5458384FB for ; Sat, 29 Jan 2022 13:33:51 +0100 (CET) Received: from localhost ([::1]:34446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDmvO-0004FF-FW for larch@yhetil.org; Sat, 29 Jan 2022 07:33:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDm3m-0004lr-Hn for emacs-orgmode@gnu.org; Sat, 29 Jan 2022 06:38:26 -0500 Received: from [2607:f8b0:4864:20::629] (port=36643 helo=mail-pl1-x629.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDm3f-00011l-Eo; Sat, 29 Jan 2022 06:38:20 -0500 Received: by mail-pl1-x629.google.com with SMTP id b15so8499814plg.3; Sat, 29 Jan 2022 03:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z2/LMMKIUId5tSE9ImgrOqT45METUbjcs/pXSH0dA1s=; b=R4zNvnW7PHl+pgj7XPl1TeKIowCRSKiRE+ULAKf+yfubdiId3oh/ieycOy8mu8TdUu uANBwem9OXwFptoxaMDcH4QJY8QN4i412s/+0cXCgv5lYvgVN4F8bKjXed+1GU4kw7h0 mW+cUbtpoa4Ptp9t68YqQKcRNTsFQOJa4Ew3+HYQHqogH8KY65k7JV4zqNbx39HMZYyZ fMcedG/zVaU5PjjnoMUhQR+UaWWyLKr1lE3XkIj9CLmy9H50GBzy9GnFEJG8/72MLSfc Dhgf3DVhbvBbTcp/saSyPFTQJiXyrpOWv7feyKLxG8mif/lHq6gFtEHx2f3XqkUPArgM K5Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z2/LMMKIUId5tSE9ImgrOqT45METUbjcs/pXSH0dA1s=; b=kRWzAw7ngE46mBLmNddZW1DRz8uaimhNSKC0qykwAJbrtC7fRD6+lvmI38PlKD0Zym 8IjOwK2Wu3NPs/5EMyWi8AuSS+UemVaVsxyGG6ceS/BdmAgboXvfUwwXuFnXPjx6PBKC bSM66fEVA2lGOQdauAxDZuWHD+w7ER8tfZrG33Z4GPd2phDYB+q18WQUp+XPwKJJ0TOb jjZKFMGKXwy5N5jw+T1JTKVqGXUmJMXEQZFPFHQJJalHfjWWfolDVy66P6/I2FCVozpv eQN9iVnRNo2D29fcK9CfEW/kKVfGT23CeWYc7fyot6tCb1fUusWoXhiJZWmLig7APDHq cY+g== X-Gm-Message-State: AOAM532aWkOw/JkXOc9MOumQM7knXy25oJyk2J6j8aO+bALt2P9mgGmi miFxgHcMFOATi8lxooZuX6EICnEPFkBja0uE X-Google-Smtp-Source: ABdhPJz2u1YQj4gKN+su3c2fV2cwP9T93VwQwB6d1E+m0GVVm4NAUYLTDvXvOnL+ZsSFC+xepg9gEA== X-Received: by 2002:a17:903:2093:: with SMTP id d19mr12606021plc.29.1643456297840; Sat, 29 Jan 2022 03:38:17 -0800 (PST) Received: from localhost ([209.95.60.92]) by smtp.gmail.com with ESMTPSA id a14sm13358227pfv.212.2022.01.29.03.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jan 2022 03:38:17 -0800 (PST) From: Ihor Radchenko To: Bastien , Kyle Meyer , Nicolas Goaziou , Karl Voit , Christian Heinrich , emacs-orgmode@gnu.org Subject: [PATCH 30/35] org-fold-show-set-visibility: Fix edge case when folded region is at BOB Date: Sat, 29 Jan 2022 19:38:22 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: <87y2cvloay.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.34.1" Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::629 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=yantar92@gmail.com; helo=mail-pl1-x629.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: Ihor Radchenko Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643459631; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=z2/LMMKIUId5tSE9ImgrOqT45METUbjcs/pXSH0dA1s=; b=iP763V/Oha3UZoMYHMnF1sfk81WrCCpjOXpzUBHWGY5KSxMS7acg/Dlb6ZFT6RsxrVoCks E0OXnKKnsTal01uFLtjZFL9SSN5+q5Dcxa/Pxh++Z3JoINmiXe6G3pixc3YgUUk4ynfIB4 K4LrjQOs4A77VgBxW6suUWjWJ/4j6pHRHR9V9tOIHyyjuJktoDrAEq3LKTpDeYNiExl/I8 tkVTS+xSm76TY/tWrN+TrM4NZgVp2FpfMHZdbBQ+UGbj4DPLqa+o4GEqK8IuJ7dPUKgq+x ueC0yH2dHgxgqIR8YJQ5PrQLMSBgC+ORe+trSCj9LnwH0g2on4cLT/tcXMwymg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643459631; a=rsa-sha256; cv=none; b=o1gxq+hXlIfsX8OodPFDrOFUM5Havwuru25kC2i+Rs7apT2FErRTKQuIyEsC2Wgus60dBI qFIKTFUU//+lT4LxmvjnfjuOvYa94gUUr833h/FzBS2aIUss4LodhE4ukB5ALKlVLJocs1 ad0QBGyLFR7+OCRiNiOoaA5JJEcqGk2OsdMmfWQAXHwGNspWv/FUq+qKcsoit7/V4slwuI I6UM95/8eSfPcmqnZi7E7luLP6LvNOAOHrxdc1no6W0KUGVP8jqKHI+tukGD/Q04EK6doR EyD9mPYw+TrgE6hbj+Ow2HxF1XtdcSHx2JrtYxyJqD/MoGYoP4uwSKK2UZghyA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=R4zNvnW7; 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: -3.33 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=R4zNvnW7; 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: C5458384FB X-Spam-Score: -3.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: jFdlKdbHjuT0 This is a multi-part message in MIME format. --------------2.34.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit --- lisp/org-fold.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --------------2.34.1 Content-Type: text/x-patch; name="0030-org-fold-show-set-visibility-Fix-edge-case-when-fold.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0030-org-fold-show-set-visibility-Fix-edge-case-when-fold.patch" diff --git a/lisp/org-fold.el b/lisp/org-fold.el index a16ee0f9b..d5a21cbcb 100644 --- a/lisp/org-fold.el +++ b/lisp/org-fold.el @@ -840,7 +840,7 @@ (defun org-fold-show-set-visibility--text-properties (detail) (org-with-point-at (car region) (beginning-of-line) (let (font-lock-extend-region-functions) - (font-lock-fontify-region (1- (car region)) (cdr region)))))) + (font-lock-fontify-region (max (point-min) (1- (car region))) (cdr region)))))) (when region (org-fold-region (car region) (cdr region) nil)))) (unless (org-before-first-heading-p) --------------2.34.1--