rougier / mu4e-dashboard

A dashboard for mu4e (mu for emacs)
GNU General Public License v3.0
467 stars 43 forks source link

Lisp Error when opning link to a query with count #8

Open Sk4zz opened 3 years ago

Sk4zz commented 3 years ago

I started out by modifying your dashboard.org to my needs. I added a person in the People section but when clicking on the counted links, emacs encounters an error (wrong-type-argument number-or-marker-p "100") Here is the debug log

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p "100")
  >("100" 0)
  (and count (> count 0))
  (cond ((and (not fmt) (not count)) (mu4e-headers-search query)) ((and count (> count 0)) (let ((mu4e-headers-results-limit (string-to-number count))) (mu4e-headers-search query))) ((and fmt (> (length fmt) 0)) (mu4e-dashboard-update-link link)))
  (let* ((link (org-element-context)) (query (string-trim (nth 0 (split-string path "|")))) (fmt (nth 1 (split-string path "|"))) (count (nth 2 (split-string path "|")))) (cond ((and (not fmt) (not count)) (mu4e-headers-search query)) ((and count (> count 0)) (let ((mu4e-headers-results-limit (string-to-number count))) (mu4e-headers-search query))) ((and fmt (> (length fmt) 0)) (mu4e-dashboard-update-link link))))
  mu4e-dashboard-follow-mu4e-link("from:someone.i.know||100")
  org-link-open((link (:type "mu4e" :path "from:someone.i.know||100" :format bracket :raw-link "mu4e:from:someone.i.know||100" :application nil :search-option nil :begin 2175 :end 2212 :contents-begin 2206 :contents-end 2209 :post-blank 1 :parent (paragraph (:begin 2058 :end 2292 :contents-begin 2058 :contents-end 2291 :post-blank 1 :post-affiliated 2058 :parent nil)))) nil)
  org-open-at-point()
  org-open-at-mouse((mouse-2 (#<window 14 on dashboard.org> 2207 (679 . 125) 2421735 nil 2207 (61 . 5) nil (8 . 10) (11 . 23))))
  funcall-interactively(org-open-at-mouse (mouse-2 (#<window 14 on dashboard.org> 2207 (679 . 125) 2421735 nil 2207 (61 . 5) nil (8 . 10) (11 . 23))))
  call-interactively(org-open-at-mouse nil nil)
  command-execute(org-open-at-mouse)

The corresponding section looks like

[[mu4e:from:someone.i.know][Someone I know]] /[[mu4e:from:someone.i.know|(%3d)][(345)]]/ .................................. [[mu4e:from:someone.i.know||100][100]] - [[mu4e:from:someone.i.know||500][500]] - [[mu4e:from:someone.i.know||9999][all]]