[O] Speeding up the agenda search

2012-10-19 Thread Marcelo de Moraes Serpa
Hello everyone,

My list of files in the agenda got to a considerable size. It still
searchable, but some types of search, such as PROPERTY, usually lock down
emacs and I'm forced to kill the process. Is there any way to speed it up?
Perhaps by compiling the elisp files to bytecode?

I'm on OSX Lion, emacs: GNU Emacs 23.4.1 (x86_64-apple-darwin, NS
apple-appkit-1038.36) of 2012-01-29 on bob.porkrind.org
M
orgmode: Org-mode version 7.9.1 (release_7.9.1-299-g08c5ea.dirty-git @
mixed installation! /Applications/Emacs.app/Contents/Resources/lisp/org/
and /Users/fullofcaffeine/.emacs.d/vendor/org/lisp/)
M

Any hints appreciated,

- Marcelo.


Re: [O] Random Access Node

2012-10-19 Thread Marcelo de Moraes Serpa
That'd be a nice feature, indeed.

On Thu, Oct 18, 2012 at 6:37 PM, Esben Stien  wrote:

> Is there some way to go directly to a node?
>
> F.ex, I have:
>
> * foo
> ** bar..
> ** baz..
> ** hukarz..
>
> I do C-c a s to search for baz, which brings up a buffer with baz
> somewhere in there and I have to move down the list to hit TAB on baz.
>
> Is there maybe some IDO magic or something similar which can take me
> there quicker?.
>
> Preferably, I'd like to do a regex on second level nodes and get
> instanly there.
>
> --
> Esben Stien is b0ef@e s  a
>  http://www. s tn m
>   irc://irc.  b  -  i  .   e/%23contact
>sip:b0ef@   e e
>jid:b0ef@n n
>
>


Re: [O] error in orgstruct-mode

2012-10-19 Thread Nick Dokos
Peter Salazar  wrote:

> Thanks. I tried upgrading my version of org to 7.9.2, but then whenever I 
> launched Aquamacs, I got
> this message:
> 
> Wrong type argument: integer-or-marker-p, nil
> 
> I couldn't save or do anything, so I went back to the old version. 
> 
> Anyone know the solution to the Wrong type argument: integer-or-marker-p, nil?
> 

Presumably something incompatible in your org initialization.
Does aquamacs allow for --debug-init? If not, then do the aquamacs
equivalent of -q, turn on debug-on-error, load your org initialization
by hand and send the backtrace.

Nick



Re: [O] error in orgstruct-mode

2012-10-19 Thread Peter Salazar
Thanks. I tried upgrading my version of org to 7.9.2, but then whenever I
launched Aquamacs, I got this message:

Wrong type argument: integer-or-marker-p, nil

I couldn't save or do anything, so I went back to the old version.

Anyone know the solution to the Wrong type argument: integer-or-marker-p,
nil?



On Fri, Oct 19, 2012 at 6:54 PM, Nick Dokos  wrote:

> Peter Salazar  wrote:
>
> > Oops. Here's the full backtrace. Anyone have any thoughts? Help!
> >
>
> >   org-maybe-renumber-ordered-list()
> >   org-insert-item()
> >   org-insert-heading(nil)
> >   call-interactively(org-insert-heading)
>
> Well, org-maybe-renumber-ordered-list was removed by this commit:
>
> ,
> | commit 15928db323904fe8c892d7289a0cdda89cde8694
> | Author: Nicolas Goaziou 
> | Date:   Mon Aug 30 13:55:44 2010 +0200
> |
> | Implement new list definition
> |
> | ...
> | * org-list.el (org-maybe-renumber-ordered-list): function removed.
> `
>
> so maybe it's time to upgrade.
>
> Nick
>


Re: [O] error in orgstruct-mode

2012-10-19 Thread Nick Dokos
Peter Salazar  wrote:

> Oops. Here's the full backtrace. Anyone have any thoughts? Help!
> 

>   org-maybe-renumber-ordered-list()
>   org-insert-item()
>   org-insert-heading(nil)
>   call-interactively(org-insert-heading)

Well, org-maybe-renumber-ordered-list was removed by this commit:

,
| commit 15928db323904fe8c892d7289a0cdda89cde8694
| Author: Nicolas Goaziou 
| Date:   Mon Aug 30 13:55:44 2010 +0200
| 
| Implement new list definition
| 
| ...
| * org-list.el (org-maybe-renumber-ordered-list): function removed.
`

so maybe it's time to upgrade.

Nick



Re: [O] error in orgstruct-mode

2012-10-19 Thread Peter Salazar
Oops. Here's the full backtrace. Anyone have any thoughts? Help!


Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  byte-code("\203
  \306\202
\307\310!\210m\203\311\312\306\"\210\313\314!\203!\311\315\306\"\210\316\306w\210i\211\nV\2032\311\315\317\"\210
\nW\203=\311\312\317\"\210\320
\204G\311\312\306\"\210\321\310!\310\224\310\225|\210\310\224b\210\322\f
T\211\"\211c\210G
GZ\323!\210\306\212\203{b\210n\203\203\324\202\204\325\326\324`\"\\*U\203\227\\\306\207"
[bobp ind1 ind old fmt n nil beginning-of-line 2 throw exit looking-at "[ ]*$"
next " " t org-at-item-p match-string format org-shift-item-indentation 1 0
count-lines new delta pos line col] 5)
  byte-code("\300\301\215\210\202" [next (byte-code "\203 \306\202
\307\310!\210m\203\311\312\306\"\210\313\314!\203!\311\315\306\"\210\316\306w\210i\211\nV\2032\311\315\317\"\210
\nW\203=\311\312\317\"\210\320
\204G\311\312\306\"\210\321\310!\310\224\310\225|\210\310\224b\210\322\f
T\211\"\211c\210G
GZ\323!\210\306\212\203{b\210n\203\203\324\202\204\325\326\324`\"\\*U\203\227\\\306\207"
[bobp ind1 ind old fmt n nil beginning-of-line 2 throw exit looking-at "[ ]*$"
next " " t org-at-item-p match-string format org-shift-item-indentation 1 0
count-lines new delta pos line col] 5)] 2)
  org-renumber-ordered-list(1)
  org-maybe-renumber-ordered-list()
  org-insert-item()
  org-insert-heading(nil)
  call-interactively(org-insert-heading)
  (let ((auto-fill-function ...) (indent-line-function ...)
(paragraph-start ...) (auto-fill-inhibit-regexp ...) (paragraph-separate
...) (outline-regexp ...) (outline-level ...) (org-todo-kwd-alist ...)
(org-todo-key-alist ...) (org-todo-key-trigger ...) (org-todo-keywords-1
...) (org-done-keywords ...) (org-todo-heads ...) (org-todo-sets ...)
(org-todo-log-states ...) (org-file-properties ...) (org-file-tags ...)
(org-ds-keyword-length ...) (org-drawer-regexp ...) (org-not-done-keywords
...) (org-todo-regexp ...) (org-not-done-regexp ...) (org-todo-line-regexp
...) (org-complex-heading-regexp ...) (org-complex-heading-regexp-format
...) (org-nl-done-regexp ...) (org-todo-line-tags-regexp ...)
(org-looking-at-done-regexp ...) (org-deadline-regexp ...)
(org-deadline-time-regexp ...) (org-deadline-line-regexp ...)
(org-scheduled-regexp ...) (org-scheduled-time-regexp ...)
(org-closed-time-regexp ...) (org-keyword-time-regexp ...)
(org-keyword-time-not-clock-regexp ...) (org-maybe-keyword-time-regexp ...)
(org-planning-or-clock-line-re ...) (org-latex-and-specials-regexp ...)
(org-font-lock-keywords ...) (org-table-may-need-update ...)
(comment-start-skip ...) (fill-paragraph-function ...)
(adaptive-fill-regexp ...) (adaptive-fill-function ...)
(org-target-link-regexp ...) (comment-padding ...)
(outline-isearch-open-invisible-function ...) (org-indent-mode ...)
(org-after-demote-entry-hook ...) ...) (call-interactively (quote
org-insert-heading)))
  eval((let ((auto-fill-function ...) (indent-line-function ...)
(paragraph-start ...) (auto-fill-inhibit-regexp ...) (paragraph-separate
...) (outline-regexp ...) (outline-level ...) (org-todo-kwd-alist ...)
(org-todo-key-alist ...) (org-todo-key-trigger ...) (org-todo-keywords-1
...) (org-done-keywords ...) (org-todo-heads ...) (org-todo-sets ...)
(org-todo-log-states ...) (org-file-properties ...) (org-file-tags ...)
(org-ds-keyword-length ...) (org-drawer-regexp ...) (org-not-done-keywords
...) (org-todo-regexp ...) (org-not-done-regexp ...) (org-todo-line-regexp
...) (org-complex-heading-regexp ...) (org-complex-heading-regexp-format
...) (org-nl-done-regexp ...) (org-todo-line-tags-regexp ...)
(org-looking-at-done-regexp ...) (org-deadline-regexp ...)
(org-deadline-time-regexp ...) (org-deadline-line-regexp ...)
(org-scheduled-regexp ...) (org-scheduled-time-regexp ...)
(org-closed-time-regexp ...) (org-keyword-time-regexp ...)
(org-keyword-time-not-clock-regexp ...) (org-maybe-keyword-time-regexp ...)
(org-planning-or-clock-line-re ...) (org-latex-and-specials-regexp ...)
(org-font-lock-keywords ...) (org-table-may-need-update ...)
(comment-start-skip ...) (fill-paragraph-function ...)
(adaptive-fill-regexp ...) (adaptive-fill-function ...)
(org-target-link-regexp ...) (comment-padding ...)
(outline-isearch-open-invisible-function ...) (org-indent-mode ...)
(org-after-demote-entry-hook ...) ...) (call-interactively (quote
org-insert-heading
  org-run-like-in-org-mode(org-insert-heading)
  (if (org-context-p (quote headline) (quote item) (and orgstruct-is-++ t
...)) (org-run-like-in-org-mode (quote org-insert-heading)) (let
(orgstruct-mode) (call-interactively ...)))
  orgstruct-hijacker-command-106(1)
  call-interactively(orgstruct-hijacker-command-106 nil nil)


On Thu, Oct 18, 2012 at 12:52 PM, Peter Salazar wrote:

> I'm using Aquamacs in markdown-mode with orgstruct-mode turned on.
>
> When I start a numbered list:
>
> 1. foo
>
> ...at the end of that line, I want to automatically generate 

Re: [O] Insert TODO Item at Bottom

2012-10-19 Thread John Hendy
One could use capture if always filing to the same basic tree. I
believe the default puts it at the end of the list, hence the
=:prepend= option.
-- http://orgmode.org/manual/Template-elements.html#Template-elements

I'm curious in this as well, as capture wouldn't work so well if
filing all over the place, though one could use refile in the capture
window to override the main tree setting.

My work org file has a main * Tasks heading as well as certain project
trees. I've sort of migrated to keeping almost all todos, regardless
of project in the main task tree, so perhaps you could setup a default
capture location for a majority of todos and then refile (which will
put it at the end) for the rest?

Just an idea.


John

On Fri, Oct 19, 2012 at 12:28 PM, Jeremiah Dodds
 wrote:
> "Sebastien Vauban"  writes:
>
>> Hi Esben,
>>
>> Esben Stien wrote:
>>> I add a TODO item with M-S-RET, but is there any way to insert the new
>>> TODO item at the bottom of the current node or is there any way to
>>> navigate quickly to the last TODO item of the current node?.
>>
>> An ECM (Minimal Complete Example) could eventually help here, to be sure you
>> describe your problem with no ambiguity.
>>
>>> I often run C-c a s to search, but I end up at the top and I always have
>>> to "scroll" down to the last TODO item; this is wasting my life
>>
>> If I understood correctly, just doing C-c C-n (next visible node) could help?
>> Or eventually C-c C-f followed by C-c C-p, if you have a problem because of
>> mixed levels (that is, next node of the same level, then back to previous
>> node, of whichever level).
>>
>
> I believe he's saying he has something like this, with point at "-!-" or
> similar:
>
> ,
> | * one -!-
> | ** TODO two
> | ** TODO three
> `
>
> and ideally wants to insert a new TODO item such that he gets:
>
> ,
> | * one
> | ** TODO two
> | ** TODO three
> | ** TODO four -!-
> `
>
>
> --
> Jeremiah Dodds
>
> blog   : http://jdodds.github.com
> github : https://github.com/jdodds
> freenode   : exhortatory
> twitter: kaens
>



Re: [O] Insert TODO Item at Bottom

2012-10-19 Thread Jeremiah Dodds
"Sebastien Vauban"  writes:

> Hi Esben,
>
> Esben Stien wrote:
>> I add a TODO item with M-S-RET, but is there any way to insert the new
>> TODO item at the bottom of the current node or is there any way to
>> navigate quickly to the last TODO item of the current node?.
>
> An ECM (Minimal Complete Example) could eventually help here, to be sure you
> describe your problem with no ambiguity.
>
>> I often run C-c a s to search, but I end up at the top and I always have
>> to "scroll" down to the last TODO item; this is wasting my life
>
> If I understood correctly, just doing C-c C-n (next visible node) could help?
> Or eventually C-c C-f followed by C-c C-p, if you have a problem because of
> mixed levels (that is, next node of the same level, then back to previous
> node, of whichever level).
>

I believe he's saying he has something like this, with point at "-!-" or
similar:

,
| * one -!-
| ** TODO two
| ** TODO three
`

and ideally wants to insert a new TODO item such that he gets:

,
| * one
| ** TODO two
| ** TODO three
| ** TODO four -!-
`


-- 
Jeremiah Dodds

blog   : http://jdodds.github.com
github : https://github.com/jdodds
freenode   : exhortatory
twitter: kaens



[O] org-export-region-as-latex skips header

2012-10-19 Thread Christopher Schmidt
Org-mode version 7.9.2 (release_7.9.2-52-g921998)

C-x b test RET
insert "* dub"
M-: (org-export-region-as-latex (point-min) (point-max) nil 'string) RET

org-export-region-as-latex returns

"\\section{dub}\n\\label{sec-1}\n\n\\end{document}\n"

This does not look right to me.  Where is the header?

Christopher



Re: [O] [new exporter] latex: why does {{}} become \{\{\}\} ?

2012-10-19 Thread Sebastien Vauban
Hi Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban"
>> Within a LaTeX block (#+begin_latex) or within a Babel block for LaTeX
>> language (#+begin_src latex)?  Do you make a difference?
>
> There's a big difference.
>
> #+begin_latex means "paste this code unmodified in the latex back-end,
> and only in the latex back-end". Nothing is evaluated.
>
> With a #+begin_src latex block, depending on :exports parameter, you can
> produce something (in this case, probably an image file) and create
> a link valid in any back-end, as long as it supports the file format.
>
> Both are possible.

I realize having taken the bad habit of only using #+begin_src latex blocks
even for code that only matters for the LaTeX back-end (such as TikZ
decorations). By carefully using the Babel options, it comes down to the same
effect/behavior, but, OK, that's NOT the Right Way To Do!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Counting total number of projects

2012-10-19 Thread Phil Mason
Hi Chris,

> Is there any way to calculate total number of projects in real-time such that,

If you don't mind marking your projects as TODO then you can use statistics 
cookies like this:

* Projects [%] [/]
** TODO project 1
   + foo
** DONE project 2
   + bar
** TODO project 3
   + baz
** TODO project 4
   + qux

And then the projects line should show (4 projects, 3 in progress, 1 completed):

* Projects [25%] [1/4]

There is more on the checkboxes page of the manual here:

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

I tend to have todo lists for each projects so I need the recursive property 
after the projects line like this:

* Projects [%] [/]
:PROPERTIES:
:COOKIE_DATA: recursive
:END:
** TODO project 1
...

Hope this helps

Phil



Re: [O] Problem with hourly repeater

2012-10-19 Thread Memnon Anon
Hi Nicolas,

Nicolas Goaziou  writes:

> Yes, I confirm the bug.
>
> Would you mind testing the following patch and tell me if it fixes the
> problem without adding unwanted side-effects?

I've been testing the patch for a couple of days now.
No unwanted side-effects as far as I can tell. The error is gone, too.

There are some other small issues with hourly repeaters, I will try to
sum them up soon.

Memnon



Re: [O] Counting total number of projects

2012-10-19 Thread Sebastien Vauban
Hi Chris,

Chris Henderson wrote:
> I have my projects like,
>
> * Projects
> ** project 1
> ** project 2
>
> Is there any way to calculate total number of projects in real-time such that,
>
> * Projects (2)
> ** project 1
> ** project 2
>
> This would be really beneficial to see how many running projects I
> have at the moment. At the moment, I am counting this manually which
> is slow and error-prone.

That's more or less what I proposed in a slightly different context: in the
custom agenda views.

See patch in 
http://lists.gnu.org/archive/html/emacs-orgmode/2012-10/msg00014.html.

That said, I would as well consider that as a benefit, to get such info in the
Org buffers as well.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] how to insert footnotes

2012-10-19 Thread Manish
On Fri, Oct 19, 2012 at 2:39 PM, Supriya Sawant
wrote:
>
>
>
> hello,
>
> I am new to emacs.I went through org-mode manual, but I am not getting how
> to insert footnotes.
>
> eg: [1] should link to http://orgmode.org
>
> can anyone please help me out...
>

Try:

M-x org-footnote-action

or

C-h f org-footnote-action

HTH
-- 
Manish



Re: [O] Insert TODO Item at Bottom

2012-10-19 Thread Sebastien Vauban
Hi Esben,

Esben Stien wrote:
> I add a TODO item with M-S-RET, but is there any way to insert the new
> TODO item at the bottom of the current node or is there any way to
> navigate quickly to the last TODO item of the current node?.

An ECM (Minimal Complete Example) could eventually help here, to be sure you
describe your problem with no ambiguity.

> I often run C-c a s to search, but I end up at the top and I always have
> to "scroll" down to the last TODO item; this is wasting my life

If I understood correctly, just doing C-c C-n (next visible node) could help?
Or eventually C-c C-f followed by C-c C-p, if you have a problem because of
mixed levels (that is, next node of the same level, then back to previous
node, of whichever level).

All of this can be simplified if you use speed commands (*if you're on
headlines, in column 0*): f p would replace the last key bindings above.

Best regards,
  Seb
-- 
Sebastien Vauban