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 ms0.migadu.com with LMTPS id ID3hFph6zWF4TAEAgWs5BA (envelope-from ) for ; Thu, 30 Dec 2021 10:23:36 +0100 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 QPB6E5h6zWFYQQAAauVa8A (envelope-from ) for ; Thu, 30 Dec 2021 10:23:36 +0100 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 89902E592 for ; Thu, 30 Dec 2021 10:23:35 +0100 (CET) Received: from localhost ([::1]:54424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n2ren-0006LZ-KC for larch@yhetil.org; Thu, 30 Dec 2021 04:23:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n2reB-0006LC-K2 for emacs-orgmode@gnu.org; Thu, 30 Dec 2021 04:22:55 -0500 Received: from [2607:f8b0:4864:20::1034] (port=51896 helo=mail-pj1-x1034.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n2re9-0007en-1X for emacs-orgmode@gnu.org; Thu, 30 Dec 2021 04:22:55 -0500 Received: by mail-pj1-x1034.google.com with SMTP id v16so20807762pjn.1 for ; Thu, 30 Dec 2021 01:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:references:user-agent:in-reply-to :message-id:mime-version; bh=N09yRf/queESDp6v6CafS2IPalfs1fh65+CX+wijPXk=; b=aeX8JFTcRKUrKC3BAfBwDeiWCw0iiTBxGDVpzaynbg+90viz5obF5oL/faVSMkXF6D 5ZtKN0pa5s54iKGolO9sl6EF0fnZuh1BYiW3H+S+ETmBd3BILFUzyLat/GuG+ylsBxIv Mi1d+3s3gP7h2GtNtNErrT2iCF+bksZEkSPKbQ1l0yF9eb9KrzWV9Uh91VRRi92b2/GP be8K+M4DsQEDug72N5fIzpy0nRZU6wvNCW8w6an3/zPnSSbE8WmfH6J2u0YRLodDRBWm GoBrIkByiAbKZ030Gb0KZDPLGxQ6sOQ4mXRh5u6acAPe12tXT+wbjfSPpTxHhT0juehq Pnxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:references:user-agent :in-reply-to:message-id:mime-version; bh=N09yRf/queESDp6v6CafS2IPalfs1fh65+CX+wijPXk=; b=k5b3Z0JvmugRqxsas+PrQ0ItgCViLQggDD3VkHli0Rb18BZmJzWqn1zy3HoWx9wdFq CgQ+NBtmIUpbGjxxE9JjXAKgf4Rmlq2DbpWAKSWCiP41Wf+NoXuPvgUIDB+mZSzlKj5V YwKosMqrXoQD+sIaaMP+EcGaktmafkO4NnzBviYfeaTZJp/BNHuKY4ZrrnheOk9D23EG v4alvugg4x1wLEvn9EKGozfcDMMtey/yGMtWghN0aJghZRK3vXQap46wQEfGjjqNSndN 0qrsjgFkif1NTZkhnO+LUxEVPny45fZNmz7NM2novX9aW3qg8YyTqBiJs6GTHhSgGP28 g4Xg== X-Gm-Message-State: AOAM530kA+GxH5JOxTaGnAshS0qb2Mp2QyOcXnGXNr7CxigmI9CzJ4IA oqbFaXgx+RyrwS/LJVIDBEMd7oO9OVc= X-Google-Smtp-Source: ABdhPJxebPIe9ENeNbl+1jW0cdBYJn6LMk/WRXUKWDAAHYc4KX9Hs33EGZOKI0QVDMYCtuKhhLm35A== X-Received: by 2002:a17:90b:33d0:: with SMTP id lk16mr36828381pjb.2.1640856171513; Thu, 30 Dec 2021 01:22:51 -0800 (PST) Received: from localhost (61-245-128-160.3df580.per.nbn.aussiebb.net. [61.245.128.160]) by smtp.gmail.com with ESMTPSA id s192sm22647545pgc.7.2021.12.30.01.22.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Dec 2021 01:22:51 -0800 (PST) From: Timothy To: Charles Tam Subject: [PATCH] Re: Bug: org-agenda-sort-notime-is-late is not correctly handled by timestamp comparison [9.4.6 (9.4.6-12-gdcc3a8-elpaplus @ /Users/charlestam/.emacs.d/elpa/org-plus-contrib-20210830/)] Date: Thu, 30 Dec 2021 17:20:24 +0800 References: User-agent: mu4e 1.6.10; emacs 28.0.90 In-reply-to: X-Woof-Bug: confirmed Message-ID: <87r19uqwew.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1034 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=tecosaur@gmail.com; helo=mail-pj1-x1034.google.com X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640856215; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=N09yRf/queESDp6v6CafS2IPalfs1fh65+CX+wijPXk=; b=h7Z8/dv05MqLIpaVW+H9Tpm9rbl4Hz/hteql2fe0cIkVgaXJCJkCZD3TRyJtoSXW74/Q39 q+OZ7dRg9ChXSiTg2AgwW/+oQh7Fo2o+GoicRsEcL76+qLkuA0Tewde69jVcHh1OduIpTa TMp3bLMXvs8CPg/UVqkqs/P+7NVsiq4DKhQk2BKGY2nBojv+Kpy7hUXNgOAN7Lzc8CwKSK p59laiFp7HWOCJsmrbCYku+Irea2biaeVXP/2o3WbyBuE8d7/uGlaDN9OT0btQ0PLOUMOi kIFCoxB/fawIwrFFHmrJuIV1MmJsDtXeeSNnYOAEjaketdYMhwkVcpWIc9GGLg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640856215; a=rsa-sha256; cv=none; b=upLFoETclTy0v7ChujejfHSp99vMqbxDvJVIYqiWTAiJvQmherv7F0fb30+RDnE624/pb5 eo2qFlIbdCCgTAlWUPZKEk8bJrgnRYqhMuKV8NzXIxP3uWZTz9H2AwU2sv/ujCMhvxEQkP hr0Y5UlIBdoMno5QVICn8znYH+W+0yi19v5+dN5YGuE4ruObEeezFxLaxaKgBpAXqTiMYE 7bst9MRzHF956nV/a8JDsHihO10wahA+zj78tDOOChYpz2yI1JoYM9zrQO4MV/BDBsRGs6 hzovPlivjWXE5X62oW4VaXZL2jUyKS7o0yoL9GuBFp4oY2nCVLtW7YlW9BE1PQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=aeX8JFTc; 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: -4.27 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=aeX8JFTc; 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: 89902E592 X-Spam-Score: -4.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: To47/U0P2zJw --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Charles, Thanks for reporting this, and sorry it=E2=80=99s taken so long for someone= to respond (it=E2=80=99s been a busy year for the maintainers). I=E2=80=99ve confirmed both your issue report (thanks for the detailed step= s), and your suggested fix. As such, I=E2=80=99ve produced a patch (attached). It would = be good if someone else could check this looks fine and apply it. All the best, Timothy --==-=-= Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable

Hi Charles,

Thanks for reporting this, and sorry it=E2=80=99s taken so long for someone= to respond (it=E2=80=99s been a busy year for the maintainers).

I=E2=80=99ve confirmed both your issue report (thanks for the detailed step= s), and your suggested fix. As such, I=E2=80=99ve produced a patch (attached). It would = be good if someone else could check this looks fine and apply it.

All the best,
Timothy

From: Charles Tam=
Subject: Bug: org-agenda-sort-notime-is-late is not correctly handled b= y timestamp comparison [9.4.6 (9.4.6-12-gdcc3a8-elpaplus @ /Users/charlesta= m/.emacs.d/elpa/org-plus-contrib-20210830/)]
To: emacs-orgmode@gnu.org
Date: Thu, 02 Sep 2021 12:47:19 +0800

org-agenda-sorting-strategy claims that scheduled-up (-dow= n) causes
items to be sorted in ascending (descending) order by schedul= ed
timestamp.

org-agenda-sort-notime-is-late claims that if it= is non-nil, the absence
of a timestamp is treated as being maximal.
Instead, when using the scheduled-u= p (-down) sorting strategy, with
non-nil org-agenda-sort-notime-is-late= , the absence of a timestamp is
treated as being minimal. Note that the= documentation is not strictly
= wrong; the correct behavior is exhibited for time-of-day comparisons,
just not timestamp comparisons= .

Steps to Reproduce:

  (setq org-agenda-sort= ing-strategy '((agenda scheduled-up)
         =                     &nbs= p;       (todo scheduled-up)
       =                     &nbs= p;         (tags scheduled-up)
     =                     &nbs= p;           (search scheduled-up))
  &nb= sp;     org-agenda-sort-notime-is-late t)

  Place t= he following text in an org agenda file:

  * Reproduce orderi= ng bug
  ** TODO Early item
     SCHEDULED: <= ;1990-01-01 Mon>
  ** TODO Late item
     SC= HEDULED: <2020-01-01 Wed>
  ** TODO Unscheduled item
  (Replace TODO with any non-DONE todo state if you need to.)
&n= bsp;
  Place the point on the "Reproduce" item and `M-x= org-agenda < < t`
  (that is, list all TODO items restricte= d to the "Reproduce" subtree).

Expected:

 = TODO Early item
  TODO Late item
  TODO Unscheduled item=

Actual:

  TODO Unscheduled item
  TODO Ear= ly item
  TODO Late item

Suggested fix:

  F= ind `defsubst org-cmp-ts` in org-agenda.el. The definition of `def`
&nb= sp; in the `let*` should be something like

  (if org-agenda-s= ort-notime-is-late 99999999 -1)

(In the state dump= below, `org-agenda-sort-notime-is-late` is not mentioned but has its defau= lt value of t.)

Thanks,
Charles

Emacs  : GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appki= t-1671.60 Version 10.14.6 (Build 18G95))
 of 2021-03-27
Packag= e: Org mode version 9.4.6 (9.4.6-12-gdcc3a8-elpaplus @ /Users/charlestam/.e= macs.d/elpa/org-plus-contrib-20210830/)

curr= ent state:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(setq
&nb= sp;org-roam-db-location "/Users/charlestam/mise/roam/org-roam.db"=
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-= mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(or= g-checklist)
 org-capture-prepare-finalize-hook '(org-roam-capture= --install-finalize-h)
 org-link-shell-confirm-function 'yes-or-no-= p
 org-expiry-wait "+30d"
 org-metadown-hook '(= org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-re= move-empty-clock-drawer)
 org-roam-db-node-include-function #[0 &q= uot;\300\207" [t] 1]
 org-refile-targets '((nil :maxlevel . 2= ) (org-agenda-files :maxlevel . 1))
 org-html-format-inlinetask-fu= nction 'org-html-format-inlinetask-default-function
 org-pretty-en= tities t
 org-special-ctrl-a/e t
 org-agenda-files '(&quo= t;~/mise/TODO")
 org-ascii-format-inlinetask-function 'org-as= cii-format-inlinetask-default
 org-reveal-start-hook '(org-decrypt= -entry)
 org-modules '(org-expiry org-habit ol-w3m ol-bbdb ol-bibt= ex ol-docview ol-gnus ol-info ol-irc ol-mhe ol-rmail
    &nbs= p;          ol-eww)
 org-startup-folded '= showall
 org-archive-location "%s_archive::datetree/" org-mode-hook '((lambda nil (font-lock-add-keywords nil '(("{{= {.+}}}" 0 'org-macro-face))) (set-fill-column 92))
    &= nbsp;            #[0 "\300\301\302\303\3= 04$\207" [add-hook change-major-mode-hook org-show-all append local] 5= ]
                 #[0 &qu= ot;\300\301\302\303\304$\207"
          &= nbsp;        [add-hook change-major-mode-hook org-babel= -show-result-all append local] 5]
          &n= bsp;      org-babel-result-hide-spec org-babel-hide-all-hash= es
                 #[0 &q= uot;\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2]= turn-on-font-lock
              &nb= sp;  auto-fill-mode org-eldoc-load)
 org-tags-match-list-subl= evels nil
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-be= fore-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(or= g-babel-load-in-session-maybe)
 org-bibtex-headline-format-functio= n #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-latex-format-drawer-function #[514 "\207" [] 3 "= ;\n\n(fn _ CONTENTS)"]
 org-expiry-handler-function 'org-togg= le-archive-tag
 org-agenda-deadline-faces '((1.0 . org-warning) (0= .8 . org-imminent-deadline) (0.5 . org-upcoming-deadline)
   =                     &nbs= p;    (0.0 . org-upcoming-distant-deadline))
 org-babel-= pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hid= e-result-toggle-maybe org-babel-header-arg-expand)
 org-hide-leadi= ng-stars t
 org-babel-load-languages '((python . t))
 org= -log-done 'time
 org-roam-capture-preface-hook '(org-roam-dailies-= -override-capture-time-h)
 org-hide-emphasis-markers t
 o= rg-export-backends '(ascii html latex md)
 org-roam-completion-eve= rywhere t
 org-roam-capture-templates '(("d" "defau= lt" plain "%?" :target
         = ;                     &nb= sp;(file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: = ${title}\n#+filetags: \n")
          &nbs= p;                    :un= narrowed t)
                &nb= sp;             ("t" "task&quo= t; entry "* NONE %?" :target
        &nbs= p;                     &n= bsp;(file+head+olp "%<%Y%m%d%H%M%S>-${slug}.org" "#+ti= tle: ${title}\n#+filetags: \n"
          =                      = ; ("Action Items"))
           =                    )
                    &nbs= p;         )
 org-checklist-export-function 'o= rg-export-as-ascii
 org-ascii-format-drawer-function #[771 " = \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"]
 org-age= nda-span 10
 org-agenda-loop-over-headlines-in-active-region nil org-src-lang-modes '(("redis" . redis) ("php" = . php) ("arduino" . arduino) ("C" . c) ("C++"= . c++)
                  =     ("asymptote" . asy) ("bash" . sh) ("= beamer" . latex) ("calc" . fundamental) ("cpp" . c= ++)
                  &nbs= p;   ("ditaa" . artist) ("dot" . fundamental) (&qu= ot;elisp" . emacs-lisp) ("ocaml" . tuareg)
   =                   ("scre= en" . shell-script) ("shell" . sh) ("sqlite" . sql= ))
 org-roam-db-autosync-mode-hook '(vulpea-db-autosync-enable) org-agenda-clock-consistency-checks '(:max-duration "10:00&quo= t; :min-duration 0 :max-gap "0:05" :gap-ok-around
  &nbs= p;                     &n= bsp;              ("4:00") :de= fault-face org-agenda-clock-gap :overlap-face nil :gap-face
  &nbs= p;                     &n= bsp;              nil :no-end-time-face = nil :long-face nil :short-face nil)
 org-roam-find-file-hook '(org= -roam-buffer--setup-redisplay-h org-roam--register-completion-functions-h                    &n= bsp;      org-roam--replace-roam-links-on-save-h org-roam-op= en-id-with-org-roam-db-h
            &nbs= p;              org-roam-db-autosync--se= tup-update-on-save-h)
 org-agenda-prefix-format '((agenda . "= %i %?-12t% s") (todo . " %i ") (tags . " %i ") (s= earch . " %i "))
 org-occur-hook '(org-first-headline-re= center)
 org-agenda-start-with-log-mode t
 org-footnote-a= uto-adjust t
 org-odd-levels-only t
 org-clock-out-switch= -to-state "WAIT"
 org-structure-template-alist '(("= p" . "src python") ("a" . "export ascii"= ) ("c" . "center") ("C" . "comment"= )
                   =             ("e" . "example&q= uot;) ("E" . "export") ("h" . "export ht= ml") ("l" . "export latex")
    &nbs= p;                     &n= bsp;     ("q" . "quote") ("s" . &qu= ot;src") ("v" . "verse"))
 org-cycle-hook= '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-e= mpty-lines
                &nbs= p; org-optimize-window-after-visibility-change)
 org-todo-keywords= '((sequence "NONE" "HELP" "WAIT" "ACTV&= quot; "|" "CONT" "DONE" "DEAD" &quo= t;PASS"))
 org-speed-command-hook '(org-speed-command-activat= e org-babel-speed-command-activate)
 org-roam-node-annotation-func= tion 'org-roam-node-read--annotation
 org-tags-column -100
&nb= sp;org-habit-graph-column 70
 org-roam-ref-annotation-function 'or= g-roam-ref-read--annotation
 org-roam-dailies-directory "diar= y/"
 org-babel-tangle-lang-exts '(("python" . "= ;py") ("emacs-lisp" . "el") ("elisp" . &= quot;el"))
 org-refile-use-outline-path t
 org-expor= t-before-parsing-hook '(org-attach-expand-links)
 org-confirm-shel= l-link-function 'yes-or-no-p
 org-link-parameters '(("attachm= ent" :follow org-attach-follow :complete org-attach-complete-link)
                    &nbs= p;  ("message" :follow org-mac-message-open)
  &nbs= p;                    (&q= uot;x-devonthink-item" :follow org-devonthink-item-open)
  &n= bsp;                    (= "mac-evernote" :follow org-mac-evernote-note-open)
  &nb= sp;                    (&= quot;mac-outlook" :follow org-mac-outlook-message-open)
  &nb= sp;                    (&= quot;acrobat" :follow org-mac-acrobat-open) ("skim" :follow = org-mac-skim-open)
              &nb= sp;        ("addressbook" :follow org-mac-add= ressbook-item-open)
              &n= bsp;        ("x-together-item" :follow org-ma= c-together-item-open)
              =          ("mairix" :follow org-mairix-op= en :store org-mairix-store-gnus-link)
         = ;              ("roam" :follow= org-roam-link-follow-link) ("id" :follow org-id-open)
 =                     &nbs= p;("eww" :follow org-eww-open :store org-eww-store-link)
&nbs= p;                     &n= bsp;("rmail" :follow org-rmail-open :store org-rmail-store-link)<= br/>                    &= nbsp;  ("mhe" :follow org-mhe-open :store org-mhe-store-link= )
                   =    ("irc" :follow org-irc-visit :store org-irc-store-l= ink :export org-irc-export)
            &= nbsp;          ("info" :follow org-info-= open :export org-info-export :store org-info-store-link)
    =                    ("= ;gnus" :follow org-gnus-open :store org-gnus-store-link)
  &n= bsp;                    (= "docview" :follow org-docview-open :export org-docview-export :st= ore
                  &nbs= p;     org-docview-store-link)
        &n= bsp;              ("bibtex" :f= ollow org-bibtex-open :store org-bibtex-store-link)
     = ;                  ("bbdb= " :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-com= plete-link
                &nbs= p;       :store org-bbdb-store-link)
     = ;                  ("w3m&= quot; :store org-w3m-store-link) ("file+sys") ("file+emacs&q= uot;)
                  &n= bsp;    ("shell" :follow org-link--open-shell)
&nbs= p;                     &n= bsp;("news" :follow
           =             #[514 "\301\300\302 Q \&quo= t;\207" ["news" browse-url ":"] 6 "\n\n(fn UR= L ARG)"])
                =        ("mailto" :follow
    &n= bsp;                   #[514 &= quot;\301\300\302 Q \"\207" ["mailto" browse-url "= :"] 6 "\n\n(fn URL ARG)"])
        &= nbsp;              ("https" :f= ollow
                  &n= bsp;     #[514 "\301\300\302 Q \"\207" ["http= s" browse-url ":"] 6 "\n\n(fn URL ARG)"])
&nbs= p;                     &n= bsp;("http" :follow
           =             #[514 "\301\300\302 Q \&quo= t;\207" ["http" browse-url ":"] 6 "\n\n(fn UR= L ARG)"])
                =        ("ftp" :follow
     = ;                   #[514 &quo= t;\301\300\302 Q \"\207" ["ftp" browse-url ":"= ;] 6 "\n\n(fn URL ARG)"])
          =              ("help" :follow o= rg-link--open-help) ("file" :complete org-link-complete-file)
                    &nbs= p;  ("elisp" :follow org-link--open-elisp) ("doi" = :follow org-link--open-doi))
 org-agenda-skip-scheduled-if-done t<= br/> org-latex-format-headline-function 'org-latex-format-headline-def= ault-function
 org-expiry-inactive-timestamps t
 org-capt= ure-templates '(("t" "Task" entry (file+headline "= ~/mise/TODO" "Schedule Me")
        =                   "*** NO= NE %^{Summary}\n    /Captured %U/\n    %?\n")
=                      = ;    ("s" "Snippet" plain (file+olp+datetree = "~/mise/TODO" "Snippets") "       &= nbsp;* %?"
               =           :empty-lines-after 1 :tree-type week)                    &n= bsp;    ("j" "Journal" plain (file+olp+datetr= ee "~/mise/NOTES") "      %?" :empty-lin= es-before 1
                &nb= sp;         :empty-lines-after 1)
    &nb= sp;                    (&= quot;n" "Note" entry (file+headline "~/mise/NOTES"= "Notes")
              &n= bsp;           "*** %^{Topic}\n    = /Captured %U/\n    %?\n" :empty-lines-before 1 :empty-lines-= after 1
                  =         :prepend t)
        &nb= sp;                )
 org-= link-elisp-confirm-function 'yes-or-no-p
 org-todo-keyword-faces '= (("UNINIT'D" . org-todo-uninited) ("NEEDHELP" . org-tod= o-needhelp)
                &nb= sp;         ("BUFFERED" . org-todo-buffered) = ("PROGRESS" . org-todo-progress)
        =                   ("CONTI= NUE" . org-todo-continue) ("COMPLETE" . org-todo-complete)                    &n= bsp;     ("OBSOLETE" . org-todo-obsolete) ("DELEGA= TE" . org-todo-delegate)
           =               ("NONE" . org-t= odo-uninited) ("HELP" . org-todo-needhelp) ("WAIT" . or= g-todo-buffered)
               = ;           ("ACTV" . org-todo-progress)= ("CONT" . org-todo-continue) ("DONE" . org-todo-comple= te)
                  &nbs= p;       ("DEAD" . org-todo-obsolete) ("PASS&= quot; . org-todo-delegate))
 org-roam-db-autosync-mode t
 = ;org-roam-dailies-capture-templates '(("d" "default" en= try "* %U\n  %?" :target
        &nb= sp;                     &= nbsp;        (file+head "%<%Y-%m-%d-%a>.org&= quot;
                  &n= bsp;                     = "#+title: %<%Y-%m-%d> (%<%a>)\n#+filetags: diary\n\n"= )
                   =                    )
                    &nbs= p;                 )
 org-= latex-format-inlinetask-function 'org-latex-format-inlinetask-default-funct= ion
 org-html-format-drawer-function #[514 "\207" [] 3 &= quot;\n\n(fn NAME CONTENTS)"]
 org-roam-directory "/User= s/charlestam/mise/roam"
 org-clock-in-switch-to-state "A= CTV"
 org-html-format-headline-function 'org-html-format-head= line-default-function
 org-mairix-display-hook 'org-mairix-gnus-di= splay-results
 org-pretty-entities-include-sub-superscripts nil org-habit-show-all-today t
 org-confirm-babel-evaluate nil=
 org-roam-node-display-template "${title:*} ${tags:20}"=
 org-agenda-sorting-strategy '((agenda habit-down time-up priorit= y-down effort-up category-keep)
          &nbs= p;                    (to= do scheduled-up) (tags time-up) (search alpha-up))
 org-tags-exclu= de-from-inheritance '("todo")
 org-agenda-skip-deadline-= if-done t
 org-mairix-gnus-select-display-group-function 'org-mair= ix-gnus-select-display-group-function-gg
 )
=
--==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-agenda-Make-timestamp-ordering-match-docs.patch >From 9ecd0a9266338d7222281c7ccb16808c319646aa Mon Sep 17 00:00:00 2001 From: TEC Date: Thu, 30 Dec 2021 17:16:29 +0800 Subject: [PATCH] org-agenda: Make timestamp ordering match docs * lisp/org-agenda.el: When `org-agenda-sort-notime-is-late' is non-nil, an absent timestamp is now (correctly) treated as maximal. Bug reported by: Charles Tam in https://list.orgmode.org/CAKu+9YVNPSHG4HVtPFa2L2tP6yBdjJ38Teyr8OSDmCg0ZEOe9Q@mail.gmail.com --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 721ef2ced..4321a4f0b 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7729,7 +7729,7 @@ (defsubst org-cmp-ts (a b type) \"timestamp_ia\", compare within each of these type. When TYPE is the empty string, compare all timestamps without respect of their type." - (let* ((def (and (not org-agenda-sort-notime-is-late) -1)) + (let* ((def (if org-agenda-sort-notime-is-late 99999999 -1)) (ta (or (and (string-match type (or (get-text-property 1 'type a) "")) (get-text-property 1 'ts-date a)) def)) -- 2.34.1 --=-=-=--