From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 qGH4KtQPYGJ7GgEAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 15:51:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AOrRKtQPYGJBqgAAauVa8A (envelope-from ) for ; Wed, 20 Apr 2022 15:51:16 +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 1E9CA2CB26 for ; Wed, 20 Apr 2022 15:51:15 +0200 (CEST) Received: from localhost ([::1]:42764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhAjj-0001tl-0g for larch@yhetil.org; Wed, 20 Apr 2022 09:51:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhALA-0004h8-69 for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 09:25:58 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:38819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhAL7-0004AG-DR for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 09:25:50 -0400 Received: by mail-pj1-x1030.google.com with SMTP id s14-20020a17090a880e00b001caaf6d3dd1so4943711pjn.3 for ; Wed, 20 Apr 2022 06:25:47 -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=drxUDxwxR5FMrULsabHszB3Vi+/KdDFVj80gNEcHMO4=; b=G/DkZ/AWheRQYCiw97vSjNBZRzEFryvCmoHruv/XBwF14uUT3iqNKqezg+tFDwNI2K LvDqZs8LB8/wCwF9VXDBRnfvrttEVpOb96Ez71Tv/GWine6GD/1bPJ5iDzj5XOYumjEL hhlLUWBmAmHEXKZEtsMhectAhj377Lxd16Bw5SGCL+jUVIu852wwixG3ov71AetGcgAY MLjoz49YflmmPLgJLpXLc6DGc0npjrXgRfJ/coUIuy5QEQTGXa+ItQn4IVKREQxuS4sW sT1jYOgFhL8fk8Y3hoUtAFakymX3INyBkrh7YKY/cAgY2BWgYmUh9Klo15yt5gsfVLMF VCuw== 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=drxUDxwxR5FMrULsabHszB3Vi+/KdDFVj80gNEcHMO4=; b=eIfixy8DLO9nwwdakIGbaZo4TJIhug4Hf0pymZ6m7dxfmskGQXFWvLwoDcRCmle4A3 zZiaY9XPch/pKnbTtxdrMWkONbw//hRK9DU7YGEiY4rnn2kcsRNIkYP5NvhmJZ5ElPbx iGON62XaKwe/qIM7+E6Zg4ACuI3e73b1r3yWEUlhkVPZxBe+hsik/35xKrvkM5opNjVr gUetgOzTNTfbXbsCxxHQrdRfgLY4DjcxgnieupI2d4iT2lGZ9OVIigeUYiqaQBrr6KO+ EyVy3BXh2XPl+QC+3Pe0ItQ08J1g5R+dO8JK6/DR/bA9sncAMJsgqzNqDNmm/fR8lzC1 9TsA== X-Gm-Message-State: AOAM531ec4H9DazoV/ewpHfJopdysKq+/O+6WZMrY9XriL3nUeWa/fXe 5QHxxYK+ii2fX/j4SqT6BsfA1cC8taBRYA== X-Google-Smtp-Source: ABdhPJyPHZtAole/+5el2i4c9cOsGZXZ34KY42suMIy6muz6Q+ycKYnTBnFYvVS5Q4edaNEuu1Mzvw== X-Received: by 2002:a17:90a:bf85:b0:1ca:8a8e:bec3 with SMTP id d5-20020a17090abf8500b001ca8a8ebec3mr4480344pjs.127.1650461146450; Wed, 20 Apr 2022 06:25:46 -0700 (PDT) Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id k3-20020a056a00168300b004f7e60da26csm21106944pfc.182.2022.04.20.06.25.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 06:25:45 -0700 (PDT) From: Ihor Radchenko To: emacs-orgmode@gnu.org Subject: [PATCH v2 23/38] Backport contributed commits--- In-Reply-To: References: Message-Id: Date: Wed, 20 Apr 2022 21:26:39 +0800 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1030.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=1650462676; 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=drxUDxwxR5FMrULsabHszB3Vi+/KdDFVj80gNEcHMO4=; b=NFO/YC4oKnpkFdhTvJHOcgDSfobAb/6eaboVSm8EZZ7XMsD/ObQJ1dN9jQjVwpfPIYbeP1 cRkgdJX0ft3ia7UUZYTEOW8htJuOsRGCAa3HwzxesbHJqXul51OyvK+AcIcDYkXG104ykz eQeT/kkujD42Sdpg122HaHevg13vz23MolhP2d45BJ3aQBKiWxOLAHQXAIsPotZkHY5SB/ 6ugPzJAUqCCDyQIGM2P+ZVBPMUE0ieedmI1K8ZcOdWTjNsDdEV7J5xBDeAqp1MP07ymlvh 4bFgmc7lATENZrEJf7ItdULevYd+BQisscBiWo7NLTnrFk/6r9O6sdn6zip2ZA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650462676; a=rsa-sha256; cv=none; b=l2KQbYhbKQcrQcMPsTRAMJkhUEC36wOIIzb6529xZF/HgrUL/uQ9pfx1SQaZocSB82ULxJ 4bHT5uYXE4hj5DU2JR5tfeVY6cdPvrRNlSgE20caZJVDKCvXSs14NlSOS3oaWfY9thyxGP EZEVhVDWxeudVrRtM5b64aILdHz359GUG9Nh2LC5Yhu2JV8ylMWBJVNG6Qpwx7UJS4USpj LrzIcpLSoDdtVq+PwEZiPl85JJvM28uOw7MiuKa3LiY0eZThL7IhKwVREKzwufNTAlNZGD 5ggOSiFGdukxxDtBcIFWoxgSBgMk3RtrKpQ8Q9//0XYRLGqQmur40XeJ3AxSiQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="G/DkZ/AW"; 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.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="G/DkZ/AW"; 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: 1E9CA2CB26 X-Spam-Score: -3.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: iBeNExlbi/qZ --- lisp/org-cycle.el | 2 +- lisp/org-fold-core.el | 2 +- lisp/org-keys.el | 4 ++-- lisp/org.el | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/org-cycle.el b/lisp/org-cycle.el index df0a3761a..d2fcc356c 100644 --- a/lisp/org-cycle.el +++ b/lisp/org-cycle.el @@ -811,7 +811,7 @@ (defun org-cycle-hide-archived-subtrees (state) (org-get-tags nil 'local))) (message "%s" (substitute-command-keys "Subtree is archived and stays closed. Use \ -`\\[org-cycle-force-archived]' to cycle it anyway.")))))) +`\\[org-force-cycle-archived]' to cycle it anyway.")))))) (provide 'org-cycle) diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el index 121c6b5c4..6ea374498 100644 --- a/lisp/org-fold-core.el +++ b/lisp/org-fold-core.el @@ -592,7 +592,7 @@ (defun org-fold-core--property-symbol-get-create (spec &optional buffer return-o (org-fold-core-cycle-over-indirect-buffers (push (current-buffer) bufs)) (push buf bufs) - (delete-dups bufs))))) + (delete-duplicates bufs))))) ;; Copy all the old folding properties to preserve the folding state (with-silent-modifications (dolist (old-prop (cdr (assq 'invisible char-property-alias-alist))) diff --git a/lisp/org-keys.el b/lisp/org-keys.el index 782ffa871..e6b8ff459 100644 --- a/lisp/org-keys.el +++ b/lisp/org-keys.el @@ -94,7 +94,7 @@ (declare-function org-feed-update-all "org" ()) (declare-function org-fill-paragraph "org" (&optional justify region)) (declare-function org-find-file-at-mouse "org" (ev)) (declare-function org-footnote-action "org" (&optional special)) -(declare-function org-cycle-force-archived "org-cycle" ()) +(declare-function org-force-cycle-archived "org-cycle" ()) (declare-function org-force-self-insert "org" (n)) (declare-function org-forward-element "org" ()) (declare-function org-forward-heading-same-level "org" (arg &optional invisible-ok)) @@ -444,7 +444,7 @@ (org-defkey org-mode-map (kbd "C-c C-x") (make-sparse-keymap)) ;;;; TAB key with modifiers (org-defkey org-mode-map (kbd "TAB") #'org-cycle) -(org-defkey org-mode-map (kbd "C-c C-") #'org-cycle-force-archived) +(org-defkey org-mode-map (kbd "C-c C-") #'org-force-cycle-archived) ;; Override text-mode binding to expose `complete-symbol' for ;; pcomplete functionality. (org-defkey org-mode-map (kbd "M-TAB") nil) diff --git a/lisp/org.el b/lisp/org.el index 402ce3520..0f31e7794 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -106,7 +106,6 @@ (defalias 'org-global-cycle #'org-cycle-global) (defalias 'org-overview #'org-cycle-overview) (defalias 'org-content #'org-cycle-content) (defalias 'org-reveal #'org-fold-reveal) -(defalias 'org-force-cycle-archived #'org-cycle-force-archived) ;; `org-outline-regexp' ought to be a defconst but is let-bound in ;; some places -- e.g. see the macro `org-with-limited-levels'. @@ -6169,8 +6168,7 @@ (defun org-get-heading (&optional no-tags no-todo no-priority no-comment) (looking-at org-complex-heading-regexp) ;; When using `org-fold-core--optimise-for-huge-buffers', ;; returned text may be invisible. Clear it up. - (save-match-data - (org-fold-core-remove-optimisation (match-beginning 0) (match-end 0))) + (org-fold-core-remove-optimisation (match-beginning 0) (match-end 0)) (let ((todo (and (not no-todo) (match-string 2))) (priority (and (not no-priority) (match-string 3))) (headline (pcase (match-string 4) @@ -11699,7 +11697,7 @@ (defun org--get-local-tags () (let* ((cached (and (org-element--cache-active-p) (org-element-at-point nil 'cached))) (cached-tags (org-element-property :tags cached))) (if cached - ;; If we do explicitly copy the result, reference would + ;; If we do not explicitly copy the result, reference would ;; be returned and cache element might be modified directly. (mapcar #'copy-sequence cached-tags) ;; Parse tags manually. -- 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