emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-agenda-move-date-from-past-immediately-to-today could work for non-days
Date: Mon, 5 Jul 2021 16:51:41 -0700	[thread overview]
Message-ID: <CAJcAo8s+xiJrhu4C4hUbiVpeiQvpEVjFoL4_QUVGF9J9GdngZg@mail.gmail.com> (raw)
In-Reply-To: <CAJcAo8vC2pcP1PD0aGuYPdPFhPxBAOZrPbpt5CazHquUEoggYw@mail.gmail.com>

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 <samologist@gmail.com> 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


      reply	other threads:[~2021-07-05 23:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20 22:40 org-agenda-move-date-from-past-immediately-to-today could work for non-days Samuel Wales
2021-07-05 23:51 ` Samuel Wales [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJcAo8s+xiJrhu4C4hUbiVpeiQvpEVjFoL4_QUVGF9J9GdngZg@mail.gmail.com \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).