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 ms0.migadu.com with LMTPS id ECBdCXHrm2C4LwAAgWs5BA (envelope-from ) for ; Wed, 12 May 2021 16:51:29 +0200 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 2MIPBXHrm2DBWgAA1q6Kng (envelope-from ) for ; Wed, 12 May 2021 14:51:29 +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 8A83CF0DC for ; Wed, 12 May 2021 16:51:28 +0200 (CEST) Received: from localhost ([::1]:54208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgqCt-0003FM-7L for larch@yhetil.org; Wed, 12 May 2021 10:51:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgqBg-0003Au-CJ for emacs-orgmode@gnu.org; Wed, 12 May 2021 10:50:12 -0400 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]:41674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgqBd-00084a-I9 for emacs-orgmode@gnu.org; Wed, 12 May 2021 10:50:12 -0400 Received: by mail-oi1-x232.google.com with SMTP id c3so22426279oic.8 for ; Wed, 12 May 2021 07:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:cc:date:message-id :mime-version:content-transfer-encoding; bh=q9m0NMzS2V8O92+P8rKhvyeKv/X3z7cI9dP7u6tmpQI=; b=D32c5kqL+w4Ayn16lIRXBXOaZx+361gvMK4ki82kn2GWEQQxBWj/OKMiczdHDFEpJm DzvbJHgWVM0tZwyQw54XomBag5RepVfstOX/TrtFcjaDOtlwntNI0SpYwQO29JnL9Zq/ ksRlC4kLNRiYlj9tGaTReRpS0rcqo9Vc++vuEtG6Atl5mh5F4HGcA0rdgPTNLnN9CvFp 2mggszM/QJxd4XMPc92UPMuENl++uWaYeJ4KoE7KSp2OAyi/FejjF1cVjut9IL0v20BU dAadvGUc0H2fSbYiCIcOjk+/8w/oE41H3IPESX2BawPiv5q986EcQBRUytQUXVFbqLTw /OfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:cc:date :message-id:mime-version:content-transfer-encoding; bh=q9m0NMzS2V8O92+P8rKhvyeKv/X3z7cI9dP7u6tmpQI=; b=mkCS6IuADlP8kAjQ37LXg69ru5vxvpN5cFzQA3XQDqhURyrTwxxBxKqGOKhoywdTYh F4LN1/DFh/C8JiGHn3rLEof6IBn8O0OqlB/MqTOCVZe7vqKU88RNgPIqGFaACt71Qodt b4qDfX05uZ1vg/4u+zSMHzWiUXnYPuP7yc/YNo2wbDkNva+ZTxl/H0ejmQCxNXQnQ6+V oaJC/9GljHMzL7yx4uOW3eVa/0vN0dzb7g+OundWxEz/Bl/+60+6BJLsYz8G07K+ri49 sCzSPeF3fY3BirJ0pLmhTitoDW8owwVHNPMX+qmRq4MdTQ634zpVPxxoW8MmZcOETzAI SU8Q== X-Gm-Message-State: AOAM530PC1CZiSKSHINyPiXpZK4efzLpz48uInjew1FhUXnLneFaDW8U Iaff2d7jEZhhcIwSZvo49xY= X-Google-Smtp-Source: ABdhPJzulnPFAK6CSr/QuY1huNDQ8sGY+tJrSxsMkVlZ3JEl8VEdmXyUmR4TycHWNxeOeHT/eiXryA== X-Received: by 2002:aca:ba09:: with SMTP id k9mr25968195oif.178.1620831008230; Wed, 12 May 2021 07:50:08 -0700 (PDT) Received: from localhost ([192.200.115.226]) by smtp.gmail.com with ESMTPSA id q24sm4733322otg.81.2021.05.12.07.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 07:50:07 -0700 (PDT) From: Ihor Radchenko To: Tim Visher Subject: Re: Refiling All 'Terminal TODO State' Entries to a Particular Heading In-Reply-To: References: Date: Wed, 12 May 2021 22:54:58 +0800 Message-ID: <87lf8kdmt9.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::232; envelope-from=yantar92@gmail.com; helo=mail-oi1-x232.google.com 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: Emacs Org Mode mailing list Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620831088; 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=q9m0NMzS2V8O92+P8rKhvyeKv/X3z7cI9dP7u6tmpQI=; b=nOHrUXmE/yZSlmRgsSGFSTirdT13w426FVx2CPsiZR5Su4euS4TNESEbZhrVQVThQ4J45z cvjmaxlGpihq3zUFdi7wvEs8NVN5DCapvV12STvy6VvXk6Q4DLNyvUEjhoeE14GxdS8t3K +DKz2CYcxe4VjKycXySqdstZMMdhlc9otfdATkaQnzRnwtv3blXjuptCgAe31oyrngEYx7 u4QX543kM1LNFtSKk8/xNq1owMrwVUO85QdFKne1eoO86y0KzVr84pVhBOlBqVMx2rs4Ht DS+tmYKOjvWM057WwB2oNzpXWNIVGFpqiU2Amh3e4EUGaM3aHIrkUGWHCGsASQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620831088; a=rsa-sha256; cv=none; b=RuS0nScxxvsWQ4bJ4GDoxrv+ci/LsM/x2JpkF+7Ul87V97qtuTQ/JP3wojXK05V4r87Xv5 yaWn/moM85HnyaX7AS0q3DSH2h4G+0cN5ycZ8TfHj/AXodSSgkxQ12gHEUku96XbBuFzZE 1e280JUq1itcyBX7YfAWbug8j0h908mUUbyMDAtUnL5jB9WE5cBwR78/R4dWgnSqMkqHWV 8hx5dTeoWnu+aQOKUr6+0YiYjUKvJ0rKkSLffdQcf1fUMfkQTbrE/8UPgPWMTDLYB7sqtZ efy/VNG+S+andv0M1IFjQHS4V8WoKEoc9kuipyyEknwozfSKUqnyD0L2yJxZdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=D32c5kqL; 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-Migadu-Spam-Score: -2.65 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=D32c5kqL; 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-Migadu-Queue-Id: 8A83CF0DC X-Spam-Score: -2.65 X-Migadu-Scanner: scn0.migadu.com X-TUID: k3WjZNZfye11 Tim Visher writes: > > I found that my timvisher-org-refile-done-entries had a bug where it could > skip entries if the org buffer had consecutive DONE/CANCELLED entries. I > believe this is because of this quote from the manual: > > After evaluation, Org moves point to the end of the line that was just > processed. Search continues from that point forward. This may not always > work as expected under some conditions, such as if the current sub-tree w= as > removed by a previous archiving operation. In such rare circumstances, Org > skips the next entry entirely when it should not. To stop Org from such > skips, make FUNC set the variable =E2=80=98org-map-continue-from=E2=80=99= to a specific > buffer position. I think the easiest would be using markers. You can collect the list of headline markers in org-map-entries without modifying buffer. Then, you mapc over the list of markers and refile the corresponding headings. You will not need to worry about point moving due to changes in buffer as markers will not be affected by buffer changes. Hope it helps. Best, Ihor