emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] custom sorting of agenda items


From: Ilya Shlyakhter
Subject: Re: [Orgmode] custom sorting of agenda items
Date: Tue, 17 Aug 2010 12:40:14 -0400

Thanks Carsten, org-agenda-before-sorting-filter-function does what I need.

It would be better if it was called with the point already on the
corresponding headline in the corresponding buffer.
This would also be faster as you could call it for all entries in one
buffer at a time, avoiding a separate excursion for each entry.

It seems that _appending_ text to the agenda line should be safe.  Is
that correct?

thanks,

ilya

On Mon, Aug 16, 2010 at 9:40 AM, Carsten Dominik
<address@hidden> wrote:
>
> On Aug 16, 2010, at 2:59 PM, Ilya Shlyakhter wrote:
>
>> Thanks!   Would things work faster if there was a user-defined hook
>> that was called at each agenda entry at the same time
>> the 'org-hd-marker property gets stored, so it could store any other
>> things it needs from the entry as text properties for later
>> use by user-defined entry sorting routine?
>
> Please pull and take a look at the new variable
> `org-agenda-before-sorting-filter-function'.
>
> Martin, I think you could use this variable also for your
> "filtering" application.
>
> - Carsten
>
>>
>> ilya
>>
>> On Mon, Aug 16, 2010 at 8:54 AM, Carsten Dominik
>> <address@hidden> wrote:
>>>
>>> On Aug 5, 2010, at 1:01 AM, Ilya Shlyakhter wrote:
>>>
>>>> When giving a user-defined function for org-agenda-cmp-user-defined,
>>>> the function gets two agenda entries.   Is there a way from an agenda
>>>> entry
>>>> to get to the original org entry?
>>>
>>> Yes, the marker that points to the original entry is stored in text
>>> properties.
>>> You can take it and then go to the entry, for example with
>>>
>>> (org-with-point-at (org-get-at-bol 'org-hd-marker)
>>>    ;; do here what you need to do at the location of the entry
>>>    )
>>>
>>> You could do this in org-finalize-agenda-hook for all entries, for
>>> example.
>>> Might slow things down, of cause.
>>>
>>> HTH
>>>
>>> - Carsten
>>>
>>>>
>>>> Best would be if, besides a user-defined sort function, you could also
>>>> provide
>>>> a function that takes the org entry and the agenda item (i.e. is run
>>>> with
>>>> point
>>>> on the org entry and is passed the agenda item), and can then store
>>>> anything
>>>> it wants about the org entry as text properties on the agenda item.
>>>> The companion user-defined sorting function could then use these stored
>>>> text properties for ordering the agenda items.   Could you add such a
>>>> hook?
>>>>
>>>> thanks,
>>>>
>>>> ilya
>>>>
>>>> On Wed, Aug 4, 2010 at 6:51 PM, Bastien <address@hidden>
>>>> wrote:
>>>>>
>>>>> Hi Ilya,
>>>>>
>>>>> Ilya Shlyakhter <address@hidden> writes:
>>>>>
>>>>>> I'd like to sort agenda entries in a custom agenda view by the value
>>>>>> of a text property that I put on the headlines.
>>>>>> Is there a way to do that?
>>>>>
>>>>> Well, no.
>>>>>
>>>>> Maybe playing around with org-map-entries could yield some result.
>>>>>
>>>>> --
>>>>>  Bastien
>>>>>
>>>>
>>>> _______________________________________________
>>>> Emacs-orgmode mailing list
>>>> Please use `Reply All' to send replies to the list.
>>>> address@hidden
>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>> - Carsten
>>>
>>>
>>>
>>>
>
> - Carsten
>
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]