From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel Martins" Subject: Re: org-mode and remind integration Date: Sun, 11 Jan 2009 18:19:20 -0200 Message-ID: <6ac505ad0901111219k14af64fevd74608b6a806d813@mail.gmail.com> References: <6ac505ad0812310353yedc8ac6x4e59dc377a6d009b@mail.gmail.com> <368A47AA-30D5-40B0-9ECD-57B0361B89AA@uva.nl> <6ac505ad0901090057x40d163edr1366a45fb08ed405@mail.gmail.com> <87d4ew5yse.fsf@rat.lan> <6ac505ad0901100521n7562cc33y942b3bf131621fd4@mail.gmail.com> <87wsd2508n.fsf@rat.lan> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1367085860==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LM6mK-0001Bf-GS for emacs-orgmode@gnu.org; Sun, 11 Jan 2009 15:19:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LM6mJ-0001Ab-R9 for Emacs-orgmode@gnu.org; Sun, 11 Jan 2009 15:19:24 -0500 Received: from [199.232.76.173] (port=36451 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LM6mJ-0001AG-I5 for Emacs-orgmode@gnu.org; Sun, 11 Jan 2009 15:19:23 -0500 Received: from rv-out-0708.google.com ([209.85.198.245]:27627) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LM6mI-0002Kq-VK for Emacs-orgmode@gnu.org; Sun, 11 Jan 2009 15:19:23 -0500 Received: by rv-out-0708.google.com with SMTP id k29so12480615rvb.6 for ; Sun, 11 Jan 2009 12:19:20 -0800 (PST) In-Reply-To: <87wsd2508n.fsf@rat.lan> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Olaf Dietsche Cc: bastien.guerry@ens.fr, Emacs-orgmode@gnu.org --===============1367085860== Content-Type: multipart/alternative; boundary="----=_Part_220897_32183144.1231705160759" ------=_Part_220897_32183144.1231705160759 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I did your test wuth a null regexp It is a regexp problem! Org-mode has two variables: org-deadline-string and org-scheduled-string (see below) and I want to match tasks which have a timestamp, ie satisfies the org-ts-regexp2 BUT DO NOT have org-deadline-string NOR org-scheduled-string I tried (org2rem-pure-timestamps-string (concat "\\(" org-deadline-string "\\|" org-scheduled-string "\\)\\{0\\}")) in order that a regexp such as "\\(org-deadline-string\\|org-scheduled-string\\)\\{0\\}" would match only zero {0} occurrences of (org-deadline-string|org-scheduled-string) but this seems to be a mistake. Any hint?? Daniel --- Details --- org-deadline-string is a variable defined in `org.el'. Its value is "DEADLINE:" org-scheduled-string is a variable defined in `org.el'. Its value is "SCHEDULED:" org-ts-regexp2 is a variable defined in `org.el'. Its value is "<\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) +\\([^]-+0-9> \n ]*\\)\\( \\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)[^>\n]\\{0,16\\}>" Documentation: Regular expression matching time stamps, with groups. 2009/1/10 Olaf Dietsche > > Hi Daniel, > > "Daniel Martins" writes: > > > Me, as an ex-Fortran77 programmer, am suffering a lot with emacs lisp. > > With time, it'll get better. > > > After o couple of hours trying to catch all timestamps outside SCHEDULE: > and > > DEADLINE: lines I gave up and ask for help > [...] > > I tried to catch all timestamps outside SCHEDULE: and DEADLINE: > > using something like > > > > (org2rem-pure-timestamps-reminders > > (org2rem-list-reminders > > (concat "\\(" org-deadline-string "\\|" > > org-scheduled-string "\\)\\{0\\}"))) > > > [...] > > I tried first to create a local variable > > > > ;;; (org2rem-pure-timestamps-string > > ;;; (concat "\\(" org-deadline-string "\\|" > > ;;; org-scheduled-string "\\)\\{0\\}")) > > > > ;;; (org2rem-pure-timestamps-reminders > > ;;; (org2rem-list-reminders org2rem-pure-timestamps-string) > > ;;; ) > > > > but it did not work either. > > > > I am probably having > > > > Any help for this stupid doubt? > > I don't think, this is a question of a local variable vs. inlining the > regexp. It's more a matter of an appropriate regular expression. Did > you try an empty string instead? > > e.g.: (org2rem-pure-timestamps-reminders (org2rem-list-reminders "")) > > Or did I miss your problem completely? > > Regards, Olaf > ------=_Part_220897_32183144.1231705160759 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I did your test wuth a null regexp

It is a regexp problem!



Org-mode has two variables: org-deadline-string and org-scheduled-string (see below)

and I want to match tasks which have a timestamp, ie satisfies the org-ts-regexp2

BUT DO NOT  have org-deadline-string NOR org-scheduled-string

I tried


    (org2rem-pure-timestamps-string
          (concat  "\\(" org-deadline-string "\\|"
               org-scheduled-string  "\\)\\{0\\}"))


in order that a regexp such as

"\\(org-deadline-string\\|org-scheduled-string\\)\\{0\\}"

would match only zero {0} occurrences of (org-deadline-string|org-scheduled-string)
but this seems to be a mistake.

Any hint??

Daniel





--- Details ---

org-deadline-string is a variable defined in `org.el'.
Its value is "DEADLINE:"


org-scheduled-string is a variable defined in `org.el'.
Its value is "SCHEDULED:"


org-ts-regexp2 is a variable defined in `org.el'.
Its value is
"<\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) +\\([^]-+0-9> \n ]*\\)\\( \\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)[^>\n]\\{0,16\\}>"

Documentation:
Regular expression matching time stamps, with groups.










2009/1/10 Olaf Dietsche <olaf+list.orgmode@olafdietsche.de>
Hi Daniel,

"Daniel Martins" <danielemc@gmail.com> writes:

> Me, as an ex-Fortran77 programmer, am suffering a lot with emacs lisp.

With time, it'll get better.

> After o couple of hours trying to catch all timestamps outside SCHEDULE: and
> DEADLINE: lines I gave up and ask for help
[...]
> I tried to catch all timestamps outside SCHEDULE: and DEADLINE:
> using something like
>
>     (org2rem-pure-timestamps-reminders
>      (org2rem-list-reminders
>           (concat  "\\(" org-deadline-string "\\|"
>                org-scheduled-string  "\\)\\{0\\}")))
>
[...]
> I tried first to create a local variable
>
> ;;;     (org2rem-pure-timestamps-string
> ;;;           (concat  "\\(" org-deadline-string "\\|"
> ;;;                org-scheduled-string  "\\)\\{0\\}"))
>
> ;;;     (org2rem-pure-timestamps-reminders
> ;;;      (org2rem-list-reminders org2rem-pure-timestamps-string)
> ;;;      )
>
> but it did not work either.
>
> I am probably having
>
> Any help for this stupid doubt?

I don't think, this is a question of a local variable vs. inlining the
regexp. It's more a matter of an appropriate regular expression. Did
you try an empty string instead?

e.g.: (org2rem-pure-timestamps-reminders (org2rem-list-reminders ""))

Or did I miss your problem completely?

Regards, Olaf

------=_Part_220897_32183144.1231705160759-- --===============1367085860== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1367085860==--