emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Making the output of %% functions linkable in agenda views
@ 2011-04-07 20:52 Sebold, Charles
  2011-05-03 16:59 ` charles.sebold
  0 siblings, 1 reply; 15+ messages in thread
From: Sebold, Charles @ 2011-04-07 20:52 UTC (permalink / raw)
  To: emacs-orgmode

Here's a test.  Take the line below and put it in an agenda file, then
view the agenda.

%%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))

The results as I see them give me a link that I can mouse-click on, but
I can't move point to it and hit C-c C-o.

What do I need to do to make this a normal org link in every way?  Or is
this a bug?

(Obviously this is just a demo problem, I'm doing something much more
hideously complicated in real life, but this was good enough to share to
show what the problem was.)
-- 
Charles Sebold
Information Technology
The Lutheran Church – Missouri Synod
(314) 996-1891

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Making the output of %% functions linkable in agenda views
  2011-04-07 20:52 Making the output of %% functions linkable in agenda views Sebold, Charles
@ 2011-05-03 16:59 ` charles.sebold
  2011-05-03 17:28   ` Nick Dokos
  2011-05-03 19:56   ` Matt Lundin
  0 siblings, 2 replies; 15+ messages in thread
From: charles.sebold @ 2011-05-03 16:59 UTC (permalink / raw)
  To: Sebold, Charles; +Cc: emacs-orgmode

On 7 Apr 2011, Charles Sebold wrote:

> Here's a test.  Take the line below and put it in an agenda file, then
> view the agenda.
>
> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>
> The results as I see them give me a link that I can mouse-click on,
> but I can't move point to it and hit C-c C-o.
>
> What do I need to do to make this a normal org link in every way?  Or
> is this a bug?
>
> (Obviously this is just a demo problem, I'm doing something much more
> hideously complicated in real life, but this was good enough to share
> to show what the problem was.)

*bump*

Anybody care to take this on?
-- 
Charles Sebold                                          3rd of May, 2011
GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) | No Gnus v0.18 | org-mode 7.5
 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Making the output of %% functions linkable in agenda views
  2011-05-03 16:59 ` charles.sebold
@ 2011-05-03 17:28   ` Nick Dokos
  2011-05-03 19:56   ` Matt Lundin
  1 sibling, 0 replies; 15+ messages in thread
From: Nick Dokos @ 2011-05-03 17:28 UTC (permalink / raw)
  To: charles.sebold; +Cc: nicholas.dokos, emacs-orgmode

charles.sebold@lcms.org wrote:

> On 7 Apr 2011, Charles Sebold wrote:
> 
> > Here's a test.  Take the line below and put it in an agenda file, then
> > view the agenda.
> >
> > %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
> >
> > The results as I see them give me a link that I can mouse-click on,
> > but I can't move point to it and hit C-c C-o.
> >
> > What do I need to do to make this a normal org link in every way?  Or
> > is this a bug?
> >
> > (Obviously this is just a demo problem, I'm doing something much more
> > hideously complicated in real life, but this was good enough to share
> > to show what the problem was.)
> 

Well, this feels like a bug: when I C-c C-o on it, it says "No links",
but if I press <RET> to go to the agenda file and then C-x k to kill the
buffer, and then do C-c C-o again I get the "Execute (info) as elisp?"
prompt (and if I say yes, it does indeed open Info). So there is
something funky going on, but I'm not sure what.

Nick

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Making the output of %% functions linkable in agenda views
  2011-05-03 16:59 ` charles.sebold
  2011-05-03 17:28   ` Nick Dokos
@ 2011-05-03 19:56   ` Matt Lundin
  2011-05-03 20:04     ` Sebold, Charles
  2011-05-04  7:43     ` [Accepted] " Carsten Dominik
  1 sibling, 2 replies; 15+ messages in thread
From: Matt Lundin @ 2011-05-03 19:56 UTC (permalink / raw)
  To: Sebold, Charles; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

charles.sebold@lcms.org writes:

> On 7 Apr 2011, Charles Sebold wrote:
>
>> Here's a test.  Take the line below and put it in an agenda file, then
>> view the agenda.
>>
>> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>>
>> The results as I see them give me a link that I can mouse-click on,
>> but I can't move point to it and hit C-c C-o.
>>
>> What do I need to do to make this a normal org link in every way?  Or
>> is this a bug?
>>

Here's what seems to be going on. 

Clicking with the mouse works because it calls org-open-at-mouse, which
(by calling org-open-at-point) simply looks at the text surrounding the
click point to find a link.

The function org-agenda-open-link, on the other hand, grabs part of the
headline as a string (the prefix), then jumps to the location in the
original buffer and calls org-offer-links-in-entry to look for links in
both the entry and the prefix of agenda text. Obviously, it won't find
your link in the original entry since it looks like this:

%%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))

I think it shouldn't be a problem to pass the whole agenda line to
org-offer-links-in-entry. This will not result in duplicate links, since
org-offer-links-in-entry "uniquifies" the links.

I've attached a patch.

The bigger question, however, is why the expression above is even
showing up in the agenda, since it contains no scheduling information.
:)

Best,
Matt


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Pass-entire-text-of-agenda-line-to-org-offer-links-i.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]

From 58c7621c0c84b9c1930098a098e4559aa516eec0 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Tue, 3 May 2011 15:54:35 -0400
Subject: [PATCH] Pass entire text of agenda line to org-offer-links-in-entry.

* lisp/org-agenda.el (org-agenda-open-link): Pass entire text of
  agenda line to org-offer-links-in-entry.

This fixes bug noticed by Charles Sebold, in which links that are
dynamically formatted for the agenda view are ignored.
http://permalink.gmane.org/gmane.emacs.orgmode/40673
---
 lisp/org-agenda.el |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 65f7cea..609edd4 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6879,9 +6879,7 @@ at the text of the entry itself."
 		     (org-get-at-bol 'org-marker)))
 	 (buffer (and marker (marker-buffer marker)))
 	 (prefix (buffer-substring
-		  (point-at-bol)
-		  (or (text-property-any (point-at-bol) (point-at-eol) 'org-heading t)
-		      (point-at-bol)))))
+		  (point-at-bol) (point-at-eol))))
     (cond
      (buffer
       (with-current-buffer buffer
-- 
1.7.5


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Making the output of %% functions linkable in agenda views
  2011-05-03 19:56   ` Matt Lundin
@ 2011-05-03 20:04     ` Sebold, Charles
  2011-05-03 20:09       ` Matt Lundin
  2011-05-04  7:43     ` [Accepted] " Carsten Dominik
  1 sibling, 1 reply; 15+ messages in thread
From: Sebold, Charles @ 2011-05-03 20:04 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Sebold, Charles, emacs-orgmode

On 3 May 2011, Matt Lundin wrote:

> The bigger question, however, is why the expression above is even
> showing up in the agenda, since it contains no scheduling information.
> :)

Hm.  I didn't think about whether anybody else could see it, come to
think of it; my real problem (for which this was just a mock-up) shows
up in a heavily customized agenda I set up, which isn't schedule-based.
-- 
Charles Sebold                                          3rd of May, 2011
              GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
     No Gnus v0.18 | Org-mode version 7.5 (release_7.5.246.ga35b4)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Making the output of %% functions linkable in agenda views
  2011-05-03 20:04     ` Sebold, Charles
@ 2011-05-03 20:09       ` Matt Lundin
  2011-05-03 20:17         ` Sebold, Charles
  2011-05-03 20:28         ` Nick Dokos
  0 siblings, 2 replies; 15+ messages in thread
From: Matt Lundin @ 2011-05-03 20:09 UTC (permalink / raw)
  To: Sebold, Charles; +Cc: emacs-orgmode

Charles.Sebold@lcms.org (Sebold, Charles) writes:

> On 3 May 2011, Matt Lundin wrote:
>
>> The bigger question, however, is why the expression above is even
>> showing up in the agenda, since it contains no scheduling information.
>> :)
>
> Hm.  I didn't think about whether anybody else could see it, come to
> think of it; my real problem (for which this was just a mock-up) shows
> up in a heavily customized agenda I set up, which isn't schedule-based.

I should clarify. I, too, can see the link in the agenda. I had been
under the impression that only diary sexps will appear in the agenda,
but it seems that a generic sexp that returns a string will also show
up.

I'm not sure whether this is a feature or a bug.

Best,
Matt

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Making the output of %% functions linkable in agenda views
  2011-05-03 20:09       ` Matt Lundin
@ 2011-05-03 20:17         ` Sebold, Charles
  2011-05-03 20:28         ` Nick Dokos
  1 sibling, 0 replies; 15+ messages in thread
From: Sebold, Charles @ 2011-05-03 20:17 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Sebold, Charles, emacs-orgmode

On 3 May 2011, Matt Lundin wrote:

> I should clarify. I, too, can see the link in the agenda. I had been
> under the impression that only diary sexps will appear in the agenda,
> but it seems that a generic sexp that returns a string will also show
> up.
>
> I'm not sure whether this is a feature or a bug.

OK, I see now.  I built this based on the behavior of google-weather-el,
which includes a function for inclusion in agendas.

I think it's a feature; in my (real-world) case, my function runs based
on the value of the local variable `date' (apparently set when the
agenda is built) and provides a correspondingly different result for
every day's agenda.  That is legitimately useful.  Google-weather-el
works the same way.  See:

(info "(org)Weekly/daily agenda")

...for examples of org-mode itself using this (e.g., for
org-calendar-holiday, org-bbdb-anniversary, etc.).
-- 
Charles Sebold                                          3rd of May, 2011
              GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
     No Gnus v0.18 | Org-mode version 7.5 (release_7.5.246.ga35b4)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Making the output of %% functions linkable in agenda views
  2011-05-03 20:09       ` Matt Lundin
  2011-05-03 20:17         ` Sebold, Charles
@ 2011-05-03 20:28         ` Nick Dokos
  2011-05-03 20:47           ` Matt Lundin
  1 sibling, 1 reply; 15+ messages in thread
From: Nick Dokos @ 2011-05-03 20:28 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Sebold, Charles, nicholas.dokos, emacs-orgmode

Matt Lundin <mdl@imapmail.org> wrote:


> I should clarify. I, too, can see the link in the agenda. I had been
> under the impression that only diary sexps will appear in the agenda,
> but it seems that a generic sexp that returns a string will also show
> up.
> 
> I'm not sure whether this is a feature or a bug.
> 

I *think* it's a feature but I'm really not sure: the regexp is just
"^&?%%(" so it does not seem to care what comes after it. Various things
(like the sunrise/sunset hacks) use it, so if it is deemed to be a
bug-to-be-fixed, they will break when it *is* fixed :-)

So is a diary sexp just something that matches "^&?%%( *diary" ?

Nick

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Making the output of %% functions linkable in agenda views
  2011-05-03 20:28         ` Nick Dokos
@ 2011-05-03 20:47           ` Matt Lundin
  0 siblings, 0 replies; 15+ messages in thread
From: Matt Lundin @ 2011-05-03 20:47 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Sebold, Charles, emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:

> Matt Lundin <mdl@imapmail.org> wrote:
>
>
>> I should clarify. I, too, can see the link in the agenda. I had been
>> under the impression that only diary sexps will appear in the agenda,
>> but it seems that a generic sexp that returns a string will also show
>> up.
>> 
>> I'm not sure whether this is a feature or a bug.
>> 
>
> I *think* it's a feature but I'm really not sure: the regexp is just
> "^&?%%(" so it does not seem to care what comes after it. Various things
> (like the sunrise/sunset hacks) use it, so if it is deemed to be a
> bug-to-be-fixed, they will break when it *is* fixed :-)

Thanks! Yes this indeed a feature. I just wanted to make sure I wasn't
sending a patch that enhanced a bug. :)

Best,
Matt

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Accepted] Making the output of %% functions linkable in agenda views
  2011-05-03 19:56   ` Matt Lundin
  2011-05-03 20:04     ` Sebold, Charles
@ 2011-05-04  7:43     ` Carsten Dominik
  2011-05-06  7:49       ` Bert Burgemeister
  1 sibling, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2011-05-04  7:43 UTC (permalink / raw)
  To: emacs-orgmode

Patch 781 (http://patchwork.newartisans.com/patch/781/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C87aaf3tv5l.fsf%40fastmail.fm%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Making the output of %% functions linkable in agenda views
> Date: Wed, 04 May 2011 00:56:54 -0000
> From: Matt Lundin <mdl@imapmail.org>
> X-Patchwork-Id: 781
> Message-Id: <87aaf3tv5l.fsf@fastmail.fm>
> To: Charles.Sebold@lcms.org (Sebold, Charles)
> Cc: emacs-orgmode <emacs-orgmode@gnu.org>
> 
> charles.sebold@lcms.org writes:
> 
> > On 7 Apr 2011, Charles Sebold wrote:
> >
> >> Here's a test.  Take the line below and put it in an agenda file, then
> >> view the agenda.
> >>
> >> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
> >>
> >> The results as I see them give me a link that I can mouse-click on,
> >> but I can't move point to it and hit C-c C-o.
> >>
> >> What do I need to do to make this a normal org link in every way?  Or
> >> is this a bug?
> >>
> 
> Here's what seems to be going on. 
> 
> Clicking with the mouse works because it calls org-open-at-mouse, which
> (by calling org-open-at-point) simply looks at the text surrounding the
> click point to find a link.
> 
> The function org-agenda-open-link, on the other hand, grabs part of the
> headline as a string (the prefix), then jumps to the location in the
> original buffer and calls org-offer-links-in-entry to look for links in
> both the entry and the prefix of agenda text. Obviously, it won't find
> your link in the original entry since it looks like this:
> 
> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
> 
> I think it shouldn't be a problem to pass the whole agenda line to
> org-offer-links-in-entry. This will not result in duplicate links, since
> org-offer-links-in-entry "uniquifies" the links.
> 
> I've attached a patch.
> 
> The bigger question, however, is why the expression above is even
> showing up in the agenda, since it contains no scheduling information.
> :)
> 
> Best,
> Matt
> 
> 
> >From 58c7621c0c84b9c1930098a098e4559aa516eec0 Mon Sep 17 00:00:00 2001
> From: Matt Lundin <mdl@imapmail.org>
> Date: Tue, 3 May 2011 15:54:35 -0400
> Subject: [PATCH] Pass entire text of agenda line to org-offer-links-in-entry.
> 
> * lisp/org-agenda.el (org-agenda-open-link): Pass entire text of
>   agenda line to org-offer-links-in-entry.
> 
> This fixes bug noticed by Charles Sebold, in which links that are
> dynamically formatted for the agenda view are ignored.
> http://permalink.gmane.org/gmane.emacs.orgmode/40673
> ---
>  lisp/org-agenda.el |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 65f7cea..609edd4 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6879,9 +6879,7 @@ at the text of the entry itself."
>  		     (org-get-at-bol 'org-marker)))
>  	 (buffer (and marker (marker-buffer marker)))
>  	 (prefix (buffer-substring
> -		  (point-at-bol)
> -		  (or (text-property-any (point-at-bol) (point-at-eol) 'org-heading t)
> -		      (point-at-bol)))))
> +		  (point-at-bol) (point-at-eol))))
>      (cond
>       (buffer
>        (with-current-buffer buffer
> -- 
> 1.7.5
> 
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Accepted] Making the output of %% functions linkable in agenda views
  2011-05-04  7:43     ` [Accepted] " Carsten Dominik
@ 2011-05-06  7:49       ` Bert Burgemeister
  2011-05-06 11:47         ` Matt Lundin
  0 siblings, 1 reply; 15+ messages in thread
From: Bert Burgemeister @ 2011-05-06  7:49 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <cdominik@newartisans.com> writes:

> Patch 781 (http://patchwork.newartisans.com/patch/781/) is now "Accepted".
>
> Maintainer comment: none
>
> This relates to the following submission:
>
> http://mid.gmane.org/%3C87aaf3tv5l.fsf%40fastmail.fm%3E
>
> Here is the original message containing the patch:
>
>> Content-Type: text/plain; charset="utf-8"
>> MIME-Version: 1.0
>> Content-Transfer-Encoding: 7bit
>> Subject: [O] Making the output of %% functions linkable in agenda views
>> Date: Wed, 04 May 2011 00:56:54 -0000
>> From: Matt Lundin <mdl@imapmail.org>
>> X-Patchwork-Id: 781
>> Message-Id: <87aaf3tv5l.fsf@fastmail.fm>
>> To: Charles.Sebold@lcms.org (Sebold, Charles)
>> Cc: emacs-orgmode <emacs-orgmode@gnu.org>
>> 
>> charles.sebold@lcms.org writes:
>> 
>> > On 7 Apr 2011, Charles Sebold wrote:
>> >
>> >> Here's a test.  Take the line below and put it in an agenda file, then
>> >> view the agenda.
>> >>
>> >> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>> >>
>> >> The results as I see them give me a link that I can mouse-click on,
>> >> but I can't move point to it and hit C-c C-o.
>> >>
>> >> What do I need to do to make this a normal org link in every way?  Or
>> >> is this a bug?
>> >>
>> 
>> Here's what seems to be going on. 
>> 
>> Clicking with the mouse works because it calls org-open-at-mouse, which
>> (by calling org-open-at-point) simply looks at the text surrounding the
>> click point to find a link.
>> 
>> The function org-agenda-open-link, on the other hand, grabs part of the
>> headline as a string (the prefix), then jumps to the location in the
>> original buffer and calls org-offer-links-in-entry to look for links in
>> both the entry and the prefix of agenda text. Obviously, it won't find
>> your link in the original entry since it looks like this:
>> 
>> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>> 
>> I think it shouldn't be a problem to pass the whole agenda line to
>> org-offer-links-in-entry. This will not result in duplicate links, since
>> org-offer-links-in-entry "uniquifies" the links.
>> 
>> I've attached a patch.
>> 
>> The bigger question, however, is why the expression above is even
>> showing up in the agenda, since it contains no scheduling information.
>> :)
>> 
>> Best,
>> Matt
>> 
>> 
>> >From 58c7621c0c84b9c1930098a098e4559aa516eec0 Mon Sep 17 00:00:00 2001
>> From: Matt Lundin <mdl@imapmail.org>
>> Date: Tue, 3 May 2011 15:54:35 -0400
>> Subject: [PATCH] Pass entire text of agenda line to org-offer-links-in-entry.
>> 
>> * lisp/org-agenda.el (org-agenda-open-link): Pass entire text of
>>   agenda line to org-offer-links-in-entry.
>> 
>> This fixes bug noticed by Charles Sebold, in which links that are
>> dynamically formatted for the agenda view are ignored.
>> http://permalink.gmane.org/gmane.emacs.orgmode/40673
>> ---
>>  lisp/org-agenda.el |    4 +---
>>  1 files changed, 1 insertions(+), 3 deletions(-)
>> 
>> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
>> index 65f7cea..609edd4 100644
>> --- a/lisp/org-agenda.el
>> +++ b/lisp/org-agenda.el
>> @@ -6879,9 +6879,7 @@ at the text of the entry itself."
>>  		     (org-get-at-bol 'org-marker)))
>>  	 (buffer (and marker (marker-buffer marker)))
>>  	 (prefix (buffer-substring
>> -		  (point-at-bol)
>> -		  (or (text-property-any (point-at-bol) (point-at-eol) 'org-heading t)
>> -		      (point-at-bol)))))
>> +		  (point-at-bol) (point-at-eol))))
>>      (cond
>>       (buffer
>>        (with-current-buffer buffer
>> -- 
>> 1.7.5
>> 
>> 
>
>

Just curious, is there anything I should have known that prevented the
patch submitted in http://article.gmane.org/gmane.emacs.orgmode/39313,

> From: Bert Burgemeister <trebbu@googlemail.com>
> Subject: [O] [PATCH] Bugfix: org-agenda-open-link
> Newsgroups: gmane.emacs.orgmode
> To: emacs-orgmode@gnu.org
> Date: Sun, 13 Mar 2011 16:18:44 +0100
> 
> 
> * Org-agenda.el (org-agenda-open-link): C-c C-o didn't open links
> inserted via the `%%( )' mechanism, affecting usability of
> `%%(org-bbdb-anniversaries).
> 
> TINYCHANGE
> ---
> 
> 
> The bug was apparently introduced in commit
> ba1e90893d128d8004e4cb6763af692c5a6cd677.
> 
> -- 
> Bert 
> 
> 
> 
>  lisp/org-agenda.el |   14 +++++++-------
>  1 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 4b4dd68..123668c 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6742,13 +6742,13 @@ at the text of the entry itself."
>  		  (+ (point-at-bol)
>  		     (or (org-get-at-bol 'prefix-length) 0)))))
>      (cond
> -     (buffer
> -      (with-current-buffer buffer
> -	(save-excursion
> -	  (save-restriction
> -	    (widen)
> -	    (goto-char marker)
> -	    (org-offer-links-in-entry arg prefix)))))
> +     ((and buffer
> +	   (with-current-buffer buffer
> +	     (save-excursion
> +	       (save-restriction
> +		 (widen)
> +		 (goto-char marker)
> +		 (org-offer-links-in-entry arg prefix))))))
>       ((or (org-in-regexp (concat "\\(" org-bracket-link-regexp "\\)"))
>  	  (save-excursion
>  	    (beginning-of-line 1)
> -- 
> 1.7.2.3

from being noticed?

-- 
Bert

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Accepted] Making the output of %% functions linkable in agenda views
  2011-05-06  7:49       ` Bert Burgemeister
@ 2011-05-06 11:47         ` Matt Lundin
  2011-05-07 15:20           ` Bert Burgemeister
  0 siblings, 1 reply; 15+ messages in thread
From: Matt Lundin @ 2011-05-06 11:47 UTC (permalink / raw)
  To: Bert Burgemeister; +Cc: emacs-orgmode

Bert Burgemeister <trebbu@googlemail.com> writes:

> Just curious, is there anything I should have known that prevented the
> patch submitted in http://article.gmane.org/gmane.emacs.orgmode/39313,

Is it still in the bugtracker, or was it rejected? (I attempted to check
myself, but the patchwork site seems to be down right now.) 

There has been a cascade of patches on the list recently (I plead guilty
to adding my fair share), and there aren't many people who are
authorized to push to the repo.

With your patch, what would happen if there were two or more links in
the headline?

* Two links
%%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
http://www.orgmode.org

This entry would show up in the agenda as:

  org:      [[elisp:(info)][Link to info]]

But AFAICT, hitting C-c C-o in the agenda-buffer (even on the elisp
link) would jump immediately to http://www.orgmode.org, bypassing the
opportunity to select the the %%(...) generated link.

Best,
Matt

>> From: Bert Burgemeister <trebbu@googlemail.com>
>> Subject: [O] [PATCH] Bugfix: org-agenda-open-link
>> Newsgroups: gmane.emacs.orgmode
>> To: emacs-orgmode@gnu.org
>> Date: Sun, 13 Mar 2011 16:18:44 +0100
>>
>>
>> * Org-agenda.el (org-agenda-open-link): C-c C-o didn't open links
>> inserted via the `%%( )' mechanism, affecting usability of
>> `%%(org-bbdb-anniversaries).
>>
>> TINYCHANGE
>> ---
>>
>>
>> The bug was apparently introduced in commit
>> ba1e90893d128d8004e4cb6763af692c5a6cd677.
>>
>> --
>> Bert
>>
>>
>>
>>  lisp/org-agenda.el |   14 +++++++-------
>>  1 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
>> index 4b4dd68..123668c 100644
>> --- a/lisp/org-agenda.el
>> +++ b/lisp/org-agenda.el
>> @@ -6742,13 +6742,13 @@ at the text of the entry itself."
>>  		  (+ (point-at-bol)
>>  		     (or (org-get-at-bol 'prefix-length) 0)))))
>>      (cond
>> -     (buffer
>> -      (with-current-buffer buffer
>> -	(save-excursion
>> -	  (save-restriction
>> -	    (widen)
>> -	    (goto-char marker)
>> -	    (org-offer-links-in-entry arg prefix)))))
>> +     ((and buffer
>> +	   (with-current-buffer buffer
>> +	     (save-excursion
>> +	       (save-restriction
>> +		 (widen)
>> +		 (goto-char marker)
>> +		 (org-offer-links-in-entry arg prefix))))))
>>       ((or (org-in-regexp (concat "\\(" org-bracket-link-regexp "\\)"))
>>  	  (save-excursion
>>  	    (beginning-of-line 1)
>> --
>> 1.7.2.3
>
> from being noticed?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Accepted] Making the output of %% functions linkable in agenda views
  2011-05-06 11:47         ` Matt Lundin
@ 2011-05-07 15:20           ` Bert Burgemeister
  2011-05-08 20:23             ` Carsten Dominik
  0 siblings, 1 reply; 15+ messages in thread
From: Bert Burgemeister @ 2011-05-07 15:20 UTC (permalink / raw)
  To: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> Bert Burgemeister <trebbu@googlemail.com> writes:
>
>> Just curious, is there anything I should have known that prevented the
>> patch submitted in http://article.gmane.org/gmane.emacs.orgmode/39313,
>
> Is it still in the bugtracker, or was it rejected?

Yes, and no.

> With your patch, what would happen if there were two or more links in
> the headline?
>
> * Two links
> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
> http://www.orgmode.org
>
> This entry would show up in the agenda as:
>
>   org:      [[elisp:(info)][Link to info]]
>
> But AFAICT, hitting C-c C-o in the agenda-buffer (even on the elisp
> link) would jump immediately to http://www.orgmode.org, bypassing the
> opportunity to select the the %%(...) generated link.

That's true and your patch reduces org-mode's LOC, so you win.

-- 
Bert

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Accepted] Making the output of %% functions linkable in agenda views
  2011-05-07 15:20           ` Bert Burgemeister
@ 2011-05-08 20:23             ` Carsten Dominik
  2011-05-10  7:57               ` Bert Burgemeister
  0 siblings, 1 reply; 15+ messages in thread
From: Carsten Dominik @ 2011-05-08 20:23 UTC (permalink / raw)
  To: Bert Burgemeister; +Cc: emacs-orgmode


On 7.5.2011, at 17:20, Bert Burgemeister wrote:

> Matt Lundin <mdl@imapmail.org> writes:
> 
>> Bert Burgemeister <trebbu@googlemail.com> writes:
>> 
>>> Just curious, is there anything I should have known that prevented the
>>> patch submitted in http://article.gmane.org/gmane.emacs.orgmode/39313,
>> 
>> Is it still in the bugtracker, or was it rejected?
> 
> Yes, and no.
> 
>> With your patch, what would happen if there were two or more links in
>> the headline?
>> 
>> * Two links
>> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>> http://www.orgmode.org
>> 
>> This entry would show up in the agenda as:
>> 
>>  org:      [[elisp:(info)][Link to info]]
>> 
>> But AFAICT, hitting C-c C-o in the agenda-buffer (even on the elisp
>> link) would jump immediately to http://www.orgmode.org, bypassing the
>> opportunity to select the the %%(...) generated link.
> 
> That's true and your patch reduces org-mode's LOC, so you win.

Hi Bert,

does this mean

http://patchwork.newartisans.com/patch/681/

is now obsolete?

Thanks.

- Carsten

> 
> -- 
> Bert
> 
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Accepted] Making the output of %% functions linkable in agenda views
  2011-05-08 20:23             ` Carsten Dominik
@ 2011-05-10  7:57               ` Bert Burgemeister
  0 siblings, 0 replies; 15+ messages in thread
From: Bert Burgemeister @ 2011-05-10  7:57 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 7.5.2011, at 17:20, Bert Burgemeister wrote:
>
>> Matt Lundin <mdl@imapmail.org> writes:
>> 
>>> Bert Burgemeister <trebbu@googlemail.com> writes:
>>> 
>>>> Just curious, is there anything I should have known that prevented the
>>>> patch submitted in http://article.gmane.org/gmane.emacs.orgmode/39313,
>>> 
>>> Is it still in the bugtracker, or was it rejected?
>> 
>> Yes, and no.
>> 
>>> With your patch, what would happen if there were two or more links in
>>> the headline?
>>> 
>>> * Two links
>>> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>>> http://www.orgmode.org
>>> 
>>> This entry would show up in the agenda as:
>>> 
>>>  org:      [[elisp:(info)][Link to info]]
>>> 
>>> But AFAICT, hitting C-c C-o in the agenda-buffer (even on the elisp
>>> link) would jump immediately to http://www.orgmode.org, bypassing the
>>> opportunity to select the the %%(...) generated link.
>> 
>> That's true and your patch reduces org-mode's LOC, so you win.
>
> Hi Bert,
>
> does this mean
>
> http://patchwork.newartisans.com/patch/681/
>
> is now obsolete?

It doesn't fix any issues I'm aware of, so you could consider it
obsolete.  But on the other hand, it still makes org-agenda-open-link a
bit more robust as it makes the cond try the remaining clauses if the
first one doesn't succeed.

-- 
Bert

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-05-10  7:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07 20:52 Making the output of %% functions linkable in agenda views Sebold, Charles
2011-05-03 16:59 ` charles.sebold
2011-05-03 17:28   ` Nick Dokos
2011-05-03 19:56   ` Matt Lundin
2011-05-03 20:04     ` Sebold, Charles
2011-05-03 20:09       ` Matt Lundin
2011-05-03 20:17         ` Sebold, Charles
2011-05-03 20:28         ` Nick Dokos
2011-05-03 20:47           ` Matt Lundin
2011-05-04  7:43     ` [Accepted] " Carsten Dominik
2011-05-06  7:49       ` Bert Burgemeister
2011-05-06 11:47         ` Matt Lundin
2011-05-07 15:20           ` Bert Burgemeister
2011-05-08 20:23             ` Carsten Dominik
2011-05-10  7:57               ` Bert Burgemeister

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).