From: Carsten Dominik <carsten.dominik@gmail.com>
To: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
Cc: Martin Pohlack <mp26@os.inf.tu-dresden.de>,
emacs-orgmode Mode <emacs-orgmode@gnu.org>,
Bastien Guerry <bastien.guerry@wikimedia.fr>
Subject: Re: custom sorting of agenda items
Date: Mon, 16 Aug 2010 15:40:56 +0200 [thread overview]
Message-ID: <A15D5FDA-64FE-4858-9C07-89862CDFAE06@gmail.com> (raw)
In-Reply-To: <AANLkTi=FJOtGC=sRzhEq2FSaXqXrgpK=CDORfomSS-Hr@mail.gmail.com>
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
> <carsten.dominik@gmail.com> 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
>>> <bastien.guerry@wikimedia.fr>
>>> wrote:
>>>>
>>>> Hi Ilya,
>>>>
>>>> Ilya Shlyakhter <ilya_shl@alum.mit.edu> 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.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> - Carsten
>>
>>
>>
>>
- Carsten
next prev parent reply other threads:[~2010-08-16 13:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 19:27 custom sorting of agenda items Ilya Shlyakhter
2010-08-04 22:51 ` Bastien
2010-08-04 23:01 ` Ilya Shlyakhter
2010-08-16 12:54 ` Carsten Dominik
2010-08-16 12:59 ` Ilya Shlyakhter
2010-08-16 13:14 ` Carsten Dominik
2010-08-16 13:40 ` Carsten Dominik [this message]
2010-08-17 16:40 ` Ilya Shlyakhter
2010-08-18 7:35 ` Carsten Dominik
2010-08-19 23:49 ` Ilya Shlyakhter
2010-08-20 6:30 ` Carsten Dominik
2010-08-17 16:51 ` Samuel Wales
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A15D5FDA-64FE-4858-9C07-89862CDFAE06@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=bastien.guerry@wikimedia.fr \
--cc=emacs-orgmode@gnu.org \
--cc=ilya_shl@alum.mit.edu \
--cc=mp26@os.inf.tu-dresden.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.