rougier/mu4e-thread-folding

wrong-type-argument listp \.\.\.)

baogiadoan opened this issue · 1 comments

I got the error after installing and set the config as recommended by the repo

Debugger entered--Lisp error: (wrong-type-argument listp \.\.\.)
  car(\.\.\.)
  (let* ((field (car item)) (width (cdr item)) (info (cdr (assoc field (append mu4e-header-info mu4e-header-info-custom)))) (require-full (plist-get info :require-full)) (sortable (plist-get info :sortable)) (sortfield (if sortable (progn (if (booleanp sortable) field sortable)))) (help (plist-get info :help)) (arrow (if (and sortable (eq sortfield mu4e-headers-sort-field)) (progn (if (eq mu4e-headers-sort-direction 'descending) downarrow uparrow)))) (name (concat (plist-get info :shortname) arrow)) (map (make-sparse-keymap))) (if require-full (progn (mu4e-error "Field %S is not supported in mu4e-headers-mode" field))) (if sortable (progn (define-key map [header-line mouse-1] #'(lambda (&optional e) (interactive "e") (let* (... ...) (mu4e-headers-change-sorting field t)))))) (concat (propertize (if width (truncate-string-to-width name width 0 32 truncate-string-ellipsis) name) 'face (if arrow (progn 'bold)) 'help-echo help 'mouse-face (if sortable (progn 'highlight)) 'keymap (if sortable (progn map)) 'field field) " "))
  (closure ((downarrow . " V") (uparrow . " ^") t) (item) (let* ((field (car item)) (width (cdr item)) (info (cdr (assoc field (append mu4e-header-info mu4e-header-info-custom)))) (require-full (plist-get info :require-full)) (sortable (plist-get info :sortable)) (sortfield (if sortable (progn (if ... field sortable)))) (help (plist-get info :help)) (arrow (if (and sortable (eq sortfield mu4e-headers-sort-field)) (progn (if ... downarrow uparrow)))) (name (concat (plist-get info :shortname) arrow)) (map (make-sparse-keymap))) (if require-full (progn (mu4e-error "Field %S is not supported in mu4e-headers-mode" field))) (if sortable (progn (define-key map [header-line mouse-1] #'(lambda ... ... ...)))) (concat (propertize (if width (truncate-string-to-width name width 0 32 truncate-string-ellipsis) name) 'face (if arrow (progn 'bold)) 'help-echo help 'mouse-face (if sortable (progn 'highlight)) 'keymap (if sortable (progn map)) 'field field) " ")))(\.\.\.)
  mapcar((closure ((downarrow . " V") (uparrow . " ^") t) (item) (let* ((field (car item)) (width (cdr item)) (info (cdr (assoc field (append mu4e-header-info mu4e-header-info-custom)))) (require-full (plist-get info :require-full)) (sortable (plist-get info :sortable)) (sortfield (if sortable (progn (if ... field sortable)))) (help (plist-get info :help)) (arrow (if (and sortable (eq sortfield mu4e-headers-sort-field)) (progn (if ... downarrow uparrow)))) (name (concat (plist-get info :shortname) arrow)) (map (make-sparse-keymap))) (if require-full (progn (mu4e-error "Field %S is not supported in mu4e-headers-mode" field))) (if sortable (progn (define-key map [header-line mouse-1] #'(lambda ... ... ...)))) (concat (propertize (if width (truncate-string-to-width name width 0 32 truncate-string-ellipsis) name) 'face (if arrow (progn 'bold)) 'help-echo help 'mouse-face (if sortable (progn 'highlight)) 'keymap (if sortable (progn map)) 'field field) " "))) ((:empty . 2) \.\.\.))
  (cons (make-string (+ mu4e~mark-fringe-len (floor (fringe-columns 'left t))) 32) (mapcar #'(lambda (item) (let* ((field (car item)) (width (cdr item)) (info (cdr ...)) (require-full (plist-get info :require-full)) (sortable (plist-get info :sortable)) (sortfield (if sortable ...)) (help (plist-get info :help)) (arrow (if ... ...)) (name (concat ... arrow)) (map (make-sparse-keymap))) (if require-full (progn (mu4e-error "Field %S is not supported in mu4e-headers-mode" field))) (if sortable (progn (define-key map ... ...))) (concat (propertize (if width ... name) 'face (if arrow ...) 'help-echo help 'mouse-face (if sortable ...) 'keymap (if sortable ...) 'field field) " "))) mu4e-headers-fields))
  (let ((uparrow (if mu4e-use-fancy-chars " ▲" " ^")) (downarrow (if mu4e-use-fancy-chars " ▼" " V"))) (cons (make-string (+ mu4e~mark-fringe-len (floor (fringe-columns 'left t))) 32) (mapcar #'(lambda (item) (let* ((field ...) (width ...) (info ...) (require-full ...) (sortable ...) (sortfield ...) (help ...) (arrow ...) (name ...) (map ...)) (if require-full (progn ...)) (if sortable (progn ...)) (concat (propertize ... ... ... ... help ... ... ... ... ... field) " "))) mu4e-headers-fields)))
  mu4e~header-line-format()
  (setq truncate-lines t buffer-undo-list t overwrite-mode nil header-line-format (mu4e~header-line-format))
  (let ((delay-mode-hooks t)) (special-mode) (setq major-mode 'mu4e-headers-mode) (setq mode-name "mu4e:headers") (progn (if (get 'special-mode 'mode-class) (put 'mu4e-headers-mode 'mode-class (get 'special-mode 'mode-class))) (if (keymap-parent mu4e-headers-mode-map) nil (set-keymap-parent mu4e-headers-mode-map (current-local-map))) (let ((parent (char-table-parent mu4e-headers-mode-syntax-table))) (if (and parent (not (eq parent (standard-syntax-table)))) nil (set-char-table-parent mu4e-headers-mode-syntax-table (syntax-table)))) (if (or (abbrev-table-get mu4e-headers-mode-abbrev-table :parents) (eq mu4e-headers-mode-abbrev-table local-abbrev-table)) nil (abbrev-table-put mu4e-headers-mode-abbrev-table :parents (list local-abbrev-table)))) (use-local-map mu4e-headers-mode-map) (set-syntax-table mu4e-headers-mode-syntax-table) (setq local-abbrev-table mu4e-headers-mode-abbrev-table) (use-local-map mu4e-headers-mode-map) (make-local-variable 'mu4e~headers-proc) (make-local-variable 'mu4e~highlighted-docid) (set (make-local-variable 'hl-line-face) 'mu4e-header-highlight-face) (mu4e-context-in-modeline) (add-hook 'mu4e-index-updated-hook 'mu4e~headers-maybe-auto-update) (add-hook 'mu4e-index-updated-hook #'mu4e~headers-index-updated-hook-fn t) (setq truncate-lines t buffer-undo-list t overwrite-mode nil header-line-format (mu4e~header-line-format)) (mu4e~mark-initialize) (hl-line-mode 1))
  (progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (special-mode) (setq major-mode 'mu4e-headers-mode) (setq mode-name "mu4e:headers") (progn (if (get 'special-mode 'mode-class) (put 'mu4e-headers-mode 'mode-class (get 'special-mode 'mode-class))) (if (keymap-parent mu4e-headers-mode-map) nil (set-keymap-parent mu4e-headers-mode-map (current-local-map))) (let ((parent (char-table-parent mu4e-headers-mode-syntax-table))) (if (and parent (not (eq parent ...))) nil (set-char-table-parent mu4e-headers-mode-syntax-table (syntax-table)))) (if (or (abbrev-table-get mu4e-headers-mode-abbrev-table :parents) (eq mu4e-headers-mode-abbrev-table local-abbrev-table)) nil (abbrev-table-put mu4e-headers-mode-abbrev-table :parents (list local-abbrev-table)))) (use-local-map mu4e-headers-mode-map) (set-syntax-table mu4e-headers-mode-syntax-table) (setq local-abbrev-table mu4e-headers-mode-abbrev-table) (use-local-map mu4e-headers-mode-map) (make-local-variable 'mu4e~headers-proc) (make-local-variable 'mu4e~highlighted-docid) (set (make-local-variable 'hl-line-face) 'mu4e-header-highlight-face) (mu4e-context-in-modeline) (add-hook 'mu4e-index-updated-hook 'mu4e~headers-maybe-auto-update) (add-hook 'mu4e-index-updated-hook #'mu4e~headers-index-updated-hook-fn t) (setq truncate-lines t buffer-undo-list t overwrite-mode nil header-line-format (mu4e~header-line-format)) (mu4e~mark-initialize) (hl-line-mode 1)))
  mu4e-headers-mode()
  (save-current-buffer (set-buffer buf) (mu4e-headers-mode) (if ignore-history nil (if mu4e~headers-last-query (progn (mu4e~headers-push-query mu4e~headers-last-query 'past)))) (setq mode-name "mu4e-headers" mu4e~headers-last-query rewritten-expr) (make-local-variable 'global-mode-string) (add-to-list 'global-mode-string '(:eval (concat (propertize (mu4e~quote-for-modeline mu4e~headers-last-query) 'face 'mu4e-modeline-face) " " (if (and mu4e-display-update-status-in-modeline (buffer-live-p mu4e~update-buffer) (process-live-p ...)) (propertize " (updating)" 'face 'mu4e-modeline-face) "")))))
  (let* ((buf (get-buffer-create mu4e~headers-buffer-name)) (inhibit-read-only t) (rewritten-expr (funcall mu4e-query-rewrite-function expr)) (maxnum (if mu4e-headers-full-search nil mu4e-headers-results-limit))) (save-current-buffer (set-buffer buf) (mu4e-headers-mode) (if ignore-history nil (if mu4e~headers-last-query (progn (mu4e~headers-push-query mu4e~headers-last-query 'past)))) (setq mode-name "mu4e-headers" mu4e~headers-last-query rewritten-expr) (make-local-variable 'global-mode-string) (add-to-list 'global-mode-string '(:eval (concat (propertize (mu4e~quote-for-modeline mu4e~headers-last-query) 'face 'mu4e-modeline-face) " " (if (and mu4e-display-update-status-in-modeline ... ...) (propertize " (updating)" ... ...) ""))))) (if (get-buffer-window buf 0) nil (switch-to-buffer buf)) (run-hook-with-args 'mu4e-headers-search-hook expr) (mu4e~headers-clear mu4e~search-message) (mu4e~proc-find rewritten-expr mu4e-headers-show-threads mu4e-headers-sort-field mu4e-headers-sort-direction maxnum mu4e-headers-skip-duplicates mu4e-headers-include-related))
  mu4e~headers-search-execute("flag:unread AND NOT flag:trashed" nil)
  (let* ((prompt (mu4e-format (or prompt "Search for: "))) (expr (if edit (read-string prompt expr) (or expr (read-string prompt nil 'mu4e~headers-search-hist))))) (mu4e-mark-handle-when-leaving) (mu4e~headers-search-execute expr ignore-history) (setq mu4e~headers-msgid-target msgid mu4e~headers-view-target show))
  mu4e-headers-search("flag:unread AND NOT flag:trashed" nil nil)
  (let ((expr (or expr (mu4e-ask-bookmark (if edit "Select bookmark: " "Bookmark: "))))) (run-hook-with-args 'mu4e-headers-search-bookmark-hook expr) (mu4e-headers-search expr (if edit (progn "Edit bookmark: ")) edit))
  mu4e-headers-search-bookmark()
  funcall-interactively(mu4e-headers-search-bookmark)
  call-interactively(mu4e-headers-search-bookmark nil nil)
  command-execute(mu4e-headers-search-bookmark)

Oh I see. When you set mu4e-headers-fields you are supposed to replace the ... with your own config. It is actually confusing and I changed the README. Try instead:

(setq mu4e-headers-fields '((:empty . 2)
                            (:human-date    .   12)
                            (:flags         .    6)
                            (:mailing-list  .   10)
                            (:from          .   22)
                            (:subject       .   nil)))