emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org agenda extensions
@ 2013-01-11 10:47 Thomas Alexander Gerds
  2013-01-11 16:26 ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Alexander Gerds @ 2013-01-11 10:47 UTC (permalink / raw)
  To: emacs-orgmode

Dear all

with the aim to show properties in custom match views, I have been
experimenting with new variables:

org-agenda-overriding-agenda-format
org-agenda-property-list

then, tweaking the function org-scan-tags this enables custom format for
the agenda lines, optionally showing properties (without invoking
org-columns).

you can test this here

http://192.38.117.59/~tag/download/org-agenda-overriding-format-snps.el

using the dummy org-file

http://192.38.117.59/~tag/download/test.org

this should not break any current functionality? so, how about including
these changes of org-scan-tags?

Best Thomas 

--
sent from Nil

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

* org agenda extensions
@ 2013-01-11 13:35 Thomas Alexander Gerds
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Alexander Gerds @ 2013-01-11 13:35 UTC (permalink / raw)
  To: emacs-orgmode

Dear all 

with the aim to show properties in custom match views, I have been
experimenting with new variables:

org-agenda-overriding-agenda-format
org-agenda-property-list

then, tweaking the function org-scan-tags this enables custom format for
the agenda lines, optionally showing properties (without invoking
org-columns).

you can test this here

http://192.38.117.59/~tag/download/org-agenda-overriding-format-snps.el

using the dummy org-file

http://192.38.117.59/~tag/download/test.org

this should not break any current functionality? so, how about including
these changes of org-scan-tags? 

Best Thomas 

ps: I have now subscribed to the mailing list also with my current email
address. but, I posted this message once before ... so, dear mailing
list maintainers, please accept my appologies for the inconvenience !

--
sent from Nil

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

* Re: org agenda extensions
  2013-01-11 10:47 Thomas Alexander Gerds
@ 2013-01-11 16:26 ` Bastien
  2013-01-11 20:50   ` Thomas Alexander Gerds
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2013-01-11 16:26 UTC (permalink / raw)
  To: Thomas Alexander Gerds; +Cc: emacs-orgmode

Hi Thomas,

Thomas Alexander Gerds <tag@biostat.ku.dk> writes:

> with the aim to show properties in custom match views, I have been
> experimenting with new variables:
>
> org-agenda-overriding-agenda-format
> org-agenda-property-list
>
> then, tweaking the function org-scan-tags this enables custom format for
> the agenda lines, optionally showing properties (without invoking
> org-columns).
>
> you can test this here

Thanks for experimenting with this -- could you send your code as a
patch against current maint or master branch?

That's easier for me to read/check/test... otherwise I'll have a look
later on next week at best.

Thanks,

-- 
 Bastien

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

* Re: org agenda extensions
  2013-01-11 16:26 ` Bastien
@ 2013-01-11 20:50   ` Thomas Alexander Gerds
  2013-01-12  7:26     ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Alexander Gerds @ 2013-01-11 20:50 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

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


sure, here it comes (attached to this mail). to try my example you need
to evaluate the file test.el (also attached) and the following
expression:

(test-overriding-format "~/saved-attachments/test.org")

after saving test.org (also attached) in folder ~/saved-attachments/

does this work for you?


Bastien <bzg@altern.org> writes:

> Hi Thomas,
>
> Thomas Alexander Gerds <tag@biostat.ku.dk> writes:
>
>> with the aim to show properties in custom match views, I have been
>> experimenting with new variables:
>>
>> org-agenda-overriding-agenda-format
>> org-agenda-property-list
>>
>> then, tweaking the function org-scan-tags this enables custom format for
>> the agenda lines, optionally showing properties (without invoking
>> org-columns).
>>
>> you can test this here
>
> Thanks for experimenting with this -- could you send your code as a
> patch against current maint or master branch?
>
> That's easier for me to read/check/test... otherwise I'll have a look
> later on next week at best.
>
> Thanks,
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 


[-- Attachment #2: patch-agenda-overriding-format-org.el --]
[-- Type: application/emacs-lisp, Size: 2162 bytes --]

[-- Attachment #3: test.el --]
[-- Type: application/emacs-lisp, Size: 1547 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: test.org --]
[-- Type: text/x-org, Size: 208 bytes --]

** a test entry
   :PROPERTIES:
   :filename: [[bla.txt]]
   :birthday: <2013-01-11 Fri>
   :END:
** another test entry
   :PROPERTIES:
   :filename: [[blub.txt]]
   :birthday: <2013-01-11 Fri 8:38>
   :END:

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

* Re: org agenda extensions
  2013-01-11 20:50   ` Thomas Alexander Gerds
@ 2013-01-12  7:26     ` Bastien
  2013-01-12  7:43       ` Thomas Alexander Gerds
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2013-01-12  7:26 UTC (permalink / raw)
  To: Thomas Alexander Gerds; +Cc: emacs-orgmode

Hi Thomas,

I've reviewed the proposed change.

`org-scan-tags' already does many things beyond its name, because
a "tag" here is really a "match", which can include properties --
see `org-make-tags-matcher' for how the "tags match" is built from
properties).  

This is handy for tags view and `org-sparse-tree'.

In agenda, we don't need to display the properties that are part of
the tag match, as they are part of the agenda headline already.

I don't think we should let the user add properties to the agenda
lines this way, as (1) it would make the name `org-scan-tags' even
more confusing and (2) it would probably slow down agenda creating
a lot -- `org-scan-tags' is the bottleneck for speed here.

Also, the whole purpose of `org-agenda-columns' is precisely to see
properties in agenda, so I'd rather let the user interactively decide
if he wants to take the extra mile (and time) or not.

'hope this sounds reasonable enough.

And thanks anyway for this!

-- 
 Bastien

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

* Re: org agenda extensions
  2013-01-12  7:26     ` Bastien
@ 2013-01-12  7:43       ` Thomas Alexander Gerds
  2013-01-12  8:43         ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Alexander Gerds @ 2013-01-12  7:43 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hi Bastien

thanks for looking into this! I understand your general point of
view. however, the proposed changes would only slow down agenda creating
if org-agenda-property-list is set, right?

also, it certainly requires some insights to write
org-agenda-overriding-agenda-format which could display non-special
properties. hence only a user who knows what she/he is doing would run
into this problem.

anyway, could you propose a different approach to get this extension? I
could write a new function org-scan-properties, but that would require
several changes in org-agenda ...

thanks again,
Thomas

ps: one limitation of org-agenda-columns seems to be that columns
cannot be activated in two different agenda buffers simulaneously.






Bastien <bzg@altern.org> writes:

> Hi Thomas,
>
> I've reviewed the proposed change.
>
> `org-scan-tags' already does many things beyond its name, because
> a "tag" here is really a "match", which can include properties --
> see `org-make-tags-matcher' for how the "tags match" is built from
> properties).  
>
> This is handy for tags view and `org-sparse-tree'.
>
> In agenda, we don't need to display the properties that are part of
> the tag match, as they are part of the agenda headline already.
>
> I don't think we should let the user add properties to the agenda
> lines this way, as (1) it would make the name `org-scan-tags' even
> more confusing and (2) it would probably slow down agenda creating
> a lot -- `org-scan-tags' is the bottleneck for speed here.
>
> Also, the whole purpose of `org-agenda-columns' is precisely to see
> properties in agenda, so I'd rather let the user interactively decide
> if he wants to take the extra mile (and time) or not.
>
> 'hope this sounds reasonable enough.
>
> And thanks anyway for this!
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 

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

* Re: org agenda extensions
  2013-01-12  7:43       ` Thomas Alexander Gerds
@ 2013-01-12  8:43         ` Bastien
  2013-01-12  9:03           ` Thomas Alexander Gerds
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2013-01-12  8:43 UTC (permalink / raw)
  To: Thomas Alexander Gerds; +Cc: emacs-orgmode

Hi Thomas,

Thomas Alexander Gerds <tag@biostat.ku.dk> writes:

> thanks for looking into this! I understand your general point of
> view. however, the proposed changes would only slow down agenda creating
> if org-agenda-property-list is set, right?

Right.

> also, it certainly requires some insights to write
> org-agenda-overriding-agenda-format which could display non-special

(`org-agenda-overriding-agenda-format' is a confusing name IMHO.)

> properties. hence only a user who knows what she/he is doing would run
> into this problem.

Many users just copy stuff from the web, and some are not really
knowing what they do.

> anyway, could you propose a different approach to get this
> extension?

You can write a function for `org-agenda-finalize-hook' which would go
through the agenda lines, get the properties and display them.

That's a far better approach.

> ps: one limitation of org-agenda-columns seems to be that columns
> cannot be activated in two different agenda buffers simulaneously.

Yes, we can work on this.

Best,

-- 
 Bastien

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

* Re: org agenda extensions
  2013-01-12  8:43         ` Bastien
@ 2013-01-12  9:03           ` Thomas Alexander Gerds
  2013-01-12  9:25             ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Alexander Gerds @ 2013-01-12  9:03 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode


Hi Bastien

I feel that your proposal to first create the agenda using the standard
`org-agenda-format-item' function and then to replace all lines again,
by calling a suitable function added to `org-agenda-finalize-hook' is
not very efficient.

but, since you agree that when `org-agenda-property-list' is nil no harm
is done, and if your objection mostly is about the name, then how about

`org-agenda-overriding-format-item-function'

Best,
Thomas

ps: I would volunteer to assist users who copy stuff from the web and of
course also deliver documentation and examples for
`org-agenda-property-list'.



Bastien <bzg@altern.org> writes:

> Hi Thomas,
>
> Thomas Alexander Gerds <tag@biostat.ku.dk> writes:
>
>> thanks for looking into this! I understand your general point of
>> view. however, the proposed changes would only slow down agenda creating
>> if org-agenda-property-list is set, right?
>
> Right.
>
>> also, it certainly requires some insights to write
>> org-agenda-overriding-agenda-format which could display non-special
>
> (`org-agenda-overriding-agenda-format' is a confusing name IMHO.)
>
>> properties. hence only a user who knows what she/he is doing would run
>> into this problem.
>
> Many users just copy stuff from the web, and some are not really
> knowing what they do.
>
>> anyway, could you propose a different approach to get this
>> extension?
>
> You can write a function for `org-agenda-finalize-hook' which would go
> through the agenda lines, get the properties and display them.
>
> That's a far better approach.
>
>> ps: one limitation of org-agenda-columns seems to be that columns
>> cannot be activated in two different agenda buffers simulaneously.
>
> Yes, we can work on this.
>
> Best,
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 

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

* Re: org agenda extensions
  2013-01-12  9:03           ` Thomas Alexander Gerds
@ 2013-01-12  9:25             ` Bastien
  2013-01-12  9:36               ` Thomas Alexander Gerds
  0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2013-01-12  9:25 UTC (permalink / raw)
  To: Thomas Alexander Gerds; +Cc: emacs-orgmode

Hi Thomas,

Thomas Alexander Gerds <tag@biostat.ku.dk> writes:

> I feel that your proposal to first create the agenda using the standard
> `org-agenda-format-item' function and then to replace all lines again,
> by calling a suitable function added to `org-agenda-finalize-hook' is
> not very efficient.

Imagine you have a 10000 items agenda file, and you produce a 100
items agenda view.  Your method would slow down checking 10000 items
to display properties for 100 items, while my method would slow down
the display of the 100 already available items.  So its about 100x
faster.

Please check both methods and let us know what performance you
observe.

> but, since you agree that when `org-agenda-property-list' is nil no harm
> is done, and if your objection mostly is about the name, then how about
>
> `org-agenda-overriding-format-item-function'

My objection is about the method.

> ps: I would volunteer to assist users who copy stuff from the web and of
> course also deliver documentation and examples for
> `org-agenda-property-list'.

Thanks for this -- but as I said, there are performance issues and
design issues (not introducing formatting properties within
org-scan-tags.)  

Best,

-- 
 Bastien

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

* Re: org agenda extensions
  2013-01-12  9:25             ` Bastien
@ 2013-01-12  9:36               ` Thomas Alexander Gerds
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Alexander Gerds @ 2013-01-12  9:36 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hi Bastien

ok. will investigate. thanks for now.

Best Thomas


Bastien <bzg@altern.org> writes:

> Hi Thomas,
>
> Thomas Alexander Gerds <tag@biostat.ku.dk> writes:
>
>> I feel that your proposal to first create the agenda using the standard
>> `org-agenda-format-item' function and then to replace all lines again,
>> by calling a suitable function added to `org-agenda-finalize-hook' is
>> not very efficient.
>
> Imagine you have a 10000 items agenda file, and you produce a 100
> items agenda view.  Your method would slow down checking 10000 items
> to display properties for 100 items, while my method would slow down
> the display of the 100 already available items.  So its about 100x
> faster.
>
> Please check both methods and let us know what performance you
> observe.
>
>> but, since you agree that when `org-agenda-property-list' is nil no harm
>> is done, and if your objection mostly is about the name, then how about
>>
>> `org-agenda-overriding-format-item-function'
>
> My objection is about the method.
>
>> ps: I would volunteer to assist users who copy stuff from the web and of
>> course also deliver documentation and examples for
>> `org-agenda-property-list'.
>
> Thanks for this -- but as I said, there are performance issues and
> design issues (not introducing formatting properties within
> org-scan-tags.)  
>
> Best,
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 

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

end of thread, other threads:[~2013-01-12  9:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 13:35 org agenda extensions Thomas Alexander Gerds
  -- strict thread matches above, loose matches on Subject: below --
2013-01-11 10:47 Thomas Alexander Gerds
2013-01-11 16:26 ` Bastien
2013-01-11 20:50   ` Thomas Alexander Gerds
2013-01-12  7:26     ` Bastien
2013-01-12  7:43       ` Thomas Alexander Gerds
2013-01-12  8:43         ` Bastien
2013-01-12  9:03           ` Thomas Alexander Gerds
2013-01-12  9:25             ` Bastien
2013-01-12  9:36               ` Thomas Alexander Gerds

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