From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Re: Agenda: How to bulk mark regex w/spaces? Date: Wed, 12 Feb 2020 11:51:27 -0600 Message-ID: References: <877e0sso8g.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d14fe3059e649f6f" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46692) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1wAp-0008OO-K6 for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 12:51:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1wAo-0002U9-34 for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 12:51:43 -0500 In-Reply-To: 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Bastien Cc: emacs-orgmode --000000000000d14fe3059e649f6f Content-Type: text/plain; charset="UTF-8" Whoops sorry wanted to reference the source code: https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-agenda.el#L10147 I think that the problem is the call to org-agenda-bulk-mark on line 10160 (it doesn't mark if the point is at the EOL) https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-agenda.el#L10160 On Wed, Feb 12, 2020 at 11:49 AM Nathan Neff wrote: > Hi Bastien, > > I'm using emacs -u NONE with emacs 27.0.50 > and Org mode version 9.2.5 > > And I'm not seeing this expected behavior. > > I have the following simple foo.org file for my agenda: > * TODO Foo > * TODO Pre Class > * TODO Again > > I'm using the built-in agenda view for TODO entries ("t") > and I'm searching using > > Pre\sClass > {Pre\sClass} > Pre Class > "Pre Class" > > And the entry is not *marked* in the agenda, but there are messages > saying "1 entries marked for bulk action" > > If I search for "Pre Clas" and "Pre\sCl" etc. the entries are marked. > > If I search for "Class" (no quotes) then there's no match. However, if I > search for "Cla" (no quotes) then there is a match and the heading is > marked. > > So, it appears there's a problem *if the match ends on the last character > of the heading*. > > In fact, I can replicate the problem by searching in the agenda manually > by searching for "Class" > (no quotes) :) and then calling (call-interactively 'org-agenda-bulk-mark) > - the mark is not made and > there's a message "user-error: Nothing to mark at point" > > Not sure how to fix it but wanted to show my awesome debugging skills :))) > > Thanks, > --Nate > > Thanks, > --Nate > > > > On Tue, Feb 11, 2020 at 5:22 PM Bastien wrote: > >> Hi Nathan, >> >> Nathan Neff writes: >> >> > I'm trying to use org-agenda-bulk-mark-regexp and trying to search >> > for >> > headings having "Pre Class". >> > >> > None of the combinations have worked so far (I've tried with quotes >> > and without quotes in the prompt) >> >> There is nothing special with the regexps you need to enter with >> `org-agenda-bulk-mark-regexp', you can use the same syntax you would >> use for, e.g., C-u C-s in Emacs. >> >> Note that only the text of the headline is considered, not part of >> the agenda line that are not the heading itself (e.g. todo keywords, >> tags, etc.) >> >> > Pre Class >> >> should work >> >> > Pre\sClass >> >> => Pre\s-Class should work >> >> > Pre\\sClass >> >> nope >> >> > Pre.*Class >> >> should work >> >> > {Pre Class} >> >> nope. >> >> HTH, >> >> -- >> Bastien >> > --000000000000d14fe3059e649f6f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Whoops sorry wanted to r= eference the source code:

=
I think that the problem is the call to org-agenda-bulk-mark= on line 10160 (it doesn't mark

On Wed, Feb 12, 2020 at 11:49= AM Nathan Neff <nathan.neff@gm= ail.com> wrote:
Hi Bastien,

I'm using emacs -u NONE with em= acs 27.0.50
and Org mode version 9.2.5

A= nd I'm not seeing this expected behavior.

I ha= ve the following simple foo.or= g file for my agenda:
* TODO Foo
* TODO Pre Class
* TODO Again

I'm using the built-in a= genda view for TODO entries ("t")
and I'm searching= using

Pre\sClass
{Pre\sClass}
Pre Class
"Pre Class"

And the= entry is not *marked* in the agenda, but there are messages=C2=A0
saying "1 entries marked for bulk action"

<= div>If I search for "Pre Clas" and "Pre\sCl" etc. the e= ntries are marked.

If I search for "Class&quo= t; (no quotes) then there's no match.=C2=A0 However, if I=C2=A0
search for "Cla" (no quotes) then there is a match and the hea= ding is marked.

So, it appears there's a probl= em *if the match ends on the last character of the heading*.

=
In fact, I can replicate the problem by searching in the agenda = manually by searching for "Class"
(no quotes) :) and th= en calling (call-interactively 'org-agenda-bulk-mark) - the mark is not= made and
there's a message "user-error: Nothing to mark= at point"

Not sure how to fix it but wanted = to show my awesome debugging skills :)))

Thanks,
--Nate

Thanks,
--Nat= e



On Tue, Feb 11, 2020 at 5:22 PM = Bastien <bzg@gnu.org> wrote:
Hi Nathan,

Nathan Neff <
= nathan.neff@gmail.com> writes:

> I'm trying to use org-agenda-bulk-mark-regexp and trying to search=
> for
> headings having "Pre Class".
>
> None of the combinations have worked so far (I've tried with quote= s
> and without quotes in the prompt)

There is nothing special with the regexps you need to enter with
`org-agenda-bulk-mark-regexp', you can use the same syntax you would use for, e.g., C-u C-s in Emacs.

Note that only the text of the headline is considered, not part of
the agenda line that are not the heading itself (e.g. todo keywords,
tags, etc.)

> Pre Class

should work

> Pre\sClass

=3D> Pre\s-Class should work

> Pre\\sClass

nope

> Pre.*Class

should work

> {Pre Class}

nope.

HTH,

--
=C2=A0Bastien
--000000000000d14fe3059e649f6f--