alphapapa / org-super-agenda

Supercharge your Org daily/weekly agenda by grouping items
GNU General Public License v3.0
1.38k stars 108 forks source link

Time-grid and scheduled/deadline #179

Closed DSMasterson closed 3 years ago

DSMasterson commented 3 years ago

Does :time-grid support displaying schedule/deadline events? I believe Org-Agenda handles these by displaying the appropriate ones in today's grid section if (IIRC) org-agenda-include-deadlines is t. Org will display them each day beginning at the pre-warning time until they're marked done. Can time-grid do this?

alphapapa commented 3 years ago

You can see in the code what text properties are used to collect entries for the time grid. I don't know exactly what Org does in that respect depending on that option. If it doesn't behave as desired, please provide a test case that could be used to diagnose the issue and rectify it.

DSMasterson commented 3 years ago

Hmm. My minimal test case is working. org-super-agenda does show deadline/scheduled in the time-grid (slightly differently than org-agenda, but that's okay). Now, I have to figure out why it isn't working with my Super View agenda...

I'll close this

DSMasterson commented 3 years ago

Found something. What's wrong with this setup? View1 is wrong and outputs a time-grid without scheduled/deadline events. View2 is what I expect in that the schedule/deadline events are output. The only difference is the Trivial section.

Testit.org

.emacs (for testing)

(require 'package) (setq package-archives '( ("org" . "https://orgmode.org/elpa/") ("elpa" . "https://elpa.gnu.org/packages/") ("melpa" . "https://melpa.org/packages/") )) (setq package-archive-priorities '( ("elpa" . 20) ("org" . 10) ("melpa" . 1) )) (package-initialize) (require 'use-package) (use-package org :init (setq org-startup-folded t org-directory (expand-file-name "~/Test/") org-agenda-files (list org-directory) org-agenda-timegrid-use-ampm t ) :config (progn (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cc" 'org-capture) (global-set-key "\C-cb" 'org-switchb) ) ) (use-package org-super-agenda :after org :config (org-super-agenda-mode 1) :config (setq org-agenda-custom-commands '( ("x" "View1" ((agenda "a" ((org-agenda-span 'week) (org-agenda-include-deadlines t) (org-super-agenda-groups '( (:name "" :time-grid t :order 1) (:name "Trivial" :discard (:anything t) :order 90) )))))) ("z" "View2" ((agenda "a" ((org-agenda-span 'week) (org-agenda-include-deadlines t) (org-super-agenda-groups '( (:name "" :time-grid 1 :order 1) ) ))) )) )) )

alphapapa commented 3 years ago
  1. Please look at how your code is formatted on GitHub.
  2. Rather than expect me to start up a new Emacs and run your code multiple times without knowing what is expected, please give a simple, minimal example, showing the actual output and the desired output.
  3. Ultimately, since this is like a support question, I would appreciate if you closed this issue and asked in a public forum, like on Reddit, so that other people can offer help and read the answers. Asking me directly puts the entire burden of helping you on me and prevents anyone else from benefiting from the answers.
DSMasterson commented 3 years ago
  1. Sorry about the format of the code. When I cut/pasted the code, it had nice formatting. When I submitted the message, all the initial spaces were removed which messed up the formatting -- I still don't know why, but I thought it was still usable.
  2. Perhaps I should've dropped the package.el stuff. The simple example is just the org-agenda-custom-commands setting but I couldn't be sure there was anything else in my (or your) setup affecting something, so I provided a full (but minimal) .emacs. I stated simply my problem and provided an Org file.
  3. Fine. This seemed like a bug to me. "View2" works for me now, but I suspect I'll run into the prorblem again with more complex usage of time-grid. I'll drop it.