From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien Vauban Subject: wrong-type-argument listp when filtering agenda on `work' tag Date: Fri, 07 Nov 2014 17:41:18 +0100 Message-ID: <86389vt13l.fsf@example.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, In the agenda view, when filtering for the tasks marked `work' (through `/ w') [1], I get the following error: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (wrong-type-argument listp #("{\\<\\(?:work\\= )\\>}" 0 16 (grouptag t))) reverse(#("{\\<\\(?:work\\)\\>}" 0 16 (grouptag t))) (or (reverse rpl) (list rtnmatch)) (if single-as-list (or (reverse rpl) (list rtnmatch)) rtnmatch) (let* ((case-fold-search t) (stable org-mode-syntax-table) (tal (or org-t= ag-groups-alist-for-agenda org-tag-groups-alist)) (tal (if downcased (mapca= r (function (lambda (tg) (mapcar ... tg))) tal) tal)) (tml (mapcar (quote c= ar) tal)) (rtnmatch match) rpl) (modify-syntax-entry 64 "w" stable) (modify= -syntax-entry 95 "w" stable) (while (and tml (let ((table (syntax-table)) (= buffer (current-buffer))) (unwind-protect (progn (set-syntax-table stable) = (string-match (concat "\\(?1:[+-]?\\)\\(?2:\\<" ... "\\>\\)") rtnmatch)) (s= ave-current-buffer (set-buffer buffer) (set-syntax-table table))))) (let* (= (dir (match-string 1 rtnmatch)) (tag (match-string 2 rtnmatch)) (tag (if do= wncased (downcase tag) tag))) (setq tml (delete tag tml)) (if (not (get-tex= t-property 0 (quote grouptag) (match-string 2 rtnmatch))) (progn (setq rpl = (append (org-uniquify rpl) (assoc tag tal))) (setq rpl (concat dir "{\\<" (= regexp-opt rpl) "\\>}")) (if (stringp rpl) (org-add-props rpl (quote ...)))= (setq rtnmatch (replace-match rpl t t rtnmatch)))))) (if single-as-list (o= r (reverse rpl) (list rtnmatch)) rtnmatch)) (if org-group-tags (let* ((case-fold-search t) (stable org-mode-syntax-ta= ble) (tal (or org-tag-groups-alist-for-agenda org-tag-groups-alist)) (tal (= if downcased (mapcar (function (lambda ... ...)) tal) tal)) (tml (mapcar (q= uote car) tal)) (rtnmatch match) rpl) (modify-syntax-entry 64 "w" stable) (= modify-syntax-entry 95 "w" stable) (while (and tml (let ((table (syntax-tab= le)) (buffer (current-buffer))) (unwind-protect (progn (set-syntax-table st= able) (string-match ... rtnmatch)) (save-current-buffer (set-buffer buffer)= (set-syntax-table table))))) (let* ((dir (match-string 1 rtnmatch)) (tag (= match-string 2 rtnmatch)) (tag (if downcased (downcase tag) tag))) (setq tm= l (delete tag tml)) (if (not (get-text-property 0 (quote grouptag) (match-s= tring 2 rtnmatch))) (progn (setq rpl (append ... ...)) (setq rpl (concat di= r "{\\<" ... "\\>}")) (if (stringp rpl) (org-add-props rpl ...)) (setq rtnm= atch (replace-match rpl t t rtnmatch)))))) (if single-as-list (or (reverse = rpl) (list rtnmatch)) rtnmatch)) (if single-as-list (list (if downcased (do= wncase match) match)) match)) org-tags-expand("work" t t) (mapcar (function (lambda (f1) (concat dir f1))) (org-tags-expand f0 t t)) (append (mapcar (function (lambda (f1) (concat dir f1))) (org-tags-expand= f0 t t)) rtn) (setq rtn (append (mapcar (function (lambda (f1) (concat dir f1))) (org-t= ags-expand f0 t t)) rtn)) (let (f0 dir) (if (string-match "^\\([+-]\\)\\(.+\\)" f) (setq dir (match= -string 1 f) f0 (match-string 2 f)) (setq dir (if no-operator "" "+") f0 f)= ) (setq rtn (append (mapcar (function (lambda (f1) (concat dir f1))) (org-t= ags-expand f0 t t)) rtn))) (lambda (f) (let (f0 dir) (if (string-match "^\\([+-]\\)\\(.+\\)" f) (set= q dir (match-string 1 f) f0 (match-string 2 f)) (setq dir (if no-operator "= " "+") f0 f)) (setq rtn (append (mapcar (function (lambda (f1) (concat dir = f1))) (org-tags-expand f0 t t)) rtn))))("+work") mapc((lambda (f) (let (f0 dir) (if (string-match "^\\([+-]\\)\\(.+\\)" f)= (setq dir (match-string 1 f) f0 (match-string 2 f)) (setq dir (if no-opera= tor "" "+") f0 f)) (setq rtn (append (mapcar (function (lambda (f1) (concat= dir f1))) (org-tags-expand f0 t t)) rtn)))) ("+work")) (let ((case-fold-search t) rtn) (mapc (function (lambda (f) (let (f0 dir)= (if (string-match "^\\([+-]\\)\\(.+\\)" f) (setq dir (match-string 1 f) f0= (match-string 2 f)) (setq dir (if no-operator "" "+") f0 f)) (setq rtn (ap= pend (mapcar ... ...) rtn))))) filter) (reverse rtn)) (if org-group-tags (let ((case-fold-search t) rtn) (mapc (function (lambd= a (f) (let (f0 dir) (if (string-match "^\\([+-]\\)\\(.+\\)" f) (setq dir ..= . f0 ...) (setq dir ... f0 f)) (setq rtn (append ... rtn))))) filter) (reve= rse rtn)) filter) org-agenda-filter-expand-tags(("+work")) (let ((nfilter (org-agenda-filter-expand-tags filter)) nf nf1 (ffunc (fun= ction (lambda (nf0 nf01 fltr notgroup op) (let ((--dolist-tail-- fltr) x) (= while --dolist-tail-- (setq x ...) (if ... ... ... ...) (setq nf0 ...) (set= q --dolist-tail-- ...))) (if notgroup (setq f (cons ... f)) (setq f (cons .= .. f))))))) (cond ((equal filter (quote ("+"))) (setq f (list (list (quote = not) (quote tags))))) ((equal nfilter filter) (funcall ffunc f1 f filter t = nil)) (t (funcall ffunc nf1 nf nfilter nil nil)))) (while --dolist-tail-- (setq x (car --dolist-tail--)) (let ((nfilter (org= -agenda-filter-expand-tags filter)) nf nf1 (ffunc (function (lambda (nf0 nf= 01 fltr notgroup op) (let (... x) (while --dolist-tail-- ... ... ... ...)) = (if notgroup (setq f ...) (setq f ...)))))) (cond ((equal filter (quote ("+= "))) (setq f (list (list (quote not) (quote tags))))) ((equal nfilter filte= r) (funcall ffunc f1 f filter t nil)) (t (funcall ffunc nf1 nf nfilter nil = nil)))) (setq --dolist-tail-- (cdr --dolist-tail--))) (let ((--dolist-tail-- filter) x) (while --dolist-tail-- (setq x (car --d= olist-tail--)) (let ((nfilter (org-agenda-filter-expand-tags filter)) nf nf= 1 (ffunc (function (lambda (nf0 nf01 fltr notgroup op) (let ... ...) (if no= tgroup ... ...))))) (cond ((equal filter (quote ("+"))) (setq f (list (list= ... ...)))) ((equal nfilter filter) (funcall ffunc f1 f filter t nil)) (t = (funcall ffunc nf1 nf nfilter nil nil)))) (setq --dolist-tail-- (cdr --doli= st-tail--)))) (cond ((eq type (quote tag)) (setq filter (delete-dups (append (get (quot= e org-agenda-tag-filter) :preset-filter) filter))) (let ((--dolist-tail-- f= ilter) x) (while --dolist-tail-- (setq x (car --dolist-tail--)) (let ((nfil= ter (org-agenda-filter-expand-tags filter)) nf nf1 (ffunc (function ...))) = (cond ((equal filter ...) (setq f ...)) ((equal nfilter filter) (funcall ff= unc f1 f filter t nil)) (t (funcall ffunc nf1 nf nfilter nil nil)))) (setq = --dolist-tail-- (cdr --dolist-tail--))))) ((eq type (quote category)) (setq= filter (delete-dups (append (get (quote org-agenda-category-filter) :prese= t-filter) filter))) (let ((--dolist-tail-- filter) x) (while --dolist-tail-= - (setq x (car --dolist-tail--)) (if (equal "-" (substring x 0 1)) (setq f1= (list (quote not) (list ... ... ...))) (setq f1 (list (quote equal) (subst= ring x 1) (quote cat)))) (setq f (cons f1 f)) (setq --dolist-tail-- (cdr --= dolist-tail--))))) ((eq type (quote regexp)) (setq filter (delete-dups (app= end (get (quote org-agenda-regexp-filter) :preset-filter) filter))) (let ((= --dolist-tail-- filter) x) (while --dolist-tail-- (setq x (car --dolist-tai= l--)) (if (equal "-" (substring x 0 1)) (setq f1 (list (quote not) (list ..= . ... ...))) (setq f1 (list (quote string-match) (substring x 1) (quote txt= )))) (setq f (cons f1 f)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (= (eq type (quote effort)) (setq filter (delete-dups (append (get (quote org-= agenda-effort-filter) :preset-filter) filter))) (let ((--dolist-tail-- filt= er) x) (while --dolist-tail-- (setq x (car --dolist-tail--)) (setq f (cons = (org-agenda-filter-effort-form x) f)) (setq --dolist-tail-- (cdr --dolist-t= ail--)))))) (let (f f1) (cond ((eq type (quote tag)) (setq filter (delete-dups (appen= d (get (quote org-agenda-tag-filter) :preset-filter) filter))) (let ((--dol= ist-tail-- filter) x) (while --dolist-tail-- (setq x (car --dolist-tail--))= (let ((nfilter ...) nf nf1 (ffunc ...)) (cond (... ...) (... ...) (t ...))= ) (setq --dolist-tail-- (cdr --dolist-tail--))))) ((eq type (quote category= )) (setq filter (delete-dups (append (get (quote org-agenda-category-filter= ) :preset-filter) filter))) (let ((--dolist-tail-- filter) x) (while --doli= st-tail-- (setq x (car --dolist-tail--)) (if (equal "-" (substring x 0 1)) = (setq f1 (list ... ...)) (setq f1 (list ... ... ...))) (setq f (cons f1 f))= (setq --dolist-tail-- (cdr --dolist-tail--))))) ((eq type (quote regexp)) = (setq filter (delete-dups (append (get (quote org-agenda-regexp-filter) :pr= eset-filter) filter))) (let ((--dolist-tail-- filter) x) (while --dolist-ta= il-- (setq x (car --dolist-tail--)) (if (equal "-" (substring x 0 1)) (setq= f1 (list ... ...)) (setq f1 (list ... ... ...))) (setq f (cons f1 f)) (set= q --dolist-tail-- (cdr --dolist-tail--))))) ((eq type (quote effort)) (setq= filter (delete-dups (append (get (quote org-agenda-effort-filter) :preset-= filter) filter))) (let ((--dolist-tail-- filter) x) (while --dolist-tail-- = (setq x (car --dolist-tail--)) (setq f (cons (org-agenda-filter-effort-form= x) f)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (cons (quote and) = (nreverse f))) org-agenda-filter-make-matcher(("+work") tag) (setq org-agenda-filter-form (org-agenda-filter-make-matcher filter type)) (let (tags cat txt) (setq org-agenda-filter-form (org-agenda-filter-make-= matcher filter type)) (setq org-agenda-filtered-by-category (and (eq type (= quote category)) (not (equal (substring (car filter) 0 1) "-")))) (org-agen= da-set-mode-name) (save-excursion (goto-char (point-min)) (while (not (eobp= )) (if (org-get-at-bol (quote org-marker)) (progn (setq tags (apply (quote = append) (mapcar ... ...)) cat (org-get-at-eol (quote org-category) 1) txt (= org-get-at-eol (quote txt) 1)) (if (not (eval org-agenda-filter-form)) (org= -agenda-filter-hide-line type)) (beginning-of-line 2)) (beginning-of-line 2= )))) (if (get-char-property (point) (quote invisible)) (condition-case nil = (progn (org-agenda-previous-line)) (error nil))) (if org-agenda-display-cou= nt-of-items (progn (org-agenda-insert-filtered-count-all-blocks)))) org-agenda-filter-apply(("+work") tag) (cond ((equal char 13) (org-agenda-filter-show-all-tag) (if org-agenda-au= to-exclude-function (progn (setq org-agenda-tag-filter nil) (let ((--dolist= -tail-- (org-agenda-get-represented-tags)) tag) (while --dolist-tail-- (set= q tag (car --dolist-tail--)) (let (...) (if modifier ...)) (setq --dolist-t= ail-- (cdr --dolist-tail--)))) (if (not (null org-agenda-tag-filter)) (org-= agenda-filter-apply org-agenda-tag-filter (quote tag)))))) ((equal char 47)= (org-agenda-filter-show-all-tag) (if (get (quote org-agenda-tag-filter) :p= reset-filter) (progn (org-agenda-filter-apply org-agenda-tag-filter (quote = tag)))) (if org-agenda-display-count-of-items (progn (org-agenda-remove-fil= tered-count-all-blocks))) (setq maybe-refresh t)) ((equal char 46) (setq or= g-agenda-tag-filter (mapcar (function (lambda (tag) (concat "+" tag))) (org= -get-at-bol (quote tags)))) (org-agenda-filter-apply org-agenda-tag-filter = (quote tag))) ((or (equal char 32) (setq a (rassoc char alist)) (and tag (s= etq a (cons tag nil)))) (org-agenda-filter-show-all-tag) (setq tag (car a))= (setq org-agenda-tag-filter (cons (concat (if strip "-" "+") tag) (if narr= ow current nil))) (org-agenda-filter-apply org-agenda-tag-filter (quote tag= ))) (t (error "Invalid tag selection character %c" char))) (let* ((alist org-tag-alist-for-agenda) (tag-chars (mapconcat (function (= lambda (x) (if (and ... ...) (char-to-string ...) ""))) alist "")) (inhibit= -read-only t) (current org-agenda-tag-filter) a n tag) (if char nil (messag= e "%s by tag [%s ], [TAB], %s[/]:off, [+-]:narrow" (if narrow "Narrow" "Fil= ter") tag-chars (if org-agenda-auto-exclude-function "[RET], " "")) (setq c= har (read-char-exclusive))) (if (member char (quote (43 45))) (progn (cond = ((equal char 45) (setq strip t narrow t)) ((equal char 43) (setq strip nil = narrow t))) (message "Narrow by tag [%s ], [TAB], [/]:off" tag-chars) (setq= char (read-char-exclusive)))) (if (equal char 9) (progn (if (local-variabl= e-p (quote org-global-tags-completion-table) (current-buffer)) nil (org-set= -local (quote org-global-tags-completion-table) (org-global-tags-completion= -table))) (let ((completion-ignore-case t)) (setq tag (org-icompleting-read= "Tag: " org-global-tags-completion-table))))) (cond ((equal char 13) (org-= agenda-filter-show-all-tag) (if org-agenda-auto-exclude-function (progn (se= tq org-agenda-tag-filter nil) (let ((--dolist-tail-- ...) tag) (while --dol= ist-tail-- (setq tag ...) (let ... ...) (setq --dolist-tail-- ...))) (if (n= ot (null org-agenda-tag-filter)) (org-agenda-filter-apply org-agenda-tag-fi= lter (quote tag)))))) ((equal char 47) (org-agenda-filter-show-all-tag) (if= (get (quote org-agenda-tag-filter) :preset-filter) (progn (org-agenda-filt= er-apply org-agenda-tag-filter (quote tag)))) (if org-agenda-display-count-= of-items (progn (org-agenda-remove-filtered-count-all-blocks))) (setq maybe= -refresh t)) ((equal char 46) (setq org-agenda-tag-filter (mapcar (function= (lambda (tag) (concat "+" tag))) (org-get-at-bol (quote tags)))) (org-agen= da-filter-apply org-agenda-tag-filter (quote tag))) ((or (equal char 32) (s= etq a (rassoc char alist)) (and tag (setq a (cons tag nil)))) (org-agenda-f= ilter-show-all-tag) (setq tag (car a)) (setq org-agenda-tag-filter (cons (c= oncat (if strip "-" "+") tag) (if narrow current nil))) (org-agenda-filter-= apply org-agenda-tag-filter (quote tag))) (t (error "Invalid tag selection = character %c" char)))) org-agenda-filter-by-tag(nil) call-interactively(org-agenda-filter-by-tag) --8<---------------cut here---------------end--------------->8--- Best regards, Seb [1] With the following setting in my .emacs file: --8<---------------cut here---------------start------------->8--- (setq org-tag-alist '((:startgroup . nil) ("personal" . ?p) ("work" . ?w) (:endgroup . nil) ("call" . ?c) ("errands" . ?e))) --8<---------------cut here---------------end--------------->8--- --=20 Sebastien Vauban Org-mode version 8.3beta (release_8.3beta-536-gfbd603)