Re: [O] problem with org-element-parse-buffer

2012-11-24 Thread Peter Münster
On Mon, Nov 12 2012, Nicolas Goaziou wrote:

 * TODO test
   bla bla bla
   DEADLINE: 2012-11-08 Thu 12:17

 In Org, planning info (scheduled, deadline, and closed) must be put just
 after the headline. Your example isn't valid.

Then, org-agenda should ignore that too, shouldn't it?

-- 
   Peter




Re: [O] problem with org-element-parse-buffer

2012-11-24 Thread Nicolas Goaziou
Peter Münster pmli...@free.fr writes:

 On Mon, Nov 12 2012, Nicolas Goaziou wrote:

 In Org, planning info (scheduled, deadline, and closed) must be put just
 after the headline. Your example isn't valid.

 Then, org-agenda should ignore that too, shouldn't it?

Strictly speaking, yes. But Org Agenda is a bit permissive (and not only
for that thing). Do you want to help basing Agenda on Elements?


Regards,

-- 
Nicolas Goaziou



Re: [O] org-agenda-ignore-scheduled not taken into account in custom agenda blocks?

2012-11-24 Thread Bernt Hansen
Alan Schmitt alan.schm...@polytechnique.org writes:

 Hello,

 I'm implementing some of the ideas of the great norang page
 (http://doc.norang.ca/org-mode.html), but there is one thing that is
 failing me. I can see that org-agenda-ignore-scheduled work for the
 global todo list, but it does not seem to be working when using a custom
 block. For instance, using the following definition:

 #+BEGIN_SRC elisp
 (tags-todo -WAITING-CANCELLED/!NEXT
((org-agenda-overriding-header Next Tasks)
 (org-agenda-skip-function 
 'bh/skip-projects-and-habits-and-single-tasks)
 (org-agenda-todo-ignore-scheduled t)
 (org-agenda-todo-ignore-deadlines t)
 (org-agenda-todo-ignore-with-date t)
 (org-tags-match-list-sublevels t)
 (org-agenda-sorting-strategy
  '(todo-state-down effort-up category-keep
 #+END_SRC

 I still see scheduled tasks.

 Is it supposed to be working or am I doing it wrong?

Hi Alan,

This works for me (as part of my custom agenda block)
I just created a new test project

--8---cut here---start-8---
* TODO New test task
[2012-11-24 Sat 11:00]
** NEXT DO this next week
SCHEDULED: 2012-12-01 Sat
[2012-11-24 Sat 11:00]
--8---cut here---end---8---

I tested it first without the NEXT task scheduled to next week and the
DO this next week is in the NEXT list.  After adding the SCHEDULED
date it is no longer on the NEXT list.  If I schedule it into the past
it only shows up on the daily agenda and not in the NEXT list.

Regards,
Bernt



Re: [O] org-agenda-ignore-scheduled not taken into account in custom agenda blocks?

2012-11-24 Thread Bernt Hansen
Alan Schmitt alan.schm...@polytechnique.org writes:

 I decided to dig into this, and it's not a bug. One should set:

 (setq org-agenda-tags-todo-honor-ignore-options t)

 The trick was that these blocks were tag searches.

Ah yes I'd forgotten about this variable - it's been set for ages in my
configuration.  tags-todo agenda searches are TAGS searches restricted
to headings with non-done TODO states.  So you need this variable set to
ignore the scheduled tasks.

I'm glad you figured it out :)

Regards,
Bernt



Re: [O] forward to the past ... Rounding timeclock

2012-11-24 Thread Bernt Hansen
Kevin Buchs kevin.buchs.j...@gmail.com writes:

 (By the way, what is the best way (right way) to produce a patch
 listing? This was all I could come up with).

http://orgmode.org/worg/org-contribute.html#sec-4

Regards,
Bernt




[O] Howto convert a complete bibtex file into an orgmode file?

2012-11-24 Thread michael . zombok
Hello,

I want to migrate all my research papers and references to orgmode, but
I was not able to figure out howto read/convert an existing bibtex file
(say literatur.bib) to an orgmode file (say literature.org) where each
entry from literatur.bib gets an heading in literatur.org with
attributes corresponding to the stuff from the bibtex entry in
literatur.bib.

As far as I was able to find out, this is only possible for a single
entry via 'org-bibtex-read'.

Is there something like 'org-bibtex-read' for a whole file?

Thanks in advance!

Best,
Michael




Re: [O] org-link and gnus-registry

2012-11-24 Thread Sven Bretfeld
Hi Alan

Thanks for your answer.

Alan Schmitt alan.schm...@polytechnique.org writes:

 Sven Bretfeld sven.bretf...@gmx.ch writes:

 As was discussed before in this list, gnus-register is the way to do
 this. Otherwise org-link will not find the message after it has gone to
 another group. 

 This is not working for me. It might have to do with how org-store-links
 creates the link. For me the links look like this:

 [[gnus:Stuff#blu162-ds55e622a1ef424d0bd1f57c9...@phx.gbl][Email from
 Yongbin: Re: Visit]]

 Stuff is the name of my INBOX. This means the message-ID contains the
 name of the original group. If the message is moved to another group, it
 won't be found. It seems that either org-store-link or org-follow-link
 does not respect gnus-registry.

 I cannot find the mistake. Can somebody help me?

 I'm having very mixed results with gnus-registry, and I'm still looking
 for a better solution. In the meantime:
 - make sure the message is moved from inside gnus, it seems it's
 required to be tracked by the registry;

Yes, that's given. I don't use any other client.

 - if you cannot get to the message, try to search for it (I use notmuch,
 which works nicely), figure out the mailbox name, and you can then
 manually fix the link by changing the mailbox name there. I use stable
 mailboxes for this: archive is for the current month, otherwise the
 message is in old/year/month. Searches and links let me get to
 messages really easily.

Hmm. This would annihilate the effect, right? It is like not using
gnus-registry at all and just change all links manually. I still have
the feeling that gnus-registry doesn't work at all for me. The cache
file is there (~/Mail/.gnus-registry.eld) and it updates regularly. Only
the org-links don't seem to care about message-IDs.

Sven

-- 
Prof. Dr. Sven Bretfeld
  \ CEntrum für
CERES  \ REligionswissenschaftliche
\_Studien__
Ruhr-Universität Bochum
Universitätsstraße 150
D-44780 Bochum
http://www.ceres.ruhr-uni-bochum.de/en/participants/details/sven-bretfeld/



Re: [O] refiling, ido-mode, and creating projects

2012-11-24 Thread Bernt Hansen
Alan Schmitt alan.schm...@polytechnique.org writes:

 I found out that using ido-mode is very useful for refiling. However
 there is one thing I don't know how to do: how to create a parent node
 in this setup.

 Here is my configuration (straight from the usual
 http://doc.norang.ca/org-mode.html)

 #+BEGIN_SRC elisp
 ; Use full outline paths for refile targets - we file directly with IDO
 (setq org-refile-use-outline-path t)

 ; Targets complete directly with IDO
 (setq org-outline-path-complete-in-steps nil)

 ; Allow refile to create parent tasks with confirmation
 (setq org-refile-allow-creating-parent-nodes (quote confirm))

 ; Use IDO for both buffer and file completion and ido-everywhere to t
 (setq org-completion-use-ido t)
 (setq ido-everywhere t)
 (setq ido-max-directory-size 10)
 (ido-mode (quote both))
 #+END_SRC

 Let's say I already have an entry Work/Trips and I want to refile some
 task to a new Paris project under Trips. If I C-c C-w and type
 Trips, I can see that the entry is selected. However, I don't know how
 to say select this entry and let me type some more to add to it. If I
 continue typing /Paris I get a no match and an error
 org-refile-check-position: Please save the buffer to a file before
 refiling (which probably happens because I'm inside the agenda, and the
 refiling target Trpis/Paris makes no sense).

 I tried doing a C-f as when using ido with find-file, but it does not
 do anything.

 Any suggestion?

I haven't been able to make this work with my setup after switching to
IDO.  My current workaround is visit the target with C-u C-c C-w and
create the new target heading, then return and refile to that -- but
it's not very elegant.

My attempts are refiling and creating with IDO give the following error:


--8---cut here---start-8---
Debugger entered--Lisp error: (error Please save the buffer to a file before 
refiling)
  signal(error (Please save the buffer to a file before refiling))
  error(Please save the buffer to a file before refiling)
  (if (and (not ...) (not file)) (error Please save the buffer to a file 
before refiling) (when (org-string-nw-p re) (setq buffer ...) 
(with-current-buffer buffer ...)))
  (let* ((file ...) (re ...) (pos ...) buffer) (if (and ... ...) (error Please 
save the buffer to a file before refiling) (when ... ... ...)))
  org-refile-check-position(nil)
  (let* ((cbuf ...) (partial-completion-mode nil) (cfn ...) (cfunc ...) (extra 
...) (cbnex ...) (filename ...) (tbl ...) (completion-ignore-case t) cdef 
(prompt ...) pa answ parent-target child parent old-hist) (setq old-hist 
org-refile-history) (setq answ (funcall cfunc prompt tbl nil ... nil ... ...)) 
(setq pa (or ... ...)) (org-refile-check-position pa) (if pa (progn ... pa) (if 
... ... ...)))
  org-refile-get-location(Refile subtree \Respond to Julien Cubizolles 
j.cubizol...@free.fr on Re: org-agenda-ignore-scheduled not taken into 
account in custom agenda blocks?\ to nil confirm nil)
  (save-excursion (unless goto (org-back-to-heading t) (setq heading-text ...)) 
(org-refile-get-location (cond ... ... ...) default-buffer (and ... 
org-refile-allow-creating-parent-nodes) goto))
  (let (heading-text) (save-excursion (unless goto ... ...) 
(org-refile-get-location ... default-buffer ... goto)))
  (or rfloc (let (heading-text) (save-excursion ... ...)))
  (setq it (or rfloc (let ... ...)))
  (or (and (equal goto 2) org-clock-hd-marker (marker-buffer 
org-clock-hd-marker) (prog1 ... ...)) (setq it (or rfloc ...)))
  (if (or (and ... org-clock-hd-marker ... ...) (setq it ...)) (progn (setq 
file ... re ... pos ...) (if ... ...) (setq nbuf ...) (if goto ... ... ... ... 
... ... ...)))
  (when (or (and ... org-clock-hd-marker ... ...) (setq it ...)) (setq file 
(nth 1 it) re (nth 2 it) pos (nth 3 it)) (if (and ... pos ... ...) (error 
Cannot refile to position inside the tree or region)) (setq nbuf (or ... 
...)) (if goto (progn ... ... ...) (if regionp ... ...) (with-current-buffer 
... ... ...) (unless org-refile-keep ...) (when ... ...) (setq 
org-markers-to-move nil) (message ... ... file)))
  (if (equal goto (quote ...)) (org-refile-goto-last-stored) (when (or ... ...) 
(setq file ... re ... pos ...) (if ... ...) (setq nbuf ...) (if goto ... ... 
... ... ... ... ...)))
  (let* ((actionmsg ...) (cbuf ...) (regionp ...) (region-start ...) 
(region-end ...) (region-length ...) (filename ...) pos it nbuf file re level 
reversed) (setq last-command nil) (when regionp (goto-char region-start) (or 
... ...) (setq region-start ...) (unless ... ...)) (if (equal goto ...) 
(org-refile-goto-last-stored) (when ... ... ... ... ...)))
  (if (member goto (quote ...)) (org-refile-cache-clear) (let* (... ... ... ... 
... ... ... pos it nbuf file re level reversed) (setq last-command nil) (when 
regionp ... ... ... ...) (if ... ... ...)))
  org-refile(nil)
  call-interactively(org-refile nil nil)
--8---cut here---end---8---

Re: [O] problem with org-element-parse-buffer

2012-11-24 Thread Peter Münster
On Sat, Nov 24 2012, Nicolas Goaziou wrote:

 Do you want to help basing Agenda on Elements?

No, sorry. I don't use the agenda, I prefer push to poll. That's why I
wrote org-notify.el.

Anyway, the syntax highlighting is a bit permissive too...

-- 
   Peter




Re: [O] Generic Source block language specification?

2012-11-24 Thread Nicolas Goaziou
Hello,

Jambunathan K kjambunat...@gmail.com writes:

 Rainer M Krug r.m.k...@gmail.com writes:

 Hi

 I have in a document a definition of a projection, which is essentially a 
 text as follow:

 #+BEGIN_src
   +proj=aea +lat_1=-28.25
   +lat_2=-29.75
   +lat_0=29
   +lon_0=30.75
   +x_0=0
   +y_0=0
   +datum=WGS84
   +units=m
   +no_defs
 #+END_src

 Now this does obviously not export, as the source block language is missing. 
 Is there a way that I
 can get the same formating of the source in the exportes output but without 
 the syntax highlighting?

 BEGIN_EXAMPLE
 END_EXAMPLE

 is similar, but I would like the block to be formated as the SRC
 blocks.

 Marking the src block as `fundamental' has a drawback.  One can no
 longer have in-buffer fontification of src blocks.

 A better option would be to have a custom variable which produces
 black-and-white src blocks on export.  

 ODT already has this option.

 C-h v org-e-odt-fontify-srcblocks RET

 I am CCing Nicolas, to check whether he would be interested in
 introducing an export knob for this.

I still don't get what is wrong with example blocks (wrt export). Would
someone care to elaborate?


Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] [new exporter] export of inline babel calls confused

2012-11-24 Thread Nicolas Goaziou
Hello,

Eric S Fraga e.fr...@ucl.ac.uk writes:

 in trying to see if I could replicate a problem with disappearing src
 code blocks, I have run into problems with the new exporter.  The
 attached minimal example generates a very strange convoluted latex
 output (also attached).

 The old exporter doesn't do a perfect job but comes a lot closer!

This bug should be squashed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou



Re: [O] Exclude all TODO keywords from refile targets

2012-11-24 Thread Jason Dunsmore
On Sat, Nov 24, 2012 at 1:22 AM, Bernt Hansen be...@norang.ca wrote:
 Jason Dunsmore jasondunsm...@gmail.com writes:

 I found a bit of code to exclude DONE keywords from refile targets
 here: http://orgmode.org/worg/org-hacks.html#sec-2-3

 Since I try to keep all headings with keywords as end nodes, I wanted
 to exclude all TODO (and DONE) keywords.  However, the member function
 doesn't work on a sequence data type, so I couldn't use
 org-todo-keywords the same way the org-hacks code used
 org-done-keywords.  Furthermore, org-todo-keywords contains extraneous
 characters in parenthesis that define selection characters.  I ended
 up creating a new variable, org-todo-keywords-list, and converting the
 data from org-todo-keywords into a similar format as
 org-done-keywords.

 Perhaps a org-todo-keywords-list variable would be a useful addition
 to org-mode.  Here's the code I'm using:

 (setq org-todo-keywords '((sequence TODO(t) DELEGATE(l)
 STARTED(s@) WAITING(w@) | DONE(d) CANCELLED(c)
 DELEGATED(e@) POSTPONED(p@


 You should be able to use org-todo-keywords-1 which contains a list of
 todo keywords for the current org file.

That works perfectly.  Thank you.



Re: [O] problem with org-element-parse-buffer

2012-11-24 Thread Eric Abrahamsen
Nicolas Goaziou n.goaz...@gmail.com writes:

 Peter Münster pmli...@free.fr writes:

 On Mon, Nov 12 2012, Nicolas Goaziou wrote:

 In Org, planning info (scheduled, deadline, and closed) must be put just
 after the headline. Your example isn't valid.

 Then, org-agenda should ignore that too, shouldn't it?

 Strictly speaking, yes. But Org Agenda is a bit permissive (and not only
 for that thing). Do you want to help basing Agenda on Elements?

This is something I was wondering about -- so that is the plan
eventually? This is something I've wanted for a while, as it would make
some of my little personal projects a lot easier. I'd be happy to help
if there's a roadmap, and if I can be fed bite-sized problems to deal
with.

E