emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan L Tyree <alantyree@gmail.com>
To: nicholas.dokos@hp.com
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Agenda search C-c a s
Date: Fri, 18 Jan 2013 16:07:05 +1100	[thread overview]
Message-ID: <8738xzgjuu.fsf@breezy.my.home> (raw)
In-Reply-To: <28851.1358482040@alphaville>


Nick Dokos writes:

> Alan L Tyree <alantyree@gmail.com> wrote:
>
>> Since a recent ELPA update I get strange behavior when searching
>> agenda files.
>> 
>> If the word searched for is NOT in the agenda files, everything works OK.
>> 
>> If the word IS in the agenda files, I get a blank Org Agenda buffer
>> and a message: Wrong type argument: listp, t.
>> 
>> Is anyone else having this problem? If not where do I begin to fix it.
>> 
>
> Get a backtrace and post it here. See sec. 1.4, "Feedback", of the
> org manual to find out how to get a useful backtrace.
>
> Nick
Thanks, Nick. Here are the details.

Emacs version 24.2.1 on Debian Wheezy (with emacs24 from Sid)
Org org-plus-contrib-20130114

I started emacs with the min org file as explained in Section 1.4

C-U M-X org-reload

Loaded an agenda file addr.org and added to agenda

M-x agenda

s

Enter a search term in the minibuffer that I know is in addr.org

Obtain the following backtrace:

Debugger entered--Lisp error: (wrong-type-argument listp t)
  memq(todo t)
  (or (eq org-agenda-show-inherited-tags (quote always)) (memq (quote todo) org-agenda-show-inherited-tags) (and (eq org-agenda-show-inherited-tags t) (or (eq org-agenda-use-tag-inheritance t) (memq (quote todo) org-agenda-use-tag-inheritance))))
  (setq marker (org-agenda-new-marker (point)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) inherited-tags (or (eq org-agenda-show-inherited-tags (quote always)) (memq (quote todo) org-agenda-show-inherited-tags) (and (eq org-agenda-show-inherited-tags t) (or (eq org-agenda-use-tag-inheritance t) (memq (quote todo) org-agenda-use-tag-inheritance)))) tags (org-get-tags-at nil (not inherited-tags)) txt (org-agenda-format-item "" (buffer-substring-no-properties beg1 (point-at-eol)) category tags t))
  (catch :skip (goto-char beg) (org-agenda-skip) (setq str (buffer-substring-no-properties (point-at-bol) (if hdl-only (point-at-eol) end))) (mapc (lambda (wr) (when (string-match wr str) (goto-char (1- end)) (throw :skip t))) regexps-) (mapc (lambda (wr) (unless (string-match wr str) (goto-char (1- end)) (throw :skip t))) (if todo-only (cons (concat "^*+[ 	]+" org-not-done-regexp) regexps+) regexps+)) (goto-char beg) (setq marker (org-agenda-new-marker (point)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) inherited-tags (or (eq org-agenda-show-inherited-tags (quote always)) (memq (quote todo) org-agenda-show-inherited-tags) (and (eq org-agenda-show-inherited-tags t) (or (eq org-agenda-use-tag-inheritance t) (memq (quote todo) org-agenda-use-tag-inheritance)))) tags (org-get-tags-at nil (not inherited-tags)) txt (org-agenda-format-item "" (buffer-substring-no-properties beg1 (point-at-eol)) category tags t)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote priority) 1000 (quote org-category) category (quote org-category-position) category-pos (quote type) "search") (push txt ee) (goto-char (1- end)))
  (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn (outline-next-heading) (point))) (catch :skip (goto-char beg) (org-agenda-skip) (setq str (buffer-substring-no-properties (point-at-bol) (if hdl-only (point-at-eol) end))) (mapc (lambda (wr) (when (string-match wr str) (goto-char (1- end)) (throw :skip t))) regexps-) (mapc (lambda (wr) (unless (string-match wr str) (goto-char (1- end)) (throw :skip t))) (if todo-only (cons (concat "^*+[ 	]+" org-not-done-regexp) regexps+) regexps+)) (goto-char beg) (setq marker (org-agenda-new-marker (point)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) inherited-tags (or (eq org-agenda-show-inherited-tags (quote always)) (memq (quote todo) org-agenda-show-inherited-tags) (and (eq org-agenda-show-inherited-tags t) (or (eq org-agenda-use-tag-inheritance t) (memq (quote todo) org-agenda-use-tag-inheritance)))) tags (org-get-tags-at nil (not inherited-tags)) txt (org-agenda-format-item "" (buffer-substring-no-properties beg1 (point-at-eol)) category tags t)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote priority) 1000 (quote org-category) category (quote org-category-position) category-pos (quote type) "search") (push txt ee) (goto-char (1- end))))
  (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or (org-at-heading-p) (outline-next-heading)) (throw (quote nextfile) t)) (goto-char (max (point-min) (1- (point)))) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn (outline-next-heading) (point))) (catch :skip (goto-char beg) (org-agenda-skip) (setq str (buffer-substring-no-properties (point-at-bol) (if hdl-only (point-at-eol) end))) (mapc (lambda (wr) (when (string-match wr str) (goto-char (1- end)) (throw :skip t))) regexps-) (mapc (lambda (wr) (unless (string-match wr str) (goto-char (1- end)) (throw :skip t))) (if todo-only (cons (concat "^*+[ 	]+" org-not-done-regexp) regexps+) regexps+)) (goto-char beg) (setq marker (org-agenda-new-marker (point)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) inherited-tags (or (eq org-agenda-show-inherited-tags (quote always)) (memq (quote todo) org-agenda-show-inherited-tags) (and (eq org-agenda-show-inherited-tags t) (or (eq org-agenda-use-tag-inheritance t) (memq ... org-agenda-use-tag-inheritance)))) tags (org-get-tags-at nil (not inherited-tags)) txt (org-agenda-format-item "" (buffer-substring-no-properties beg1 (point-at-eol)) category tags t)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote priority) 1000 (quote org-category) category (quote org-category-position) category-pos (quote type) "search") (push txt ee) (goto-char (1- end)))))
  (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or (org-at-heading-p) (outline-next-heading)) (throw (quote nextfile) t)) (goto-char (max (point-min) (1- (point)))) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn (outline-next-heading) (point))) (catch :skip (goto-char beg) (org-agenda-skip) (setq str (buffer-substring-no-properties (point-at-bol) (if hdl-only (point-at-eol) end))) (mapc (lambda (wr) (when (string-match wr str) (goto-char ...) (throw :skip t))) regexps-) (mapc (lambda (wr) (unless (string-match wr str) (goto-char ...) (throw :skip t))) (if todo-only (cons (concat "^*+[ 	]+" org-not-done-regexp) regexps+) regexps+)) (goto-char beg) (setq marker (org-agenda-new-marker (point)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) inherited-tags (or (eq org-agenda-show-inherited-tags (quote always)) (memq (quote todo) org-agenda-show-inherited-tags) (and (eq org-agenda-show-inherited-tags t) (or ... ...))) tags (org-get-tags-at nil (not inherited-tags)) txt (org-agenda-format-item "" (buffer-substring-no-properties beg1 (point-at-eol)) category tags t)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote priority) 1000 (quote org-category) category (quote org-category-position) category-pos (quote type) "search") (push txt ee) (goto-char (1- end))))))
  (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or (org-at-heading-p) (outline-next-heading)) (throw (quote nextfile) t)) (goto-char (max (point-min) (1- (point)))) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn (outline-next-heading) (point))) (catch :skip (goto-char beg) (org-agenda-skip) (setq str (buffer-substring-no-properties (point-at-bol) (if hdl-only ... end))) (mapc (lambda (wr) (when ... ... ...)) regexps-) (mapc (lambda (wr) (unless ... ... ...)) (if todo-only (cons ... regexps+) regexps+)) (goto-char beg) (setq marker (org-agenda-new-marker (point)) category (org-get-category) category-pos (get-text-property (point) (quote org-category-position)) inherited-tags (or (eq org-agenda-show-inherited-tags ...) (memq ... org-agenda-show-inherited-tags) (and ... ...)) tags (org-get-tags-at nil (not inherited-tags)) txt (org-agenda-format-item "" (buffer-substring-no-properties beg1 ...) category tags t)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote priority) 1000 (quote org-category) category (quote org-category-position) category-pos (quote type) "search") (push txt ee) (goto-char (1- end)))))))
  (progn (set-syntax-table (org-search-syntax-table)) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or (org-at-heading-p) (outline-next-heading)) (throw (quote nextfile) t)) (goto-char (max (point-min) (1- (point)))) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn (outline-next-heading) (point))) (catch :skip (goto-char beg) (org-agenda-skip) (setq str (buffer-substring-no-properties ... ...)) (mapc (lambda ... ...) regexps-) (mapc (lambda ... ...) (if todo-only ... regexps+)) (goto-char beg) (setq marker (org-agenda-new-marker ...) category (org-get-category) category-pos (get-text-property ... ...) inherited-tags (or ... ... ...) tags (org-get-tags-at nil ...) txt (org-agenda-format-item "" ... category tags t)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote priority) 1000 (quote org-category) category (quote org-category-position) category-pos (quote type) "search") (push txt ee) (goto-char (1- end))))))))
  (unwind-protect (progn (set-syntax-table (org-search-syntax-table)) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or (org-at-heading-p) (outline-next-heading)) (throw (quote nextfile) t)) (goto-char (max (point-min) (1- ...))) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn ... ...)) (catch :skip (goto-char beg) (org-agenda-skip) (setq str ...) (mapc ... regexps-) (mapc ... ...) (goto-char beg) (setq marker ... category ... category-pos ... inherited-tags ... tags ... txt ...) (org-add-props txt props ... marker ... marker ... org-todo-regexp ... org-complex-heading-regexp ... 1000 ... category ... category-pos ... "search") (push txt ee) (goto-char ...))))))) (save-current-buffer (set-buffer buffer) (set-syntax-table table)))
  (let ((table (syntax-table)) (buffer (current-buffer))) (unwind-protect (progn (set-syntax-table (org-search-syntax-table)) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or ... ...) (throw ... t)) (goto-char (max ... ...)) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg ... beg1 ... end ...) (catch :skip ... ... ... ... ... ... ... ... ... ...)))))) (save-current-buffer (set-buffer buffer) (set-syntax-table table))))
  (with-syntax-table (org-search-syntax-table) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or (org-at-heading-p) (outline-next-heading)) (throw (quote nextfile) t)) (goto-char (max (point-min) (1- (point)))) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn (outline-next-heading) (point))) (catch :skip (goto-char beg) (org-agenda-skip) (setq str (buffer-substring-no-properties ... ...)) (mapc (lambda ... ...) regexps-) (mapc (lambda ... ...) (if todo-only ... regexps+)) (goto-char beg) (setq marker (org-agenda-new-marker ...) category (org-get-category) category-pos (get-text-property ... ...) inherited-tags (or ... ... ...) tags (org-get-tags-at nil ...) txt (org-agenda-format-item "" ... category tags t)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote priority) 1000 (quote org-category) category (quote org-category-position) category-pos (quote type) "search") (push txt ee) (goto-char (1- end))))))))
  (save-current-buffer (set-buffer buffer) (with-syntax-table (org-search-syntax-table) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or (org-at-heading-p) (outline-next-heading)) (throw (quote nextfile) t)) (goto-char (max (point-min) (1- ...))) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn ... ...)) (catch :skip (goto-char beg) (org-agenda-skip) (setq str ...) (mapc ... regexps-) (mapc ... ...) (goto-char beg) (setq marker ... category ... category-pos ... inherited-tags ... tags ... txt ...) (org-add-props txt props ... marker ... marker ... org-todo-regexp ... org-complex-heading-regexp ... 1000 ... category ... category-pos ... "search") (push txt ee) (goto-char ...))))))))
  (with-current-buffer buffer (with-syntax-table (org-search-syntax-table) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or (org-at-heading-p) (outline-next-heading)) (throw (quote nextfile) t)) (goto-char (max (point-min) (1- ...))) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg (point-at-bol) beg1 (point) end (progn ... ...)) (catch :skip (goto-char beg) (org-agenda-skip) (setq str ...) (mapc ... regexps-) (mapc ... ...) (goto-char beg) (setq marker ... category ... category-pos ... inherited-tags ... tags ... txt ...) (org-add-props txt props ... marker ... marker ... org-todo-regexp ... org-complex-heading-regexp ... 1000 ... category ... category-pos ... "search") (push txt ee) (goto-char ...))))))))
  (catch (quote nextfile) (org-check-agenda-file file) (setq buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) (if (not buffer) (setq rtn (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)))) (with-current-buffer buffer (with-syntax-table (org-search-syntax-table) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (goto-char (point-min)) (unless (or ... ...) (throw ... t)) (goto-char (max ... ...)) (while (re-search-forward regexp nil t) (org-back-to-heading t) (skip-chars-forward "* ") (setq beg ... beg1 ... end ...) (catch :skip ... ... ... ... ... ... ... ... ... ...))))))))
  (while (setq file (pop files)) (setq ee nil) (catch (quote nextfile) (org-check-agenda-file file) (setq buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) (if (not buffer) (setq rtn (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)))) (with-current-buffer buffer (with-syntax-table (org-search-syntax-table) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction (if org-agenda-restrict ... ...) (goto-char ...) (unless ... ...) (goto-char ...) (while ... ... ... ... ...))))))) (setq rtn (nreverse ee)) (setq rtnall (append rtnall rtn)))
  (catch (quote exit) (if org-agenda-sticky (setq org-agenda-buffer-name (if (stringp string) (format "*Org Agenda(%s:%s)*" (or org-keys (or (and todo-only "S") "s")) string) (format "*Org Agenda(%s)*" (or (and todo-only "S") "s"))))) (org-agenda-prepare "SEARCH") (org-compile-prefix-format (quote search)) (org-set-sorting-strategy (quote search)) (setq org-agenda-redo-command (list (quote org-search-view) (if todo-only t nil) (list (quote if) (quote current-prefix-arg) nil string))) (setq org-agenda-query-string string) (if (equal (string-to-char string) 42) (setq hdl-only t words (substring string 1)) (setq words string)) (when (equal (string-to-char words) 33) (setq todo-only t words (substring words 1))) (when (equal (string-to-char words) 58) (setq full-words t words (substring words 1))) (if (or org-agenda-search-view-always-boolean (member (string-to-char words) (quote (45 43 123)))) (setq boolean t)) (setq words (org-split-string words)) (let (www w) (while (setq w (pop words)) (while (and (string-match "\\\\\\'" w) words) (setq w (concat (substring w 0 -1) " " (pop words)))) (push w www)) (setq words (nreverse www) www nil) (while (setq w (pop words)) (when (and (string-match "\\`[-+]?{" w) (not (string-match "}\\'" w))) (while (and words (not (string-match "}\\'" ...))) (setq w (concat w " " (pop words)))) (setq w (concat w " " (pop words)))) (push w www)) (setq words (nreverse www))) (setq org-agenda-last-search-view-search-was-boolean boolean) (when boolean (let (wds w) (while (setq w (pop words)) (if (or (equal (substring w 0 1) "\"") (and (> ... 1) (member ... ...) (equal ... "\""))) (while (and words (not ...)) (setq w (concat w " " ...)))) (and (string-match "\\`\\([-+]?\\)\"" w) (setq w (replace-match "\\1" nil nil w))) (and (equal (substring w -1) "\"") (setq w (substring w 0 -1))) (push w wds)) (setq words (nreverse wds)))) (if boolean (mapc (lambda (w) (setq c (string-to-char w)) (if (equal c 45) (setq neg t w (substring w 1)) (if (equal c 43) (setq neg nil w (substring w 1)) (setq neg nil))) (if (string-match "\\`{.*}\\'" w) (setq re (substring w 1 -1)) (if full-words (setq re (concat "\\<" ... "\\>")) (setq re (regexp-quote ...)))) (if neg (push re regexps-) (push re regexps+))) words) (push (mapconcat (lambda (w) (regexp-quote w)) words "\\s-+") regexps+)) (setq regexps+ (sort regexps+ (lambda (a b) (> (length a) (length b))))) (if (not regexps+) (setq regexp org-outline-regexp-bol) (setq regexp (pop regexps+)) (if hdl-only (setq regexp (concat org-outline-regexp-bol ".*?" regexp)))) (setq files (org-agenda-files nil (quote ifmode))) (when (eq (car org-agenda-text-search-extra-files) (quote agenda-archives)) (pop org-agenda-text-search-extra-files) (setq files (org-add-archive-files files))) (setq files (append files org-agenda-text-search-extra-files) rtnall nil) (while (setq file (pop files)) (setq ee nil) (catch (quote nextfile) (org-check-agenda-file file) (setq buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) (if (not buffer) (setq rtn (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)))) (with-current-buffer buffer (with-syntax-table (org-search-syntax-table) (unless (derived-mode-p (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search t)) (save-excursion (save-restriction ... ... ... ... ...)))))) (setq rtn (nreverse ee)) (setq rtnall (append rtnall rtn))) (if org-agenda-overriding-header (insert (org-add-props (copy-sequence org-agenda-overriding-header) nil (quote face) (quote org-agenda-structure)) "\n") (insert "Search words: ") (add-text-properties (point-min) (1- (point)) (list (quote face) (quote org-agenda-structure))) (setq pos (point)) (insert string "\n") (add-text-properties pos (1- (point)) (list (quote face) (quote org-warning))) (setq pos (point)) (unless org-agenda-multi (insert "Press `[', `]' to add/sub word, `{', `}' to add/sub regexp, `C-u r' to edit\n") (add-text-properties pos (1- (point)) (list (quote face) (quote org-agenda-structure))))) (org-agenda-mark-header-line (point-min)) (when rtnall (insert (org-agenda-finalize-entries rtnall) "\n")) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (add-text-properties (point-min) (point-max) (\` (org-agenda-type search org-last-args ((\, todo-only) (\, string) (\, edit-at)) org-redo-cmd (\, org-agenda-redo-command) org-series-cmd (\, org-cmd)))) (org-agenda-finalize) (setq buffer-read-only t))
  (let* ((props (list (quote face) nil (quote done-face) (quote org-agenda-done) (quote org-not-done-regexp) org-not-done-regexp (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote mouse-face) (quote highlight) (quote help-echo) (format "mouse-2 or RET jump to location"))) (full-words org-agenda-search-view-force-full-words) (org-agenda-text-search-extra-files org-agenda-text-search-extra-files) regexp rtn rtnall files file pos inherited-tags marker category category-pos tags c neg re boolean ee txt beg end words regexps+ regexps- hdl-only buffer beg1 str) (unless (and (not edit-at) (stringp string) (string-match "\\S-" string)) (setq string (read-string (if org-agenda-search-view-always-boolean "[+-]Word/{Regexp} ...: " "Phrase or [+-]Word/{Regexp} ...: ") (cond ((integerp edit-at) (cons string edit-at)) (edit-at string)) (quote org-agenda-search-history)))) (catch (quote exit) (if org-agenda-sticky (setq org-agenda-buffer-name (if (stringp string) (format "*Org Agenda(%s:%s)*" (or org-keys (or ... "s")) string) (format "*Org Agenda(%s)*" (or (and todo-only "S") "s"))))) (org-agenda-prepare "SEARCH") (org-compile-prefix-format (quote search)) (org-set-sorting-strategy (quote search)) (setq org-agenda-redo-command (list (quote org-search-view) (if todo-only t nil) (list (quote if) (quote current-prefix-arg) nil string))) (setq org-agenda-query-string string) (if (equal (string-to-char string) 42) (setq hdl-only t words (substring string 1)) (setq words string)) (when (equal (string-to-char words) 33) (setq todo-only t words (substring words 1))) (when (equal (string-to-char words) 58) (setq full-words t words (substring words 1))) (if (or org-agenda-search-view-always-boolean (member (string-to-char words) (quote (45 43 123)))) (setq boolean t)) (setq words (org-split-string words)) (let (www w) (while (setq w (pop words)) (while (and (string-match "\\\\\\'" w) words) (setq w (concat (substring w 0 -1) " " (pop words)))) (push w www)) (setq words (nreverse www) www nil) (while (setq w (pop words)) (when (and (string-match "\\`[-+]?{" w) (not (string-match "}\\'" w))) (while (and words (not ...)) (setq w (concat w " " ...))) (setq w (concat w " " (pop words)))) (push w www)) (setq words (nreverse www))) (setq org-agenda-last-search-view-search-was-boolean boolean) (when boolean (let (wds w) (while (setq w (pop words)) (if (or (equal ... "\"") (and ... ... ...)) (while (and words ...) (setq w ...))) (and (string-match "\\`\\([-+]?\\)\"" w) (setq w (replace-match "\\1" nil nil w))) (and (equal (substring w -1) "\"") (setq w (substring w 0 -1))) (push w wds)) (setq words (nreverse wds)))) (if boolean (mapc (lambda (w) (setq c (string-to-char w)) (if (equal c 45) (setq neg t w (substring w 1)) (if (equal c 43) (setq neg nil w ...) (setq neg nil))) (if (string-match "\\`{.*}\\'" w) (setq re (substring w 1 -1)) (if full-words (setq re ...) (setq re ...))) (if neg (push re regexps-) (push re regexps+))) words) (push (mapconcat (lambda (w) (regexp-quote w)) words "\\s-+") regexps+)) (setq regexps+ (sort regexps+ (lambda (a b) (> (length a) (length b))))) (if (not regexps+) (setq regexp org-outline-regexp-bol) (setq regexp (pop regexps+)) (if hdl-only (setq regexp (concat org-outline-regexp-bol ".*?" regexp)))) (setq files (org-agenda-files nil (quote ifmode))) (when (eq (car org-agenda-text-search-extra-files) (quote agenda-archives)) (pop org-agenda-text-search-extra-files) (setq files (org-add-archive-files files))) (setq files (append files org-agenda-text-search-extra-files) rtnall nil) (while (setq file (pop files)) (setq ee nil) (catch (quote nextfile) (org-check-agenda-file file) (setq buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) (if (not buffer) (setq rtn (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)))) (with-current-buffer buffer (with-syntax-table (org-search-syntax-table) (unless (derived-mode-p ...) (error "Agenda file %s is not in `org-mode'" file)) (let (...) (save-excursion ...))))) (setq rtn (nreverse ee)) (setq rtnall (append rtnall rtn))) (if org-agenda-overriding-header (insert (org-add-props (copy-sequence org-agenda-overriding-header) nil (quote face) (quote org-agenda-structure)) "\n") (insert "Search words: ") (add-text-properties (point-min) (1- (point)) (list (quote face) (quote org-agenda-structure))) (setq pos (point)) (insert string "\n") (add-text-properties pos (1- (point)) (list (quote face) (quote org-warning))) (setq pos (point)) (unless org-agenda-multi (insert "Press `[', `]' to add/sub word, `{', `}' to add/sub regexp, `C-u r' to edit\n") (add-text-properties pos (1- (point)) (list (quote face) (quote org-agenda-structure))))) (org-agenda-mark-header-line (point-min)) (when rtnall (insert (org-agenda-finalize-entries rtnall) "\n")) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (add-text-properties (point-min) (point-max) (\` (org-agenda-type search org-last-args ((\, todo-only) (\, string) (\, edit-at)) org-redo-cmd (\, org-agenda-redo-command) org-series-cmd (\, org-cmd)))) (org-agenda-finalize) (setq buffer-read-only t)))
  org-search-view(nil)
  call-interactively(org-search-view)
  (cond ((setq entry (assoc org-keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (setq type (nth 2 entry) org-match (eval (nth 3 entry)) lprops (nth 4 entry)) (if org-agenda-sticky (setq org-agenda-buffer-name (or (and ... ...) (format "*Org Agenda(%s)*" org-keys)))) (put (quote org-agenda-redo-command) (quote org-lprops) lprops) (cond ((eq type (quote agenda)) (org-let lprops (quote ...))) ((eq type (quote alltodo)) (org-let lprops (quote ...))) ((eq type (quote search)) (org-let lprops (quote ...))) ((eq type (quote stuck)) (org-let lprops (quote ...))) ((eq type (quote tags)) (org-let lprops (quote ...))) ((eq type (quote tags-todo)) (org-let lprops (quote ...))) ((eq type (quote todo)) (org-let lprops (quote ...))) ((eq type (quote tags-tree)) (org-check-for-org-mode) (org-let lprops (quote ...))) ((eq type (quote todo-tree)) (org-check-for-org-mode) (org-let lprops (quote ...))) ((eq type (quote occur-tree)) (org-check-for-org-mode) (org-let lprops (quote ...))) ((functionp type) (org-let lprops (quote ...))) ((fboundp type) (org-let lprops (quote ...))) (t (error "Invalid custom agenda command type %s" type)))) (org-agenda-run-series (nth 1 entry) (cddr entry)))) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable (quote org-agenda-custom-commands))) ((equal org-keys "a") (call-interactively (quote org-agenda-list))) ((equal org-keys "s") (call-interactively (quote org-search-view))) ((equal org-keys "S") (org-call-with-arg (quote org-search-view) (or arg (quote (4))))) ((equal org-keys "t") (call-interactively (quote org-todo-list))) ((equal org-keys "T") (org-call-with-arg (quote org-todo-list) (or arg (quote (4))))) ((equal org-keys "m") (call-interactively (quote org-tags-view))) ((equal org-keys "M") (org-call-with-arg (quote org-tags-view) (or arg (quote (4))))) ((equal org-keys "e") (call-interactively (quote org-store-agenda-views))) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (org-add-hook (quote post-command-hook) (lambda nil (unless (current-message) (let* ((m ...) (note ...)) (when note (message ...))))) t t)) ((equal org-keys "L") (unless (derived-mode-p (quote org-mode)) (error "This is not an Org-mode file")) (unless restriction (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (org-call-with-arg (quote org-timeline) arg))) ((equal org-keys "#") (call-interactively (quote org-agenda-list-stuck-projects))) ((equal org-keys "/") (call-interactively (quote org-occur-in-agenda-files))) ((equal org-keys "!") (customize-variable (quote org-stuck-projects))) (t (error "Invalid agenda key")))
  (let* ((prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if (equal (buffer-name) org-agenda-buffer-name) (quote current-window) org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil (mapcar (lambda (x) (cond (... ... nil) (... x) (... ...) (t ...))) org-agenda-custom-commands))) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (buf (current-buffer)) (bfn (buffer-file-name (buffer-base-buffer))) entry key type org-match lprops ans) (unless org-agenda-overriding-restriction (unless (org-bound-and-true-p org-agenda-keep-restricted-file-list) (put (quote org-agenda-files) (quote org-restrict) nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-command) (quote org-lprops) nil) (put (quote org-agenda-redo-command) (quote last-args) nil) (setq org-agenda-last-dispatch-buffer (current-buffer)) (unless org-keys (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) org-keys (car ans) restriction (cdr ans))) (if org-agenda-sticky (setq org-agenda-buffer-name (format "*Org Agenda(%s)*" org-keys))) (when (and (not org-agenda-overriding-restriction) restriction) (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (cond ((eq restriction (quote region)) (setq org-agenda-restrict t) (move-marker org-agenda-restrict-begin (region-beginning)) (move-marker org-agenda-restrict-end (region-end))) ((eq restriction (quote subtree)) (save-excursion (setq org-agenda-restrict t) (org-back-to-heading t) (move-marker org-agenda-restrict-begin (point)) (move-marker org-agenda-restrict-end (progn (org-end-of-subtree t))))))) (cond ((setq entry (assoc org-keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (setq type (nth 2 entry) org-match (eval (nth 3 entry)) lprops (nth 4 entry)) (if org-agenda-sticky (setq org-agenda-buffer-name (or ... ...))) (put (quote org-agenda-redo-command) (quote org-lprops) lprops) (cond ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-check-for-org-mode) (org-let lprops ...)) ((eq type ...) (org-check-for-org-mode) (org-let lprops ...)) ((eq type ...) (org-check-for-org-mode) (org-let lprops ...)) ((functionp type) (org-let lprops ...)) ((fboundp type) (org-let lprops ...)) (t (error "Invalid custom agenda command type %s" type)))) (org-agenda-run-series (nth 1 entry) (cddr entry)))) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable (quote org-agenda-custom-commands))) ((equal org-keys "a") (call-interactively (quote org-agenda-list))) ((equal org-keys "s") (call-interactively (quote org-search-view))) ((equal org-keys "S") (org-call-with-arg (quote org-search-view) (or arg (quote (4))))) ((equal org-keys "t") (call-interactively (quote org-todo-list))) ((equal org-keys "T") (org-call-with-arg (quote org-todo-list) (or arg (quote (4))))) ((equal org-keys "m") (call-interactively (quote org-tags-view))) ((equal org-keys "M") (org-call-with-arg (quote org-tags-view) (or arg (quote (4))))) ((equal org-keys "e") (call-interactively (quote org-store-agenda-views))) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (org-add-hook (quote post-command-hook) (lambda nil (unless (current-message) (let* (... ...) (when note ...)))) t t)) ((equal org-keys "L") (unless (derived-mode-p (quote org-mode)) (error "This is not an Org-mode file")) (unless restriction (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (org-call-with-arg (quote org-timeline) arg))) ((equal org-keys "#") (call-interactively (quote org-agenda-list-stuck-projects))) ((equal org-keys "/") (call-interactively (quote org-occur-in-agenda-files))) ((equal org-keys "!") (customize-variable (quote org-stuck-projects))) (t (error "Invalid agenda key"))))
  (catch (quote exit) (let* ((prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if (equal (buffer-name) org-agenda-buffer-name) (quote current-window) org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil (mapcar (lambda (x) (cond ... ... ... ...)) org-agenda-custom-commands))) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (buf (current-buffer)) (bfn (buffer-file-name (buffer-base-buffer))) entry key type org-match lprops ans) (unless org-agenda-overriding-restriction (unless (org-bound-and-true-p org-agenda-keep-restricted-file-list) (put (quote org-agenda-files) (quote org-restrict) nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-command) (quote org-lprops) nil) (put (quote org-agenda-redo-command) (quote last-args) nil) (setq org-agenda-last-dispatch-buffer (current-buffer)) (unless org-keys (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) org-keys (car ans) restriction (cdr ans))) (if org-agenda-sticky (setq org-agenda-buffer-name (format "*Org Agenda(%s)*" org-keys))) (when (and (not org-agenda-overriding-restriction) restriction) (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (cond ((eq restriction (quote region)) (setq org-agenda-restrict t) (move-marker org-agenda-restrict-begin (region-beginning)) (move-marker org-agenda-restrict-end (region-end))) ((eq restriction (quote subtree)) (save-excursion (setq org-agenda-restrict t) (org-back-to-heading t) (move-marker org-agenda-restrict-begin (point)) (move-marker org-agenda-restrict-end (progn ...)))))) (cond ((setq entry (assoc org-keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (setq type (nth 2 entry) org-match (eval ...) lprops (nth 4 entry)) (if org-agenda-sticky (setq org-agenda-buffer-name ...)) (put (quote org-agenda-redo-command) (quote org-lprops) lprops) (cond (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ... ...) (... ... ...) (... ... ...) (... ...) (... ...) (t ...))) (org-agenda-run-series (nth 1 entry) (cddr entry)))) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable (quote org-agenda-custom-commands))) ((equal org-keys "a") (call-interactively (quote org-agenda-list))) ((equal org-keys "s") (call-interactively (quote org-search-view))) ((equal org-keys "S") (org-call-with-arg (quote org-search-view) (or arg (quote (4))))) ((equal org-keys "t") (call-interactively (quote org-todo-list))) ((equal org-keys "T") (org-call-with-arg (quote org-todo-list) (or arg (quote (4))))) ((equal org-keys "m") (call-interactively (quote org-tags-view))) ((equal org-keys "M") (org-call-with-arg (quote org-tags-view) (or arg (quote (4))))) ((equal org-keys "e") (call-interactively (quote org-store-agenda-views))) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (org-add-hook (quote post-command-hook) (lambda nil (unless (current-message) (let* ... ...))) t t)) ((equal org-keys "L") (unless (derived-mode-p (quote org-mode)) (error "This is not an Org-mode file")) (unless restriction (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (org-call-with-arg (quote org-timeline) arg))) ((equal org-keys "#") (call-interactively (quote org-agenda-list-stuck-projects))) ((equal org-keys "/") (call-interactively (quote org-occur-in-agenda-files))) ((equal org-keys "!") (customize-variable (quote org-stuck-projects))) (t (error "Invalid agenda key")))))
  org-agenda(nil)
  call-interactively(org-agenda t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)


Note: following the same procedure except without loading the min-org.el
file:
org version 7.8.11

The search works as expected.

Thanks for any help.

Alan

-- 
Alan L Tyree           http://www2.austlii.edu.au/~alan
Tel:  04 2748 6206     sip:172385@iptel.org

  reply	other threads:[~2013-01-18  5:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18  0:06 Alan L Tyree
2013-01-18  4:07 ` Nick Dokos
2013-01-18  5:07   ` Alan L Tyree [this message]
2013-01-18 13:39     ` Nick Dokos
2013-01-18 19:54       ` Alan L Tyree

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=8738xzgjuu.fsf@breezy.my.home \
    --to=alantyree@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    --subject='Re: Agenda search C-c a s' \
    /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

Code repositories for project(s) associated with this 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).