Re: [O] Re: Difference between subtree-restricted export and 'publish enclosing subtree'

2011-04-09 Thread Sean Whitton
Hi,

On 8 Apr 2011 at 13:01Z, Matt Lundin wrote:

>> When I put my cursor in the properties drawer within the essay text
>> and hit C-c C-e 1 d I get my 'essay' exported and processed to
>> hume-essay-causation.pdf correctly, but if I instead use C-c C-e SPC
>> with point at various different places within the essay, I just get
>> the error 'No enclosing node with LaTeX_CLASS or EXPORT_FILE_NAME',
>> yet afaics they are there.

> Yes, there are a few issues here.

> I can replicate this bug when the cursor is above the LATEX_CLASS
> property. For instance, if the cursor is located on the :PROPERTIES:
> line, C-c C-e SPC results in an error. If it is on the :END: line, it
> finds the relevant headline

Interesting.  I get the problem from anywhere in the subtree - it
doesn't seem to be able to find the latex_class nor the
export_title/export_file_name.

> The problem is that C-c C-e space calls a simple backwards regexp
> search for the two properties. But the regexp search looks for
> export_title instead of export_file_name (lines 998-1000):

>   (if (re-search-backward "^[
> \t]+\\(:latex_class:\\|:export_title:\\)[ \t]+\\S-" nil t)

> In addition, the regexp search is not bounded, so if you have another
> headline higher up in the file with one of the properties in the
> search, such as...

> * Kant Essay
>> PROPERTIES:
>> LATEX_CLASS: spwessay
>> END:
> ** Some text

> ...hitting space will export that essay instead.

Okay, so it looks like this isn't a feature that's really usable right
now.  Maybe I'll write a patch to fix it at some point; for now I can
just use C-c C-u C-c C-e 1.  Thanks for the feedback.

S

-- 
Sean Whitton / 
OpenPGP KeyID: 0x3B6D411B
http://sean.whitton.me/



pgpsUDnQP38yY.pgp
Description: PGP signature


[O] Re: (no subject)

2011-04-09 Thread Vincent-Xavier JUMEL
:SCHEDULED: and :DEADLINE: which is confusing. Documentation
 example
Le 23 février à 20:54 Bernt Hansen a écrit
> 
> Please provide a sample task and a description of what you get and what
> you expected.  AFAIK SCHEDULE and -3d is not intended to work - this is
> for DEADLINES: only to specify the number of days before the deadline
> that you want the entry to show up in your agenda.  I don't think it has
> any meaning for SCHEDULED: entries.
>
In my opinion, documentation doesn't make a clear separation between
let me think that  will work with SCHEDULED.

Documentation should have a paragraph on repetear  and on
paragraph on delaying.
-- 
Vincent-Xavier JUMEL GPG Id: 0x2E14CE70 http://thetys-retz.net

Rejoignez les 5500 adhérents de l'April http://www.april.org/adherer
Parinux, logiciel libre à Paris : http://www.parinux.org



[O] Re: Odd behavior with numbered list, footnotes, and LaTeX

2011-04-09 Thread Nicolas Goaziou
Hello,

John Hendy  writes:

> On Wed, Apr 6, 2011 at 1:33 PM, Nicolas Goaziou  wrote:
>> Hello,
>>
>> John Hendy  writes:
>>
>>> Just stumbled across something very odd I can't figure out. Here's a sample:
>>> ,-
>>> | #+OPTIONS:   toc:t TeX:t LaTeX:t H:4 f:t todo:nil num:t tags:nil
>>> | #+latex_class: article
>>> |
>>> | * Section
>>> | 1. *A section*: a bunch of text is here and it seems like the
>>> footnote is doing
>>> |   something odd. [fn:1] More text here.
>>> | 2. *A section*: a bunch of text is here and it seems like the
>>> footnote is doing
>>> |  something odd.
>>> |
>>> | * Footnotes
>>> | [fn:1] www.google.com
>>> `-
>>>
>>> It seems that the footnote triggers LaTeX to end the enumerate
>>> environment early for some reason. Not only that, but it seems to be
>>> inserting \end{enumerate} *inside* the footnote:
>>> ,-
>>> | \begin{enumerate}
>>> | \item \textbf{A section}: a bunch of text is here and it seems like
>>> the footnote is doing
>>> |   something odd. \footnote{www.google.com
>>> | \end{enumerate}
>>> | } More text here.
>>> |
>>> | \begin{enumerate}
>>> | \item \textbf{A section}: a bunch of text is here and it seems like
>>> the footnote is doing
>>> |   something odd.
>>> | \end{enumerate}
>>> `-
>>>
>>> Any suggestions?
>>
>> This has been discussed in a recent thread, and I submitted a patch for
>> that problem. I'm still waiting for feedback before applying it.
>>
>
> Whoops on missing that... though I hope it gets fixed. I hadn't
> updated one of my computers in a few months and know it wasn't giving
> the bad behavior on there, so a change must have goofed something.

I've pushed the patch. I tried it on your example and it seems to behave
correctly. Though, do not hesitate to report back if any problem arises.

Regards,

-- 
Nicolas Goaziou



Re: [O] Re: Completing with anything

2011-04-09 Thread Julien Danjou
On Sun, Mar 27 2011, Michael Markert wrote:

> Attached code handles both capturing from summary and message
> buffer.

I'd like to merge this, but I have to ask: did you signed the copyright
assignement papers?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpS5hlzc8pzM.pgp
Description: PGP signature


[O] Time zone support for agenda item timestamps

2011-04-09 Thread Matt Curtis
Hello,

I would like agenda timestamps to support time zones somehow, and I'm after
some guidance from org-mode developers.

My plan is to support the time offset +HHMM or -HHMM, at a minimum.

After looking at the code I believe I need to modify org-agenda-get-timestamps
quite heavily to effect this change.

Currently it looks like it scans for timestamps which match the search date
(-MM-DD), which would need to be changed to at least match adjacent
days, and then filtered after applying the time zone offset, and
finally adjusted
with the offset to match local time.

This would mean the agenda/list displays would get the same sort of results
set, as the timestamps would be adjusted back to the search date - i.e. the
search date would be considered "local time"; the change is to consider the
offset when figuring out which items fall on this date.

I have a couple of questions:

* Is this a reasonable approach? (It would slow down agenda generation
with the extra scanning and filtering)

* If not, is there another design I can look at? (I wonder why this hasn't been
done before, so I think maybe others have done some thinking about it.)

* What parts of org-mode should I be looking at to ensure this change does
not cause a regression?

cheers,
Matt



Re: [O] Re: Completing with anything

2011-04-09 Thread Michael Markert
On 9 Apr 2011, Julien Danjou wrote:
> On Sun, Mar 27 2011, Michael Markert wrote:
>> Attached code handles both capturing from summary and message
>> buffer.
>
> I'd like to merge this, but I have to ask: did you signed the copyright
> assignement papers?

No, but if it's necessary (or helping) I'll do so.

Michael


pgpnpwN9OUj3F.pgp
Description: PGP signature


Re: [O] Re: Completing with anything

2011-04-09 Thread Julien Danjou
On Mon, Mar 21 2011, Julien Danjou wrote:

> I see, that makes sense. I think that completion is not what I want to
> use as Tassilo suggested. I've been that way just because this is what
> is used in `message.el'. Maybe it requires a change too to turn towards
> an `abbrev' use. :)

Actually, it does not require any change, but there is an issue I'm not
sure how to resolve.

On , message-mode calls `completion-at-point-function', which calls
first my `org-contacts-message-complete-function' and then
`message-completion-function'.

If you type someone's nickname, `org-contacts-message-complete-function'
will not return any match. So I hacked it to return only the nickname,
like 'j' would return 'jd'.

Then, using the abbrev table, I manage to make jd expand to my
name+email but I have to press space. If I press , the completion
kicks in, and re-complete 'jd' to 'jd', and `expand-abbrev' is never
called. I need to press 'space', which is not very handy.

It seems that completion and abbrev are (too much) orthogonal: you
cannot easily complete an item from the abbrev table using completion.

So now, I wonder: wouldn't it be a good idea to add a call to
`expand-abbrev' just after `completion-at-point' is being called?

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpf6CXn8xuGL.pgp
Description: PGP signature


[O] Bug: Some bulk operations are slow [7.5 (release_7.5.135.g7021f)]

2011-04-09 Thread Dave Abrahams


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


When bulk scattering, it happens almost instantly, with one display
update.  With bulk rescheduling, there are painful flashing,
item-by-item updating, and screen redraws.  All bulk operations should
be as painless as scatter is.

Emacs  : GNU Emacs 23.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.35)
 of 2011-03-09 on black.porkrind.org
Package: Org-mode version 7.5 (release_7.5.135.g7021f)

current state:
==
(setq
 org-agenda-deadline-leaders '("D: " "D%d: ")
 org-clock-in-switch-to-state "STARTED"
 org-agenda-skip-scheduled-if-deadline-is-shown t
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-todo-keyword-faces '(("TODO" :foreground "medium blue" :weight bold) 
("APPT" :foreground "medium blue" :weight bold)
  ("NOTE" :foreground "brown" :weight bold) ("STARTED" 
:foreground "dark orange" :weight bold)
  ("WAITING" :foreground "red" :weight bold) 
("DELEGATED" :foreground "dark violet" :weight bold)
  ("DEFERRED" :foreground "dark blue" :weight bold) 
("SOMEDAY" :foreground "dark blue" :weight bold)
  ("PROJECT" :height 1.5 :weight bold :foreground 
"black"))
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-custom-commands '(("E" "Errands (next 3 days)" tags
   
"Errand&TODO<>\"DONE\"&TODO<>\"CANCELLED\"&STYLE<>\"habit\"&SCHEDULED<\"<+3d>\""
   ((org-agenda-overriding-header "Errands (next 3 
days)")))
  ("A" "Priority #A tasks" agenda ""
   ((org-agenda-ndays 1) 
(org-agenda-overriding-header "Today's priority #A tasks: ")
(org-agenda-skip-function (quote 
(org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"
   )
  ("B" "Priority #A and #B tasks" agenda ""
   ((org-agenda-ndays 1) 
(org-agenda-overriding-header "Today's priority #A and #B tasks: ")
(org-agenda-skip-function (quote 
(org-agenda-skip-entry-if (quote regexp) "\\=.*\\[#C\\]"
   )
  ("w" "Waiting/delegated tasks" tags 
"TODO=\"WAITING\"|TODO=\"DELEGATED\""
   ((org-agenda-overriding-header 
"Waiting/delegated tasks:")
(org-agenda-sorting-strategy (quote 
(todo-state-up priority-down category-up
   )
  ("u" "Unscheduled tasks" tags
   
"TODO<>\"\"&TODO<>\"DONE\"&TODO<>\"CANCELLED\"&TODO<>\"NOTE\"&CATEGORY<>{CEG\\|ABC\\|Bizcard\\|Adagio\\|EVAprint\\|\\}"
   ((org-agenda-overriding-header "Unscheduled 
tasks: ")


  
(org-agenda-skip-function

   

   
(quote








 (org-agenda-skip-entry-if


  


  

  

Re: [O] Time zone support for agenda item timestamps

2011-04-09 Thread Michael Brand
Hi Matt

I know only of an old thread about this
http://thread.gmane.org/gmane.emacs.orgmode/5145

Of course it would be very welcome and valuable for e. g. traveling
but I fear it is now too expensive to introduce. The trouble I see is
that the smallest possible first change has to include already almost
all of the work to be done in order to not break any of the many
things that are supported now and to hold on with backwards
compatibility. I hope that there are ideas that I can not imagine now,
how this could be broken down into reasonable parts.

Michael


On Sat, Apr 9, 2011 at 12:23, Matt Curtis  wrote:
> Hello,
>
> I would like agenda timestamps to support time zones somehow, and I'm after
> some guidance from org-mode developers.
>
> My plan is to support the time offset +HHMM or -HHMM, at a minimum.
>
> After looking at the code I believe I need to modify org-agenda-get-timestamps
> quite heavily to effect this change.
>
> Currently it looks like it scans for timestamps which match the search date
> (-MM-DD), which would need to be changed to at least match adjacent
> days, and then filtered after applying the time zone offset, and
> finally adjusted
> with the offset to match local time.
>
> This would mean the agenda/list displays would get the same sort of results
> set, as the timestamps would be adjusted back to the search date - i.e. the
> search date would be considered "local time"; the change is to consider the
> offset when figuring out which items fall on this date.
>
> I have a couple of questions:
>
> * Is this a reasonable approach? (It would slow down agenda generation
> with the extra scanning and filtering)
>
> * If not, is there another design I can look at? (I wonder why this hasn't 
> been
> done before, so I think maybe others have done some thinking about it.)
>
> * What parts of org-mode should I be looking at to ensure this change does
> not cause a regression?



[O] Re: Odd behavior with numbered list, footnotes, and LaTeX

2011-04-09 Thread John Hendy
On Sat, Apr 9, 2011 at 6:38 AM, Nicolas Goaziou  wrote:
> Hello,
>
> John Hendy  writes:
>
>> On Wed, Apr 6, 2011 at 1:33 PM, Nicolas Goaziou  wrote:
>>> Hello,
>>>
>>> John Hendy  writes:
>>>
 Just stumbled across something very odd I can't figure out. Here's a 
 sample:
 ,-
 | #+OPTIONS:   toc:t TeX:t LaTeX:t H:4 f:t todo:nil num:t tags:nil
 | #+latex_class: article
 |
 | * Section
 | 1. *A section*: a bunch of text is here and it seems like the
 footnote is doing
 |   something odd. [fn:1] More text here.
 | 2. *A section*: a bunch of text is here and it seems like the
 footnote is doing
 |  something odd.
 |
 | * Footnotes
 | [fn:1] www.google.com
 `-

 It seems that the footnote triggers LaTeX to end the enumerate
 environment early for some reason. Not only that, but it seems to be
 inserting \end{enumerate} *inside* the footnote:
 ,-
 | \begin{enumerate}
 | \item \textbf{A section}: a bunch of text is here and it seems like
 the footnote is doing
 |   something odd. \footnote{www.google.com
 | \end{enumerate}
 | } More text here.
 |
 | \begin{enumerate}
 | \item \textbf{A section}: a bunch of text is here and it seems like
 the footnote is doing
 |   something odd.
 | \end{enumerate}
 `-

 Any suggestions?
>>>
>>> This has been discussed in a recent thread, and I submitted a patch for
>>> that problem. I'm still waiting for feedback before applying it.
>>>
>>
>> Whoops on missing that... though I hope it gets fixed. I hadn't
>> updated one of my computers in a few months and know it wasn't giving
>> the bad behavior on there, so a change must have goofed something.
>
> I've pushed the patch. I tried it on your example and it seems to behave
> correctly. Though, do not hesitate to report back if any problem arises.
>

Yay! Flawless victory (well, for this simple example).


Many thanks,
John

> Regards,
>
> --
> Nicolas Goaziou
>



[O] Re: Something like 'org-clock-in-at-time'?

2011-04-09 Thread John Hendy
Just wanted to bump this as it's almost been a month. Even feedback as
to whether or not this is feasible would be appreciated. If it's not,
or it is but just won't happen, I'll resolve to keep clocking in,
immediately clocking out, and then futzing with the times by hand.


Thanks,
John

On Sat, Mar 12, 2011 at 2:48 PM, John Hendy  wrote:
> Hi,
>
>
> Could someone fill me in on your process for clocking in things after
> the fact? I've been trying to get into to clocking, but, especially at
> home, I don't return to my computer in between every different thing.
> Instead, I stop at it when I get a pause and try to fill in what I've
> been doing. So far, this has been something akin to:
>
> - create a new sub-headline and call it what I was doing
> - C-c C-c to tag it
> - C-c C-x C-i followed by C-c C-x C-o to create a clocked time stamps
> - Manually edit the times
> - C-c C-c to update the count
>
>
> This gets quite tedious when adding several things. I have to expand
> the logbook, and then fiddle with the times.
> Could there be (or is there already) a function that might act like
> the date selection screen for clocking? I looked at the completion
> list for org-clock-* commands and none of them looked promising. I
> could envision something like:
>
> - M-x org-clock-in-at-time
> - Minibuffer presents date selection, you select date just like for timestamps
> - Minibuffer requests time in form HH:MM and you can type it in
>
> Same type of function for clocking out. This would *vastly* simplify
> how I end up clocking.
>
> I'm absolutely open to suggestions from others on how you deal with
> this. Perhaps this is an opportunity to learn about how the *experts*
> access some functionality I'm currently unaware of!
>
>
> Thanks,
> John
>



[O] Re: Something like 'org-clock-in-at-time'?

2011-04-09 Thread Bernt Hansen

John Hendy  writes:

> On Sat, Mar 12, 2011 at 2:48 PM, John Hendy  wrote:
>> Could someone fill me in on your process for clocking in things after
>> the fact? I've been trying to get into to clocking, but, especially at
>> home, I don't return to my computer in between every different thing.
>> Instead, I stop at it when I get a pause and try to fill in what I've
>> been doing. So far, this has been something akin to:
>>
>> - create a new sub-headline and call it what I was doing
>> - C-c C-c to tag it
>> - C-c C-x C-i followed by C-c C-x C-o to create a clocked time stamps
>> - Manually edit the times
>> - C-c C-c to update the count
>>
>>
>> This gets quite tedious when adding several things. I have to expand
>> the logbook, and then fiddle with the times.
>> Could there be (or is there already) a function that might act like
>> the date selection screen for clocking? I looked at the completion
>> list for org-clock-* commands and none of them looked promising. I
>> could envision something like:
>>
>> - M-x org-clock-in-at-time
>> - Minibuffer presents date selection, you select date just like for 
>> timestamps
>> - Minibuffer requests time in form HH:MM and you can type it in
>>
>> Same type of function for clocking out. This would *vastly* simplify
>> how I end up clocking.
>>
>> I'm absolutely open to suggestions from others on how you deal with
>> this. Perhaps this is an opportunity to learn about how the *experts*
>> access some functionality I'm currently unaware of!

> Just wanted to bump this as it's almost been a month. Even feedback as
> to whether or not this is feasible would be appreciated. If it's not,
> or it is but just won't happen, I'll resolve to keep clocking in,
> immediately clocking out, and then futzing with the times by hand.

Hi John,

I don't have a workflow for this but I just did a little experiment
which may be easier than what you are currently doing.

It's now 1:54PM and I wanted to try to create a few (fake) tasks and
generate clocking data for the following:

 - task 1 for 8:00 - 8:30
 - task 2 for 8:30 - 8:45
 - task 3 for 8:45 - 11:00
 - task 4 for 11:00 - 13:00
 - task 5 for 13:00 - now (current task)

so I did the following:

1) Stop the clock
2) Create the tasks

   --8<---cut here---start->8---
   * TODO Experiment with clocking in old data
   [2011-04-09 Sat 13:47]
   ** TODO Old task for 8am - 8:30
   [2011-04-09 Sat 13:48]
   ** TODO 8:30-8:45
   [2011-04-09 Sat 13:48]
   ** TODO 8:45-11:00
   [2011-04-09 Sat 13:48]
   ** TODO 11:00-1PM
   [2011-04-09 Sat 13:48]
   ** TODO current task
   [2011-04-09 Sat 13:48]
   --8<---cut here---end--->8---

3) Clock in the first task (Old task for 8am - 8:30)
4) Manually move the clock back to 8AM with S-up and S-down on the clock
   line CLOCK: [2011-04-09 Sat 13:52]CLOCK: [2011-04-09 Sat 08:00]
   (or just edit it)
5) M-x org-resolve-clocks  (I have this bound to M-F11)
6) enter K to keep 30 minutes and stop the clock
7) Go to the next task and clock that in
8) answer Yes to start the clock from the last time
9) M-F11 (M-x org-resolve-clocks) again and enter K to keep 15 minutes
   for the 8:30-8:45 task
10) Lather, rinse, and repeat 7-9 for all but the last task
11) Then clock in the last task and continue with whatever you are
doing.

This results in something like this

--8<---cut here---start->8---
* DONE Experiment with clocking in old data
CLOSED: [2011-04-09 Sat 13:51]
:LOGBOOK:
- State "DONE"   from "STARTED"[2011-04-09 Sat 13:51]
:END:
[2011-04-09 Sat 13:47]
[[gnus:nntp%2Bnews.gmane.org:gmane.emacs.orgmode][gnus:nntp+news.gmane.org:gmane.emacs.orgmode]]
** DONE Old task for 8am - 8:30
CLOSED: [2011-04-09 Sat 13:50]
:LOGBOOK:
- State "DONE"   from "STARTED"[2011-04-09 Sat 13:50]
CLOCK: [2011-04-09 Sat 08:00]--[2011-04-09 Sat 08:30] =>  0:30
:END:
[2011-04-09 Sat 13:48]
** DONE 8:30-8:45
CLOSED: [2011-04-09 Sat 13:50]
:LOGBOOK:
- State "DONE"   from "STARTED"[2011-04-09 Sat 13:50]
CLOCK: [2011-04-09 Sat 08:30]--[2011-04-09 Sat 08:45] =>  0:15
:END:
[2011-04-09 Sat 13:48]
** DONE 8:45-11:00
CLOSED: [2011-04-09 Sat 13:50]
:LOGBOOK:
- State "DONE"   from "STARTED"[2011-04-09 Sat 13:50]
CLOCK: [2011-04-09 Sat 08:45]--[2011-04-09 Sat 11:00] =>  2:15
:END:
[2011-04-09 Sat 13:48]
** DONE 11:00-1PM
CLOSED: [2011-04-09 Sat 13:50]
:LOGBOOK:
- State "DONE"   from "STARTED"[2011-04-09 Sat 13:50]
CLOCK: [2011-04-09 Sat 11:00]--[2011-04-09 Sat 13:00] =>  2:00
:END:
[2011-04-09 Sat 13:48]
** DONE current task
CLOSED: [2011-04-09 Sat 13:50]
:LOGBOOK:
- State "DONE"   from "STARTED"[2011-04-09 Sat 13:50]
CLOCK: [2011-04-09 Sat 13:00]--[2011-04-09 Sat 13:50] =>  0:50
:END:
[2011-04-09 Sat 13:48]
--8<---cut here---end--->8---


Does that help?

Regards,
Bernt






[O] Re: Something like 'org-clock-in-at-time'?

2011-04-09 Thread Bernt Hansen
Bernt Hansen  writes:

> John Hendy  writes:
>
>> On Sat, Mar 12, 2011 at 2:48 PM, John Hendy  wrote:
>>> - create a new sub-headline and call it what I was doing
>>> - C-c C-c to tag it
>>> - C-c C-x C-i followed by C-c C-x C-o to create a clocked time stamps
>>> - Manually edit the times
>>> - C-c C-c to update the count

One more thing,

Using S-up and S-down on the time in the clock line to change hours and
minutes will automatically update the total summary time for the clock
line.

-Bernt





Re: [O] Re: Completing with anything

2011-04-09 Thread Stefan Monnier
> So now, I wonder: wouldn't it be a good idea to add a call to
> `expand-abbrev' just after `completion-at-point' is being called?

After completing an abbrev name, yes, but otherwise I don't think so.
I.e. why don't you add such a call to
org-contacts-message-complete-function?


Stefan



[O] Custom Agenda that partially skips entries

2011-04-09 Thread Ido Magal
I'd appreciate assistance in constructing a custom agenda that accomplishes
the following (if possible):

1. Block of week's agenda.
2. Block of "next" items that have no schedule ( items that don't show up in
block 1 )

This is my starting point:

(setq org-agenda-custom-commands
  '(("n" "Next tasks"
 ((todo "next")))
 ("A" "agenda"
 ((agenda "" ((org-agenda-ndays 7)))
  (todo "next")
  ))
))

The problem here is that I get duplicates because _all_ 'next' items show up
in the second block.  I'd rather that only unscheduled items showed there.

I thought that this would do it, but it fails:

(setq org-agenda-custom-commands
  '(("n" "Next tasks"
 ((todo "next")))
 ("A" "agenda"
 ((agenda "" ((org-agenda-ndays 7)))
  ((todo "next")
   (org-agenda-skip-function '(org-agenda-skip-entry-if 'deadline
'scheduled)))
  ))
))

Thanks in advance.