From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6Oa5CBsTYGJC1QAAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 16:05:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YGOiCBsTYGJXkAAA9RJhRA (envelope-from ) for ; Wed, 20 Apr 2022 16:05:15 +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 C0D901060C for ; Wed, 20 Apr 2022 16:05:14 +0200 (CEST) Received: from localhost ([::1]:47702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhAxF-0008Mp-TM for larch@yhetil.org; Wed, 20 Apr 2022 10:05:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhAMc-0005yL-Uj for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 09:27:27 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:51716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhAMb-0004Ub-JU for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 09:27:22 -0400 Received: by mail-pj1-x102d.google.com with SMTP id bg24so1940673pjb.1 for ; Wed, 20 Apr 2022 06:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:message-id:date:mime-version; bh=HYCekT39NppUwyuYIVjMV+dC7uOFtMQn0BHWTysYKT8=; b=NXhPjnJvtT5CCrPQ9l/rYGZZzuAbBk+9nMJ3ZnY/hSCE/LIJ1kfyxLIhsEEK01YSKN ciP5AdhhYCQoFcCCszU4u7XqbuuhPskdWBRKlp1YpWufCrYm/z5hfxY6I8HnNK087Q0o 3sfSrdlQZBoX7rmVmTGmQIPOhVWwfeDrULDjXPaQd3AUpexvFa4vsiMwuAGBIGRsDFPw w0GF+PbkIzC60LzJ9lsy5gpXrCuzqtYy6yN5ZEvUiscBDVC/xL0Pob8xtBWnrXnie3hi JiwDTlb/JLMcYW/1QLNYQy75OsUMt0YaCyxjFRIKXxM0l8UBFEuio8pL/6r9ybmUJXSf ZW0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references :message-id:date:mime-version; bh=HYCekT39NppUwyuYIVjMV+dC7uOFtMQn0BHWTysYKT8=; b=yrolRr+2dDJvFSphjCAIXDrxwzwr6eOFt7X5R/+5dKYyfUXBCThwthaOIMahAElOK4 KYDZKSTKTMKqj+yq77WjOvXFtq3Ck0qYRd7+w/T3d9Tue1vvRHeUmHdgJ/rAsqANvaOZ 7eRkpUM4OLU9ZxKfwgOP6ti/AVTezqngOLt0vaw1+xurLDctqb4hXZx/owOwKxgQgzx0 GgxD44JOsROe81qosUQILAFap+O4sK71rsJtyQ3UDLM5i6rMH1afnFliR/GjAdrIrAPy 0xiFlM48jb7J/JJ4szGeeD9j9I3+Xy1yEFDinOdYSB91q9583U2gFXJeRtN8eNJfkfz1 tiyw== X-Gm-Message-State: AOAM5336XA1WX+1Ri9wgTLk/JYJUbD8qoLvSwND0peK9O/yqOI4TxO84 bE3mXV7vgqIhxPQcKHVd2yyn33e34WjLxQ== X-Google-Smtp-Source: ABdhPJxixV0blPgGBeBk7vLhErI8zMtjUh1NbM1gBLzP+yFgSP51bkr7DcC9LAF/+5iVHiYAQHdOEg== X-Received: by 2002:a17:90b:4a8a:b0:1d2:bff4:b44f with SMTP id lp10-20020a17090b4a8a00b001d2bff4b44fmr4466286pjb.118.1650461240131; Wed, 20 Apr 2022 06:27:20 -0700 (PDT) Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id e6-20020a056a001a8600b004fac74c8382sm20802073pfv.47.2022.04.20.06.27.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 06:27:19 -0700 (PDT) From: Ihor Radchenko To: emacs-orgmode@gnu.org Subject: [PATCH v2 33/38] org--string-from-props: Fix handling folds in Emacs <28 In-Reply-To: References: Message-Id: <37c44b091d94239c352805580ffb62e989471545.1650460489.git.yantar92@gmail.com> Date: Wed, 20 Apr 2022 21:28:12 +0800 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, 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: , 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=1650463514; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=HYCekT39NppUwyuYIVjMV+dC7uOFtMQn0BHWTysYKT8=; b=gV3gwZIoDZKFRhDjJrvCBiEjaDZGZFoBkOGTTrydTtdvECrXQzLa+6RcKdXpNZwSByhI2M 9b6YLG30Ob1sfbpjMa+8uilhEZZAswzrjZ34BfOlno72KwqNQWYCl+ty1Q8o3xi9g/udKj 7YT58lcosZ+hom5t1G+6A2okJV2DT8e5VWc0fIyzlwBModxgjVRufSAZc7kxGlW7kmsX5v 0XzHqzrNgtjOLZ5v3PMtOenUgSNtab4/P157FcsKALXILHd2cUZ5WVUhRS3wk0SmQWZcyp abzALTouCFw7+hvvIF/2dw/MvWr12dfjgmwd5+HD7oxxXNbKXvTwqca5jNLppg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650463514; a=rsa-sha256; cv=none; b=eqIpIQdsjDyKFxonEOVux8wxLen3YeHke9/GKDNaBt5x3aZtgLHri6J9af9oRbQgZrgXZT e3iCveVCl7qcbChDN1q/xfwnpWi181tDz3CLAgtkNWUyzkhvrjWMhzJ2DCfN6dfgS+AJag ncN25M5HSvUb+x1ll3q6KvenUWFnr4t6HZvq0ogUfwVRqgcFGLx5RXWYAzh9TnQMRa7GDX dminChRHpZd/9koL4A3bDY8peAhWW9qE2ALDNA7IvHNay70X+aTlTWkPobvnLJN9YHQ0kF eGCtrJ8ZLPiDBWHkHCXWBBDGMfJrkAgq7cx0rBdp1G1rPuUZ3/MPOd64dg8DFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NXhPjnJv; 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: -6.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NXhPjnJv; 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: C0D901060C X-Spam-Score: -6.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: YHe/5nKGifPR * lisp/org-macs.el (org--string-from-props): Respect `char-property-alias-alist' when querying for `invisible' text property. --- lisp/org-macs.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 5e6728101..c71bb4094 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -903,14 +903,13 @@ (defun org--string-from-props (s property beg end) (cursor beg)) (while (setq beg (text-property-not-all beg end property nil s)) (let* ((next (next-single-property-change beg property s end)) - (props (text-properties-at beg s)) - (spec (plist-get props property)) + (spec (get-text-property beg property s)) (value (pcase property (`invisible - ;; If `invisible' property in PROPS means text is to - ;; be invisible, return 0. Otherwise return nil so - ;; as to resume search. + ;; If `invisible' property means text is to be + ;; invisible, return 0. Otherwise return nil so as + ;; to resume search. (and (or (eq t buffer-invisibility-spec) (assoc-string spec buffer-invisibility-spec)) 0)) -- 2.35.1 -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg