emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Marcelo de Moraes Serpa <celoserpa@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: tag search broken
Date: Thu, 20 Sep 2012 23:28:21 -0400	[thread overview]
Message-ID: <20895.1348198101@alphaville> (raw)
In-Reply-To: Message from Marcelo de Moraes Serpa <celoserpa@gmail.com> of "Thu\, 20 Sep 2012 19\:28\:14 CDT." <CACHMzOG4bs4=-Sj+sgUYzeXH7UGE_UphgEMXXvqVsuGaoSHh-g@mail.gmail.com>

Marcelo de Moraes Serpa <celoserpa@gmail.com> wrote:

> Hello guys,
> 
> My tag search is broken, for some reason. When I search for "tag1" for example, the search breaks
> and I get the following message in the *Messages* buffer:
> 
> if: Wrong type argument: stringp, ("tag0" "tag1" "tag3" "tag4")
> 
> Here's the backtrace:
> 
>     Debugger entered--Lisp error: (wrong-type-argument stringp ("haxe" "ruby" "blog"
>     "coffeinthevein"))
>       string-match("\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]" ("haxe" "ruby" "blog"
>     "coffeinthevein"))
>       (if (string-match org-bracket-link-regexp category) (progn (setq l ...) (when ... ... ...))
>     (if (and org-prefix-category-max-length ...) (setq category ...)))
>     ....
>       org-agenda-format-item("" #("cyberchrist haxe engine vs jekyll -- a nice way to see what's
>     haxe is capable of and what is missing from ruby :haxe:ruby:blog:coffeinthevein:" 0 142
>     (org-category "someday_maybe" fontified nil)) "someday_maybe" ("haxe" "ruby" "blog"
>     "coffeinthevein"))
                                                   ^level argument missing

>       (setq txt (org-agenda-format-item "" (concat ... ...) category tags-list) priority
>     (org-get-priority txt))
>     ....
> I can't remember exactly when it started, but I don't remember messing with org sources or
> installing additional elisp pacakges in the last days. 
> 
> Does anyone know what could be wrong?
> 

There is a mismatch between the call and the definition of org-agend-format-item:
it recently acquired an extra argument "level" and apparently it is expecting it:

,----
| (defun org-agenda-format-item (extra txt &optional level category tags dotime
| 				     remove-re habitp)
`----

but the call in org-scan-tags does not pass it. So everything got shifted and
when it gets to

,----
| 	(if (string-match org-bracket-link-regexp category)
`----

instead of the category, it tries to do the match on the tags list with
predictable results.

What causes this is not clear however: check org.el:org-scan-tags to make
sure that the call to org-agenda-format-item includes the level argument.
That sounds unlikely however.

My guess is that you missed a step after some update: a remake and
starting with a fresh emacs will probably cure it.

Nick

  reply	other threads:[~2012-09-21  3:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21  0:28 tag search broken Marcelo de Moraes Serpa
2012-09-21  3:28 ` Nick Dokos [this message]
2012-09-21  3:36   ` Nick Dokos
2012-09-21  5:52     ` Marcelo de Moraes Serpa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20895.1348198101@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=celoserpa@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).