unhammer / org-upcoming-modeline

📅 Show upcoming org event in modeline
https://www.reddit.com/r/emacs/comments/k1e4eu/show_next_orgappointment_in_modeline/
GNU General Public License v2.0
31 stars 6 forks source link

Error running timer ‘org-upcoming-modeline--set-string’: (wrong-type-argument stringp ((tomorrow . "tomorrow"))) #21

Closed tmalsburg closed 1 year ago

tmalsburg commented 1 year ago

This error message is showing up periodically in my *Messages* buffer and in the mini buffer:

Error running timer ‘org-upcoming-modeline--set-string’: (wrong-type-argument stringp ((tomorrow . "tomorrow")))

This error is apparently triggered in the function org-upcoming-modeline--format-ts.

My configuration:

(straight-use-package 'ts)
(straight-use-package 'org-ql)
(straight-use-package 'org-upcoming-modeline)
(require 'org-upcoming-modeline)
(org-upcoming-modeline-mode)

This configuration used to work until (I think) some weeks ago.

unhammer commented 1 year ago

What version of org-upcoming-modeline do you have? (E.g. if you ls ~/.emacs.d/elpa/org-upcoming-modeline*, or if you do C-h C-f org-upcoming-modeline-mode and C-x d the directory name should show the version)

tmalsburg commented 1 year ago

Thanks for the reply. I'm using the latest version from Melpa and an Emacs recently compiled from the development tree. Ubuntu 22.04.

Header of the source file says:

;;; org-upcoming-modeline.el --- Show next org event in mode line -*- lexical-binding: t -*-

;; Copyright (C) 2020--2023 Kevin Brubeck Unhammer

;; Author: Kevin Brubeck Unhammer <unhammer@fsfe.org>
;; Version: 0.1.6
;; Package-Requires: ((emacs "26.1") (ts "0.2") (org-ql "0.6"))
;; URL: https://github.com/unhammer/org-upcoming-modeline
;; Keywords: convenience, calendar
unhammer commented 1 year ago

The code that would be doing this is

https://github.com/unhammer/org-upcoming-modeline/blob/136a6a76d770d351559091c8d9ad5a189f1f2622/org-upcoming-modeline.el#L186-L187

What do you get if you M-: (or M-x eval-expression) and enter (concat (cdr (assoc 'tomorrow org-upcoming-modeline-l10n)) (ts-format " %H:%M" (ts-now))) ?

Also, do you ever see anything at all from this package in the modeline, or just the errors?

Also, did this start happening after an upgrade? (Any chance you could have a stale .elc lying around?)

tmalsburg commented 1 year ago

The code that would be doing this is

Yeah, that's what I thought. But when I execute your code I get "Tomorrow 13:59".

In the meantime, the error messages have also stopped. No idea why. I'll close this issue, but (with your permission) will reopen if the problem reappears.