From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sfT5Di2b42A7KwAAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 01:52:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GP4WCi2b42BIYQAAbx9fmQ (envelope-from ) for ; Mon, 05 Jul 2021 23:52:13 +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 874D121330 for ; Tue, 6 Jul 2021 01:52:08 +0200 (CEST) Received: from localhost ([::1]:48894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0YNj-0004e8-J2 for larch@yhetil.org; Mon, 05 Jul 2021 19:52:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0YNN-0004c4-W4 for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 19:51:46 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:35763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0YNM-0006Si-B9 for emacs-orgmode@gnu.org; Mon, 05 Jul 2021 19:51:45 -0400 Received: by mail-lf1-x136.google.com with SMTP id r26so17585130lfp.2 for ; Mon, 05 Jul 2021 16:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=GomwHBpfzj4IAsHQUZWop5iabt40zNLvPbpOxVqUwhU=; b=cdRpISTIcjD7OLM5DmS2bVZ9ITNnU+YLK33MUY4sahyabPDj7RTPhK4KgFmhYttCvZ qeB9RahXvJQCEl6nKIyOn02y5/B7Rgx+0z2sguE4ES7KdP1xKUeyb4VFeufTVXDaQV8r sAeubeckjAuKmjLKZH8SDj3PR9ObQ7fTqSawWu5SufrYQOnaQ4zTV5u5ACRPlP0R5Asx Xlcc3ON2a67/lGZjPndgH72eUPRU6Kbff2g+9BstO2LCfGQc8TbLox4i1joe8VAVwU8w I7TQ3Kx7vHPJjoNP7Eh2PjFSqXcWfZpEsygYBVP7QN+l4lQtMV/Z41ZU15PknhHgm3Wl 7FAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=GomwHBpfzj4IAsHQUZWop5iabt40zNLvPbpOxVqUwhU=; b=kFLQZ0abjxcPTavwZlDAhMIu9SlwJuDf8sRNB3d2Q9uuP1j2PoG6exMatN3PwyzBlc umyUs6uHWAux+iYstYyKKg1InflyRor5oxu884Q5mgcq7XLHG0KEWzqjErde5wLMjGwI zIQVPZBtaClVHhC5eAtFMIph2e09kgnuWV+BIagvmr2jkn2nOOX3iNOwXAxfuoV3t7tK PRutSTj+Pwmc1363H0nEVg1wwQPuGbxv7KWibudpMoOSW6uU07Zmt/hejVDo+gZ0AcvU JGxh13pyNi23BABet34D/xreCcYhYBThNNcQPgkev4+8ILZYE9pdGq6H30AjwDhHhxG+ um0Q== X-Gm-Message-State: AOAM531lxzyDeUREkvQ8hynXIVyglCZsbvIf94CXEXf91U9eGIDDPvm3 F1BWW2J40eBacqrdz53dqmFaHKHSjk1z6EHweTwXpWD+J6JpjyD+ X-Google-Smtp-Source: ABdhPJySROdCF1ZxfuL5ock4pAMtfP6rDkJlcBsJ2vy+5cWNsMnVVRoY8cMlqFpzcMl1UhpuiZfa3opUzO8KDpJEL5s= X-Received: by 2002:a05:6512:304b:: with SMTP id b11mr12185217lfb.315.1625529101766; Mon, 05 Jul 2021 16:51:41 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:65d0:0:0:0:0:0 with HTTP; Mon, 5 Jul 2021 16:51:41 -0700 (PDT) In-Reply-To: References: From: Samuel Wales Date: Mon, 5 Jul 2021 16:51:41 -0700 Message-ID: Subject: Re: org-agenda-move-date-from-past-immediately-to-today could work for non-days To: emacs-orgmode Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=samologist@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_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: , 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=1625529128; 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=GomwHBpfzj4IAsHQUZWop5iabt40zNLvPbpOxVqUwhU=; b=JKLfsResedfx0cPuJkKl6TlKRNDNHlzLQIaWuzCxvHzEF08qZ2Bu7Y/sRVgomelXlfcG9Q 6hl+eWWGR7QGvL7ftQxvo5DQvNmvTl/WqLOrGaDYXUYp3HsK1Mz5MjGYImy90c6hqPo/3I MBfKjXClYbmOlBUCVlMQiIfo6jmS1xgVMBgzgPXgWlMIdo4rnyBIQsivjFLSPjk+VQOSiY AuFbOnefCd3M8Tz5a8lAUudH/M18dEnw6PpmPHw5dzqo54D6qkHRjULXurCY0+fTANI/f3 YvyuHXQvs6Jb/IWxWkfSqgVR4E1QXZtQdzfUlTW8zj1ntLJH+eFSpFwa5yy1XA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625529128; a=rsa-sha256; cv=none; b=EXodsHrwviOgKvMvA8bwEToYP0GSo9le3mYVDyVf5M1WthAzYlMgLJCRWhHbUZNcc1sDHz R+CZ0vFaLmJ/LfPc2NbiaGTPiOn1GoaNFOkL3L+5sTafJ7vXhqlcNfciTLwbNpmy2LAdRD t/hDBosJ/kV+lfrhIXzX6K53AvXt2cXxfx36iiGUstyj59htA3HGW/eEGUafnzxbxQsE7I euO09SzEWwQVCKT8jpYrppWewWPMTLRUya00XRNjyb2nPo4kD1uMKc1lseddEF2h2FgtIb VU9eruPMroVQvFSw2hKW1Bs54SHbZtutj70Xqi2eDNRvbI6FmsG/u7pkdymSqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=cdRpISTI; 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: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=cdRpISTI; 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: 874D121330 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: ncVrWkYHei+c i am referring to this code in org-agenda-date-later. i do not understand why there is (equal arg 1): (when (and org-agenda-move-date-from-past-immediately-to-today (equal arg 1) (or (not what) (eq what 'day)) (not (save-match-data (org-at-date-range-p)))) (setq cdate (org-parse-time-string (match-string 0) 'nodefault) cdate (calendar-absolute-from-gregorian (list (nth 4 cdate) (nth 3 cdate) (nth 5 cdate))) today (org-today)) (when (> today cdate) ;; immediately shift to today (setq arg (- today cdate)))) i would want to move to today if needed, then the number of days, such as 7 here: (defun alpha-org-agenda-do-date-later--week () (interactive) (org-agenda-do-date-later 7)) but perhaps there is a good reason for restricting this variable to controlling only a single day move? On 6/20/21, Samuel Wales wrote: > org-agenda-move-date-from-past-immediately-to-today moves a ts > immediately to today in agenda, but only if you do > org-agenda-do-date-later by one day. if you instead do it by 7 days > or so, it will check and not do the feature. > > i keep getting surprised by this, so i thought perhaps newcomers would > be too. do you think it makes sense to drop that check and make the > variable work consistently for all time periods? imo that would be > the least surprising and most useful behavior. > > the drawbck of not dong so is that you take past scheduled, for > example, and move them by weeks into the future, only to find out > later that you moved them into the past. but perhaps others have > different sensibilities and there is some reason for the check. > > -- > The Kafka Pandemic > > Please learn what misopathy is. > https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html