GithubHelp home page GithubHelp logo

Comments (19)

rougier avatar rougier commented on August 18, 2024

Can you try to evaluate (let* ((entries '())) (add-to-list 'entries "test")) and
(let* ((entries '())) (push "test" entries))?

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

I also get a similar issue with the latest version from elpa, the error is:

min: Symbol’s value as variable is void: nano-agenda-busy-foregrounds

Using the master branch seems to work. @rougier does nano-agenda needs a new release?
The version in nano-emacs also appears broken, shouldn't it be removed in favor of this repository?

from nano-agenda.

rougier avatar rougier commented on August 18, 2024

@TristanCacqueray Can you test the rewrite branch (not yet merged)?

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

@rougier sure, it failed with face-attribute: Invalid face: hl-line.

I made a little nix package for nano-agenda, and here is the branch that test rewrite: podenv/nano-agenda.nix@a327f08 .

from nano-agenda.

rougier avatar rougier commented on August 18, 2024

I need to load hl-line... In the meantime, you can load hl-line manually and restest.

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

Ok, but I'm back to the issue where the todo list is empty. I guess this happens because I'm running in terminal: svg-lib--image: svg-lib.el requires Emacs to be compiled with svg support.

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

Using the GUI, I get:

image

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

After switching the task to DONE, same error, here is the backtrace:

Debugger entered--Lisp error: (wrong-type-argument listp "Mark entry as done")
  svg-lib-button("TODO" (lambda nil (interactive) (with-current-buffer #<buffer projects.org> (save-excursion (goto-char 94) (org-todo 'done)))) "Mark entry as done" (default :foreground "#B0BEC5" :background "#FFFFFF" :font-family "Iosevka") (default :foreground "#FFFFFF" :background "#B0BEC5" :font-weight bold :font-family "Iosevka") (default :foreground "#FFFFFF" :background "#37474F" :font-weight bold :font-family "Iosevka"))
  (let* ((marker (get-text-property 0 'org-marker entry)) (buffer (marker-buffer marker)) (pos (marker-position marker)) (face (or face 'default)) (font-family (plist-get svg-lib-style-default ':font-family)) (active (list 'default ':foreground (face-foreground face nil 'default) ':background (face-background face nil 'default) ':font-family font-family)) (hover (list 'default ':foreground (face-background face nil 'default) ':background (face-foreground face nil 'default) ':font-weight 'bold ':font-family font-family)) (press (list 'default ':foreground (face-background 'default) ':background (face-foreground 'default) ':font-weight 'bold ':font-family font-family))) (svg-lib-button "TODO" (list 'lambda nil '(interactive) (list 'with-current-buffer buffer (cons 'save-excursion (cons (list 'goto-char pos) '(...))))) "Mark entry as done" active hover press))
  nano-agenda--entry-todo(#("DONE Test rewrite branch of nano-agenda" 0 39 (todo-state #("DONE" 0 4 (face (org-done org-level-2) org-todo-head "TODO" fontified t)) org-habit-p nil priority 1099 warntime nil ts-date 738894 date (1 9 2024) type "scheduled" org-hd-marker #<marker (moves after insertion) at 9 in projects.org> org-marker #<marker (moves after insertion) at 94 in projects.org> undone-face org-scheduled-today help-echo "mouse-2 or RET jump to Org file ~/org/projects.org" mouse-face highlight done-face org-agenda-done org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?..." org-todo-regexp "\\(DONE\\|TODO\\)" org-not-done-regexp "\\(TODO\\)" dotime time format nil extra "Scheduled: " time "" level "  " txt #("DONE Test rewrite branch of nano-agenda" 0 4 (org-heading t effort-minutes nil effort nil face (org-done org-level-2) org-todo-head "TODO" fontified t) 4 5 (org-heading t effort-minutes nil effort nil face org-level-2 org-todo-head "TODO" fontified t) 5 39 (org-heading t effort-minutes nil effort nil face (org-headline-done org-level-2) org-todo-head "TODO" fontified t)) breadcrumbs nil duration nil time-of-day nil ...)) font-lock-comment-face)
  (cons (nano-agenda--entry-todo entry 'font-lock-comment-face) nil)
  (cond (daterange (cons (nano-agenda--svg-progress-bar (car daterange) (cdr daterange) time-face) nil)) (is-deadline (cons (nano-agenda--entry-todo entry 'error) nil)) (is-todo (cons (nano-agenda--entry-todo entry 'font-lock-comment-face) nil)) (time (cons (propertize (format-time-string "%H:%M" (car time)) 'face time-face) (propertize (format-time-string "%H:%M" (cdr time)) 'face time-face))) (t (cons (propertize "—————" 'face time-face) nil)))
  (let* ((time (nano-agenda--entry-time entry)) (is-now (and (car time) (cdr time) (time-less-p (car time) (current-time)) (time-less-p (current-time) (cdr time)))) (is-todo (nano-agenda--entry-is-todo entry)) (is-conflict (nano-agenda--entry-is-conflict entry)) (is-deadline (nano-agenda--entry-is-deadline entry)) (tags (nano-agenda--entry-tags entry)) (daterange (nano-agenda--entry-daterange entry)) (header (nano-agenda--entry-header entry)) (header-face 'default) (time-face (if is-conflict 'error 'nano-faded)) (deadline-face 'error-i) (todo-face 'default-i) (tag-align (if (and tags nano-agenda-tags-align) (propertize " " 'display (list 'space ':align-to (list '- 'right 1 (length tags)))) " ")) (header (concat (propertize header 'face header-face))) (prefix (cond (daterange (cons (nano-agenda--svg-progress-bar (car daterange) (cdr daterange) time-face) nil)) (is-deadline (cons (nano-agenda--entry-todo entry 'error) nil)) (is-todo (cons (nano-agenda--entry-todo entry 'font-lock-comment-face) nil)) (time (cons (propertize (format-time-string "%H:%M" ...) 'face time-face) (propertize (format-time-string "%H:%M" ...) 'face time-face))) (t (cons (propertize "—————" 'face time-face) nil))))) (setq nano-agenda--entry-is-now (or nano-agenda--entry-is-now is-now)) (concat " " (car prefix) (propertize " │ " 'face 'nano-subtle-i) header tag-align tags))
  nano-agenda--entry-format(#("DONE Test rewrite branch of nano-agenda" 0 39 (todo-state #("DONE" 0 4 (face (org-done org-level-2) org-todo-head "TODO" fontified t)) org-habit-p nil priority 1099 warntime nil ts-date 738894 date (1 9 2024) type "scheduled" org-hd-marker #<marker (moves after insertion) at 9 in projects.org> org-marker #<marker (moves after insertion) at 94 in projects.org> undone-face org-scheduled-today help-echo "mouse-2 or RET jump to Org file ~/org/projects.org" mouse-face highlight done-face org-agenda-done org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?..." org-todo-regexp "\\(DONE\\|TODO\\)" org-not-done-regexp "\\(TODO\\)" dotime time format nil extra "Scheduled: " time "" level "  " txt #("DONE Test rewrite branch of nano-agenda" 0 4 (org-heading t effort-minutes nil effort nil face (org-done org-level-2) org-todo-head "TODO" fontified t) 4 5 (org-heading t effort-minutes nil effort nil face org-level-2 org-todo-head "TODO" fontified t) 5 39 (org-heading t effort-minutes nil effort nil face (org-headline-done org-level-2) org-todo-head "TODO" fontified t)) breadcrumbs nil duration nil time-of-day nil ...)))
  (insert (nano-agenda--entry-format entry))
  (let ((entry (nth i entries)) (point nil) (highlight (and (nano-agenda-date-equal nano-agenda-date date) (eq i nano-agenda--entry-index)))) (nano-agenda-forward-line 1) (goto-char (line-end-position)) (setq point (point)) (insert padding) (if highlight (progn (insert entry-marker) (setq nano-agenda--entry-marker (get-text-property 0 'org-marker entry))) (insert separation)) (insert (nano-agenda--entry-format entry)) (if highlight (progn (move-overlay nano-agenda--entry-overlay point (line-end-position)))))
  (let ((i (car tail))) (let ((entry (nth i entries)) (point nil) (highlight (and (nano-agenda-date-equal nano-agenda-date date) (eq i nano-agenda--entry-index)))) (nano-agenda-forward-line 1) (goto-char (line-end-position)) (setq point (point)) (insert padding) (if highlight (progn (insert entry-marker) (setq nano-agenda--entry-marker (get-text-property 0 'org-marker entry))) (insert separation)) (insert (nano-agenda--entry-format entry)) (if highlight (progn (move-overlay nano-agenda--entry-overlay point (line-end-position))))) (setq tail (cdr tail)))
  (while tail (let ((i (car tail))) (let ((entry (nth i entries)) (point nil) (highlight (and (nano-agenda-date-equal nano-agenda-date date) (eq i nano-agenda--entry-index)))) (nano-agenda-forward-line 1) (goto-char (line-end-position)) (setq point (point)) (insert padding) (if highlight (progn (insert entry-marker) (setq nano-agenda--entry-marker (get-text-property 0 'org-marker entry))) (insert separation)) (insert (nano-agenda--entry-format entry)) (if highlight (progn (move-overlay nano-agenda--entry-overlay point (line-end-position))))) (setq tail (cdr tail))))
  (let ((tail (number-sequence 0 (1- (length entries))))) (while tail (let ((i (car tail))) (let ((entry (nth i entries)) (point nil) (highlight (and (nano-agenda-date-equal nano-agenda-date date) (eq i nano-agenda--entry-index)))) (nano-agenda-forward-line 1) (goto-char (line-end-position)) (setq point (point)) (insert padding) (if highlight (progn (insert entry-marker) (setq nano-agenda--entry-marker (get-text-property 0 ... entry))) (insert separation)) (insert (nano-agenda--entry-format entry)) (if highlight (progn (move-overlay nano-agenda--entry-overlay point (line-end-position))))) (setq tail (cdr tail)))))
  (let* ((day (nth 3 (decode-time date))) (month (nth 4 (decode-time date))) (year (nth 5 (decode-time date))) (org-date (list month day year)) (holidays (nano-agenda-holidays org-date)) (anniversaries (nano-agenda-anniversaries org-date)) (width (- (window-width) 24 3 9)) (subtitle (or anniversaries holidays)) (subtitle (if subtitle (progn (truncate-string-to-width subtitle width nil nil "…")))) (entries (nano-agenda-entries org-date)) (separation "  ") (entry-marker " ") (padding (propertize " " 'display '(space :align-to (+ left 22)))) (title (format-time-string "%A %d %B %Y" date)) (week (format-time-string " (Week %W)" date))) (goto-char (line-end-position)) (insert padding) (insert separation) (insert (propertize title 'face 'nano-agenda-header-title)) (insert (propertize week 'face 'nano-agenda-header-subtitle)) (nano-agenda-forward-line 1) (goto-char (line-end-position)) (insert padding) (insert separation) (if subtitle (progn (insert (propertize subtitle 'face 'nano-agenda-header-subtitle)))) (if (nano-agenda-date-equal nano-agenda-date date) (progn (setq nano-agenda--entry-index (if (> (length entries) 0) (mod nano-agenda--entry-index (length entries)) -1)) (setq nano-agenda--entry-marker nil))) (if (overlayp nano-agenda--entry-overlay) nil (setq nano-agenda--entry-overlay (make-overlay (point-min) (point-min))) (overlay-put nano-agenda--entry-overlay 'face 'hl-line)) (let ((tail (number-sequence 0 (1- (length entries))))) (while tail (let ((i (car tail))) (let ((entry (nth i entries)) (point nil) (highlight (and ... ...))) (nano-agenda-forward-line 1) (goto-char (line-end-position)) (setq point (point)) (insert padding) (if highlight (progn (insert entry-marker) (setq nano-agenda--entry-marker ...)) (insert separation)) (insert (nano-agenda--entry-format entry)) (if highlight (progn (move-overlay nano-agenda--entry-overlay point ...)))) (setq tail (cdr tail))))))
  nano-agenda--insert-agenda(nil)
  (if (eq nano-agenda-view-mode 'week) (let ((upper-bound 7) (counter 0)) (while (< counter upper-bound) (let ((inc counter)) (nano-agenda--insert-agenda (nano-agenda--date first-day-of-week inc 0 0)) (nano-agenda-forward-line 2)) (setq counter (1+ counter)))) (nano-agenda--insert-agenda nano-agenda-date))
  (let* ((date (decode-time nano-agenda-date)) (day (nth 3 date)) (month (nth 4 date)) (year (nth 5 date)) (day-of-week (mod (1- (calendar-day-of-week (list month day year))) 7)) (first-day-of-week (encode-time (list 0 0 0 (- day day-of-week) month year)))) (if (eq nano-agenda-view-mode 'week) (let ((upper-bound 7) (counter 0)) (while (< counter upper-bound) (let ((inc counter)) (nano-agenda--insert-agenda (nano-agenda--date first-day-of-week inc 0 0)) (nano-agenda-forward-line 2)) (setq counter (1+ counter)))) (nano-agenda--insert-agenda nano-agenda-date)))
  (let ((inhibit-read-only t)) (erase-buffer) (setq nano-agenda--entry-is-now nil) (let* ((date (decode-time nano-agenda-date)) (day (nth 3 date)) (month (nth 4 date)) (year (nth 5 date)) (prev-month (encode-time (list 0 0 0 1 (1- month) year))) (curr-month (encode-time (list 0 0 0 1 month year))) (next-month (encode-time (list 0 0 0 1 (1+ month) year)))) (if (eq nano-agenda-view-mode 'week) (progn (nano-agenda--insert-calendar prev-month) (insert "\n"))) (nano-agenda--insert-calendar curr-month) (if (eq nano-agenda-view-mode 'week) (progn (insert "\n") (nano-agenda--insert-calendar next-month)))) (goto-char (point-min)) (let* ((date (decode-time nano-agenda-date)) (day (nth 3 date)) (month (nth 4 date)) (year (nth 5 date)) (day-of-week (mod (1- (calendar-day-of-week (list month day year))) 7)) (first-day-of-week (encode-time (list 0 0 0 (- day day-of-week) month year)))) (if (eq nano-agenda-view-mode 'week) (let ((upper-bound 7) (counter 0)) (while (< counter upper-bound) (let ((inc counter)) (nano-agenda--insert-agenda (nano-agenda--date first-day-of-week inc 0 0)) (nano-agenda-forward-line 2)) (setq counter (1+ counter)))) (nano-agenda--insert-agenda nano-agenda-date))) (if (stringp nano-agenda-clock-format) (progn (goto-char (point-min)) (nano-agenda--insert-clock))) (goto-char (point-min)) (insert nano-agenda-header) (run-hooks nano-agenda-update-hook))
  (save-current-buffer (set-buffer (get-buffer-create nano-agenda-buffer-name)) (let ((inhibit-read-only t)) (erase-buffer) (setq nano-agenda--entry-is-now nil) (let* ((date (decode-time nano-agenda-date)) (day (nth 3 date)) (month (nth 4 date)) (year (nth 5 date)) (prev-month (encode-time (list 0 0 0 1 (1- month) year))) (curr-month (encode-time (list 0 0 0 1 month year))) (next-month (encode-time (list 0 0 0 1 (1+ month) year)))) (if (eq nano-agenda-view-mode 'week) (progn (nano-agenda--insert-calendar prev-month) (insert "\n"))) (nano-agenda--insert-calendar curr-month) (if (eq nano-agenda-view-mode 'week) (progn (insert "\n") (nano-agenda--insert-calendar next-month)))) (goto-char (point-min)) (let* ((date (decode-time nano-agenda-date)) (day (nth 3 date)) (month (nth 4 date)) (year (nth 5 date)) (day-of-week (mod (1- (calendar-day-of-week ...)) 7)) (first-day-of-week (encode-time (list 0 0 0 (- day day-of-week) month year)))) (if (eq nano-agenda-view-mode 'week) (let ((upper-bound 7) (counter 0)) (while (< counter upper-bound) (let (...) (nano-agenda--insert-agenda ...) (nano-agenda-forward-line 2)) (setq counter (1+ counter)))) (nano-agenda--insert-agenda nano-agenda-date))) (if (stringp nano-agenda-clock-format) (progn (goto-char (point-min)) (nano-agenda--insert-clock))) (goto-char (point-min)) (insert nano-agenda-header) (run-hooks nano-agenda-update-hook)))
  nano-agenda-update()
  nano-agenda()
  funcall-interactively(nano-agenda)
  command-execute(nano-agenda record)
  execute-extended-command(nil "nano-agenda" "nano-ag")
  funcall-interactively(execute-extended-command nil "nano-agenda" "nano-ag")
  command-execute(execute-extended-command)
  recursive-edit()
  debug()
  funcall-interactively(debug)
  command-execute(debug record)
  execute-extended-command(nil "debug" "debu")
  funcall-interactively(execute-extended-command nil "debug" "debu")
  command-execute(execute-extended-command)

from nano-agenda.

rougier avatar rougier commented on August 18, 2024

Can you remove the SCHEDULED from the entry?

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

Sure, I now get the clock, but still no todo :)

image

from nano-agenda.

rougier avatar rougier commented on August 18, 2024

I meant remove only the SCHEDULED: word such as to have only the date (I do not handle scheduled properly yet)

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

Oh, so without any TODO I get:

image

But if the entry has TODO or DONE, then I get the (wrong-type-argument listp "Mark entry as done")

from nano-agenda.

rougier avatar rougier commented on August 18, 2024

Can you post the minimal projects.org above such that I can test locally?

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

@rougier With this config:

(require 'hl-line)
(require 'nano)
(require 'nano-agenda)

;; Keep track of when the task was completed
(setq org-log-done 'time)

;; Tell org-agenda where are the org files
(setq org-agenda-files '("~/org"))

And this org file ~/org/projects.org:

* Inbox
:PROPERTIES:
:CATEGORY: Inbox
:END:
** TODO Test rewrite branch of nano-agenda
<2024-01-10 Wed>

I get #9 (comment) when running M-x nano-agenda.

from nano-agenda.

rougier avatar rougier commented on August 18, 2024

Can you try (setq org-agenda-files '("~/org/projects.org")) just to make sure agenda is only parsing one file?

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

@rougier this is a sandbox environment (container), there is only one org file and above is the full .emacs.el . My goal is to package nano-agenda and your GTD setup as a standalone application, ideally as a TUI.

from nano-agenda.

rougier avatar rougier commented on August 18, 2024

What is the error you get exactly?

from nano-agenda.

TristanCacqueray avatar TristanCacqueray commented on August 18, 2024

@rougier I get #9 (comment) with the stacktrace #9 (comment)

Then after a while: Error running timer ‘nano-agenda-update’: (wrong-type-argument listp "Mark entry as done")

from nano-agenda.

rougier avatar rougier commented on August 18, 2024

Can you update svg-lib to the github version and/post documentation for svg-lib-button on your machine?

from nano-agenda.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.