From mboxrd@z Thu Jan 1 00:00:00 1970 From: netty hacky Subject: % (org-agenda-bulk-mark-regexp) in agenda view problems Date: Sat, 1 Oct 2011 00:38:14 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016364c7db11cb45d04ae37d36a Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9u9K-0006pn-1t for emacs-orgmode@gnu.org; Sat, 01 Oct 2011 03:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9u9I-00009p-Rw for emacs-orgmode@gnu.org; Sat, 01 Oct 2011 03:38:18 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:40120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9u9I-00009i-NO for emacs-orgmode@gnu.org; Sat, 01 Oct 2011 03:38:16 -0400 Received: by eye13 with SMTP id 13so1883687eye.0 for ; Sat, 01 Oct 2011 00:38:15 -0700 (PDT) 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Guerry Cc: emacs-orgmode@gnu.org --0016364c7db11cb45d04ae37d36a Content-Type: text/plain; charset=ISO-8859-1 Hi Bastien, I'm having two problems with the % command (org-agenda-bulk-mark-regexp) in Org-mode agenda view. 1. If I use "." as the search string, I get "Wrong type argument: number-or-marker-p, nil". And my workaround is to change the line "(let (entries-marked)" in org-agenda.el to "(let ((entries-marked 0))". 2. If I use ".*" as the search string, I get "Wrong type argument: stringp, nil". After some edebugging, I found the reason is that in org-agenda-bulk-mark-regexp, re-search-forward moved the point to the end of the line (since ".*" matches the whole line), causing (get-text-property (point) 'txt) to return nil, in turn caused string-match to throw the error. I think this may happen to other regexps, as long as the strings matched include the last character in the line. I'm new to Emacs Lisp so I'm not sure how to fix this one. Wondering why it seems only me having these two problems. I am using MacPorts' Emacs and Org-mode: Emacs : GNU Emacs 23.3.1 (x86_64-apple-darwin10.8.0) Package: Org-mode version 7.7 Thanks, Net --0016364c7db11cb45d04ae37d36a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Bastien,

I'm having two problems with the % command (org-agen= da-bulk-mark-regexp) in Org-mode agenda view.

1.=A0 If I use ".= " as the search string, I get "Wrong type argument: number-or-mar= ker-p, nil".=A0 And my workaround is to change the line "(let (en= tries-marked)" in org-agenda.el to "(let ((entries-marked 0))&quo= t;.

2. If I use ".*" as the search string, I get "Wrong type= argument: stringp, nil".=A0 After some edebugging, I found the reason= is that in org-agenda-bulk-mark-regexp, re-search-forward moved the point = to the end of the line (since ".*" matches the whole line), causi= ng (get-text-property (point) 'txt) to return nil, in turn caused strin= g-match to throw the error.=A0 I think this may happen to other regexps, as= long as the strings matched include the last character in the line.=A0 I&#= 39;m new to Emacs Lisp so I'm not sure how to fix this one.

Wondering why it seems only me having these two problems.

I am u= sing MacPorts' Emacs and Org-mode:
Emacs=A0 : GNU Emacs 23.3.1 (x86_= 64-apple-darwin10.8.0)
Package: Org-mode version 7.7

Thanks,
Net

--0016364c7db11cb45d04ae37d36a--