Commit Graph

5498 Commits

Author SHA1 Message Date
Eric Schulte 05ac8eb8a8 babel: ensuring each language defined (possibly empty) default header arguments
this makes customization easier when users can assume that
  org-babel-default-header-args:foo will exist for every language
2010-06-25 10:12:54 -07:00
Eric Schulte b2dcd211f1 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-25 09:34:58 -07:00
Eric Schulte 670b9899b9 babel: assigning copyright to the FSF for babel language files 2010-06-25 09:32:35 -07:00
Carsten Dominik 312081b376 More tweaks at the capture documentation 2010-06-25 18:28:04 +02:00
Eric Schulte ae98b23ab9 babel: assigning copyright to the FSF for core babel files 2010-06-25 09:20:39 -07:00
Carsten Dominik 808115a4cf Document org-capture in the guide 2010-06-25 17:54:48 +02:00
Carsten Dominik 9bf78c7db4 Point to a PDF copy of the old org-remember documentation 2010-06-25 17:32:29 +02:00
Carsten Dominik 8f83ac51ee Add documentation for capture 2010-06-25 16:40:47 +02:00
Carsten Dominik 7f21f76d5e fix typo 2010-06-25 10:01:23 +02:00
Carsten Dominik eae7ccd5b0 Augment the acknowledgements to reflect the addition of Org Babel 2010-06-25 09:51:57 +02:00
Carsten Dominik 6724bcfa94 Clean up org-babel documentation
Patch by Thomas S. Dye
2010-06-25 09:09:34 +02:00
Carsten Dominik 7100bbea61 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-25 09:03:16 +02:00
Carsten Dominik a547c1048b Fix issue with turning off ORDERED property
* lisp/org-macs.el (org-not-nil): New function.
* lisp/org.el (org-block-todo-from-children-or-siblings-or-parent):
Use `org-not-nil' to interpret a property value of nil.

Robert Goldman writes:

> I have found what I believe to be a bug in handling ordered subtasks.
> Here is the behavior:
>
> I have a top level set of tasks that is ordered.
>
> One of the outline items below the top level set is a grab bag of tasks
> that will be performed in parallel.  So this task is NOT ordered
> (ORDERED: nil).
>
> The problem is that the blocking behavior from ordered tasks seems to be
> inherited from the top level task list into the second level of the
> outline, even though the ORDERED property at the second level is
> explicitly overridden.
>
> I am attaching an org file that displays this issue.  To see the
> problem, put your cursor on the "Bar" task and attempt to change its
> status to DONE.

The problem was here that the value of the property is the string
"nil", which is of course not nil.

This patches introduces a special case to interpret "nil" as nil.
2010-06-25 09:01:40 +02:00
Carsten Dominik 732884dbeb Fix the behavior of C-a when visible-mode is active
* lisp/org.el (org-truely-invisible-p): New function.
(org-beginning-of-line): Use `org-truely-invisible-p'.

Sebastien Vauban writes:

> I'm reporting some movement problem I've observed. When on any line, let's say
> the last clock one:
>
> - `C-e' moves the cursor to the end of it
> - `C-a' moves the cursor at the level of `LOGBOOK'.
>
> --8<---------------cut here---------------start------------->8---
> **** Emails and News
>     :PROPERTIES:
>     :ID:       62849012-ae7a-4885-a552-b34516d3fd06
>     :Effort:   1:00
>     :END:
>     :LOGBOOK:
>     CLOCK: [2010-06-01 Tue 08:35]--[2010-06-01 Tue 09:20] =>  0:45
>     CLOCK: [2010-06-02 Wed 09:10]--[2010-06-02 Wed 10:20] =>  1:10
>     CLOCK: [2010-06-03 Thu 09:25]--[2010-06-03 Thu 10:20] =>  0:55
>     CLOCK: [2010-06-04 Fri 09:00]--[2010-06-04 Fri 10:00] =>  1:00
>     CLOCK: [2010-06-07 Mon 09:05]--[2010-06-07 Mon 10:25] =>  1:20
>     CLOCK: [2010-06-08 Tue 09:05]--[2010-06-08 Tue 10:30] =>  1:25
>     CLOCK: [2010-06-09 Wed 09:05]--[2010-06-09 Wed 10:20] =>  1:15
>     CLOCK: [2010-06-10 Thu 09:05]--[2010-06-10 Thu 10:20] =>  1:15
>     CLOCK: [2010-06-11 Fri 09:15]--[2010-06-11 Fri 10:00] =>  0:45
>     CLOCK: [2010-06-14 Mon 09:15]--[2010-06-14 Mon 10:10] =>  0:55
>     :END:
> --8<---------------cut here---------------end--------------->8---
>
> This is -- at least -- true whenever `M-x visible-mode' is enabled.
2010-06-25 08:23:25 +02:00
Carsten Dominik ae20361475 Fix the clock target for org-capture 2010-06-25 07:29:13 +02:00
Eric Schulte a969714755 babel: emacs-lisp no longer evaluates header argument references multiple times
* lisp/babel/langs/ob-emacs-lisp.el
  (org-babel-expand-body:emacs-lisp): removed extra call to
  `org-babel-process-params' which was causing referenced code blocks
  to be run multiple times

  (org-babel-execute:emacs-lisp): now passing processed-params through
  to `org-babel-expand-body:emacs-lisp' which keeps references from
  being evaluated multiple times
2010-06-24 14:05:34 -07:00
Carsten Dominik 08f8875ecd Catch agenda error when there is a tie stamp before the first headline
* lisp/org-agenda.el (org-agenda-get-timestamps): No errors
while getting TODO state.
(org-agenda-highlight-todo): No error when no keyword has
been matched.

Eric Arneson writes:

> I've discovered a bug in `org-agenda-get-timestamps' wherein an active
> timestamp before the first headline causes it to fail.  I realize that
> this is probably an error in my use of active timestamps, but there was
> no really handy error message and this bugged me for weeks.
>
> I'm not familiar enough with org-mode to know what the correct behavior
> should be here (it'd be nice to get an error message saying "Don't use
> active timestamps that way!"), but here's an example .org file that will
> trigger the bug:
>
> --8<---------------cut here---------------start------------->8---
> #+BEGIN: clocktable :maxlevel 3 :scope today
> Clock summary at [2010-06-20 Sun 13:09]
>
> | L | Headline                              | Time   |
> |---+---------------------------------------+--------|
> |   | *Total time*                          | *0:13* |
> |---+---------------------------------------+--------|
> | 1 | Track down funky bug <2010-06-20 Sun> | 0:13   |
> #+END:
>
> * Track down funky bug <2010-06-20 Sun>
>  :LOGBOOK:
>  CLOCK: [2010-06-20 Sun 12:43]
>  CLOCK: [2010-06-20 Sun 12:30]--[2010-06-20 Sun 12:43] =>  0:13
>  :END:
> --8<---------------cut here---------------end--------------->8---
>
> I hope this can help somebody else track down the right place to fix
> this bug.
2010-06-24 08:53:34 +02:00
Carsten Dominik 1fc1dc389b Make sure the clock history only points to base buffers 2010-06-24 07:39:10 +02:00
Carsten Dominik e6182995d9 Skip template selection if there is only a single template 2010-06-24 07:17:54 +02:00
Eric Schulte 024974299c babel: updating documentation for new babel 'ob* require syntax
Thanks to Bernt Hansen for pointing this out

* doc/org.texi (Languages): updating require statements for the next
  org-babel syntax

  (Batch execution): updating require statements for the next
  org-babel syntax
2010-06-23 17:27:23 -07:00
Eric Schulte ec8edda165 babel: ob-oz is now up to date with the new naming schema
* contrib/babel/langs/ob-oz.el (ob-oz): brought ob-oz up to date with
  new naming schema
2010-06-23 16:40:48 -07:00
Eric Schulte b6e9c6a996 babel: variables can now accept null literal values
* lisp/babel/ob-exp.el (org-babel-exp-results): now checking to see if
  return value of `org-babel-ref-literal' is equal to the null
  indicator flag -- meaning it's now possible to accept a value of
  null

* lisp/babel/ob-ref.el (org-babel-ref-parse):  now checking to see if
  return value of `org-babel-ref-literal' is equal to the null
  indicator flag -- meaning it's now possible to accept a value of
  null

  (org-babel-ref-literal): now returning a null indicator flag when
  the value is *not* a literal value, meaning it is possible to pass
  in a literal value of null
2010-06-23 15:57:38 -07:00
Eric Schulte 6da29f1519 integrating org-babel into org.el 2010-06-23 13:41:20 -07:00
Eric Schulte 3beba02e1e Merged w/master 2010-06-23 11:20:49 -07:00
Carsten Dominik 92d69c7cf7 Keep byte compiler happy 2010-06-23 17:41:24 +02:00
Carsten Dominik a46e01358e Org Capture: Make ?q abort, and allow to specify the line position in table 2010-06-23 17:16:44 +02:00
Carsten Dominik fb46cf11d3 Make the link properties from org-protocol work in capture 2010-06-23 16:21:22 +02:00
Sebastian Rose 99e7f33f0a New implementation of the Org remember process ready for comments and testing
Carsten Dominik <carsten.dominik@gmail.com> writes:
> 3 Why a new name?
> ~~~~~~~~~~~~~~~~~~
>
>   I have - at least for now - chosen a new name for the new setup:
>  ` org-capture'.  There are two reasons for this:

In the manual it is "Capture - Refile - Archive".  I remember searching
for "Remember" and never found it :)

> 5 Setup
> ~~~~~~~~
>
>   To use the new setup, do the following:
>
>   1. Run
>
>      M-x org-capture-import-remember-templates RET

Worked perfectly here :)

I tested all my important templates and they work.
Abandoning org-remember seems painless.

>    '(("t" "templates adding table lines")
>      ("ta" "add to table a" table-line (file+headline "~/notes.org" "Table A))
>      ("tb" "add to table b" table-line (file+headline "~/notes.org" "Table B))
>      ("tc" "add to table c" table-line (file+headline "~/notes.org" "Table C)))
>
>    When starting capture, you can then first press "t" and then see
>    the individual options.

This is great.  Number of templates is constantly growing and the new
features will increase the speed of this process.

> 7 Request for comments
> ~~~~~~~~~~~~~~~~~~~~~~~
>
> None of what I describe is set in stone yet - let me know if you have
> comments, change requests or other ideas.
>
> My feeling right now is that this should become the default capture
> system, and that we will keep the current org-remember in the
> distribution for quite some time, for compatibility.

Good track I guess.

Here's the tested and working patch for org-protocol.el.

To use `org-remember' and/or `org-capture' alike, copy your org-remember
link and change

   javascript:location.href='org-protocol://remember://'+...

to

   javascript:location.href='org-protocol://capture://'+...

The template char used is the same for both --- which is OK for me, but
could be changed.
2010-06-23 16:05:33 +02:00
Carsten Dominik c303801202 Fix typo 2010-06-23 13:26:58 +02:00
Carsten Dominik 94e76bd7e2 Remove forgotten (debug) form 2010-06-23 10:37:11 +02:00
Carsten Dominik fab06f5463 Implement aborting a capture note with `C-c C-k' 2010-06-23 10:36:42 +02:00
Carsten Dominik 85e6bb964d Improve importing of remember templates into org-capture
Tassilo Horn had set org-remember-default-headline to `bottom', and
the importer did not handle this special case.
2010-06-23 08:41:14 +02:00
Carsten Dominik 19602fa56e Fix minor bugs in org-capture.el, and keep byte-compiler happy 2010-06-23 07:39:56 +02:00
Carsten Dominik 9f4452f43c Add org-capture.el and org-mks.el to the Makefile 2010-06-23 06:37:54 +02:00
Carsten Dominik 2ea8652235 Minor fixes to org-capture.el 2010-06-23 06:24:26 +02:00
Eric Schulte 3429a496a3 merged with master 2010-06-22 11:55:19 -07:00
Eric Schulte b816a85ac0 babel: wrapped `org-babel-params-from-buffer' in `save-match-data'
* lisp/babel/ob.el (org-babel-params-from-buffer): wrapped in
  save-match-data
2010-06-22 11:46:49 -07:00
Carsten Dominik 80bcadf605 Fix behavior of org-timestamp-change for explicit number of day changes
* lisp/org.el (org-timestamp-change): New optional argument UPDOWN.
Use this to identify calls from org-timestamp-up/down, so that we can
skip by rounding minutes in this case.
(org-timestamp-up):
(org-timestamp-down):
(org-timestamp-up-day):
(org-timestamp-down-day): Call org-timestamp-change with the
updown argument.

This function used to look only if there was a prefix argument in the
current interactive call.  Now we have an explicit marker indicating
that the function is called from the updown commands.
2010-06-22 16:14:55 +02:00
Carsten Dominik 80531d8d71 * contrib/lisp/org-special-blocks.el
(org-special-blocks-convert-latex-special-cookies): Allow arguments to
TeX macros
2010-06-22 14:51:48 +02:00
Carsten Dominik 36b6471858 Merge branch 'improve-todo-match-documentation' 2010-06-22 14:47:45 +02:00
Carsten Dominik 2e73ce2177 Clarify that TODO matches only match not-DONE states by default
Bernt Hansen writes:

> I was talking to Jeff Stern about tags todo matching offlist and we
> think the documentation for tags-todo matching can probably be improved.
>
> The description of C-c a M at
> http://orgmode.org/manual/Matching-tags-and-properties.html
> states
>
> C-c a M
>
>    Like C-c a m, but only select headlines that are also TODO items and
>    force checking subitems (see variable
>    org-tags-match-list-sublevels). To exclude scheduled/deadline items,
>    see the variable org-agenda-tags-todo-honor-ignore-options. Matching
>    specific TODO keywords together with a tags match is also possible,
>    see Tag searches.
>
> When I read this I think TODO items is any todo keyword but this isn't
> the case.  It is only non-done TODO state keywords.  This makes
> tags-todo matching not work for finding tasks to archive (normally
> DONE | CANCELLED keywords in my setup)
>
> Should we explicitly state that 'headlines that are also TODO items'
> does not match DONE state keywords?  Or alternatively should TODO items
> and DONE items be separate (and explicitly defined) in the documentation
> -- like org-todo-keywords and org-done-keywords?
>
> I still think 'TODO keyword' matches any todo keyword defined in
> org-todo-keywords and maybe I need to be re-educated :)

Bernt is right, and this patch tries to clarify the issue.
2010-06-22 14:47:37 +02:00
Carsten Dominik b67492596a Merge Glen Morris' change from downstream Emacs 2010-06-22 14:42:45 +02:00
Carsten Dominik 0c4e2ab0ed Add autoloads for org-capture 2010-06-22 14:29:13 +02:00
Carsten Dominik 1d52e54efd New capture system org-capture
* lisp/org-agenda.el (org-agenda-action): Make `c' key call org-capture.
* lisp/org-capture.el: New file.
* lisp/org-compat.el (org-get-x-clipboard): Function moved here from
remember.el.
* lisp/org-mks.el: New file
* lisp/org.el (org-set-regexps-and-options): Allow statistic cookies as
part of complex headlines.
(org-find-olp): New argument THIS-BUFFER.  When set, assume that the
OLP does not contain a file name.
2010-06-22 14:19:18 +02:00
Carsten Dominik eade8e6fa3 Revert "* lisp/org-agenda.el (org-agenda-get-deadlines):"
This reverts commit 14b689946d.

See discussion in

   http://thread.gmane.org/gmane.emacs.orgmode/26154/focus=26400
2010-06-21 15:18:36 +02:00
Carsten Dominik af90fb1e4c Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-18 09:51:36 +02:00
Carsten Dominik 42ea7d35b7 No longer define comments in the syntax table
* lisp/org.el (org-mode): Set `comment-start' instead of changing the
syntax of the `#' character.

Leo writes:

> Setting a comment starter without a corresponding comment ender is
> problematic and the # creeps in mysteriously under auto-fill. For
> example, in my current running emacs, this happens almost certainly in
> all org files that has # in their header. The only (temporary) solution
> seems to reboot emacs (which is painful and disruptive).
>
> If you try eval (forward-comment 1) at the beginning of an org file that
> has some "#+..." it will move to the end of file (the whole file is
> regarded as one single comment). So when auto-fill a long text, it will
> find the common prefix to be #.
>
> In addition, I don't think org mode has clear comment syntax or ideas on
> what to do with it.
>
> I can't see any gain from (modify-syntax-entry ?# "<") so I am proposing
> removing it entirely and get rid of this mysterious and annoying bug
> once and for all.
>
> The attached patch may (though I think it is quite safe) cause some bugs
> but those will be fixable unlike the one mentioned above.
>
> Best wishes,
>
> Leo
2010-06-18 09:10:44 +02:00
Carsten Dominik c201da51b8 Fix source code example bug with plain list export to HTML
* lisp/org-exp.el (org-export-format-source-code-or-example): Mark examples
by a property. o
* lisp/org-html.el (org-export-html-close-lists-maybe): Check if raw
HTML stuff was actually made from an example

Daniel Mahler writes:

> 2. I would like to embed source blocks in numbered lists, without
> breaking the numbering ie:
>
>    1) get ready
>     #+BEGIN_SRC sh
>    get_ready
>     #+END_SRC
>    2) go
>     #+BEGIN_SRC sh
>    go
>     #+END_SRC
>
>    currently the src blocks cause the numbering to reset, so all
> items in a sequence like this are numbered 1

This patch fixes this issue - but I cannot say anymore why the code in
org-export-html-close-lists-maybe does in fact work.  The code looks
wrong, but it seems to work.  What looks wrong is that i does not
check for the true indentation in the case when the line is not
protected.  It must be that this case is covered by some other code
further down in the exporter.
2010-06-18 08:49:25 +02:00
Eric Schulte 0d1aaf735f babel: declaring variable to satisfy compiler 2010-06-17 18:15:36 -07:00
Eric Schulte ffbeb7ffe6 babel: languages adding their extensions to `'org-babel-tangle-lang-exts' 2010-06-17 18:15:35 -07:00