Commit Graph

5411 Commits

Author SHA1 Message Date
Carsten Dominik d325d0c255 Implement patch by Stefan Monnier 2010-06-26 13:13:14 +02:00
Carsten Dominik d3e3a3ce0a Document nil as a special property value 2010-06-26 07:59:00 +02:00
Carsten Dominik bcb7f7f1ef Introduce a way to set a property to undefined.
* lisp/org-macs.el (org-not-nil): Return the value if not interpreted
as nil.
* lisp/org.el (org-entry-get):
(org-entry-get-with-inheritance): Interpret the value "nil"
as nil for properties.

Bernt Hansen writes:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> > On Jun 25, 2010, at 3:23 PM, Robert Goldman wrote:
> >
> > > Question:  what is the proper way to get a NIL into a property?  Are
> > > we
> > > to use () instead of "nil"?  Or are property values always interpreted
> > > as strings?
> > >
> > > Apologies in advance if this is a stupid question!
> >
> > Not a stupid question at all.
> >
> > There is no way, currently.   Property values are string - the only
> > way to make
> > org-entry-get return nil is to not have the property defined at all.
>
> I've wanted a similar thing in the past for the LOGGING property where
> the parent task has special logging set via the LOGGING property but I
> want to undo that for some of the child tasks so they use the default
> logging setup.
>
> Having a way to undefine a property would be good in general I think.

-Bernt
2010-06-26 07:54:07 +02:00
Carsten Dominik bbfca4a0e4 Clean up when aborting capture template selection
* lisp/org.el (org-switch-to-buffer-other-window): Return the buffer.

Patch by Sebastian Rose.
2010-06-26 07:18:27 +02:00
Carsten Dominik 3009fc46b3 Merge branch 'pw' 2010-06-26 06:43:22 +02:00
Carsten Dominik 6aac0a449f Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-26 06:38:31 +02:00
Julien Danjou 8c17c53002 Fix missing : in documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-26 06:37:01 +02:00
Carsten Dominik 548b6f6105 Add new utilities 2010-06-26 06:24:58 +02:00
Carsten Dominik 2b26cb4e4e Fix bug with regexp target definition
Patch by Juan Pechiar
2010-06-25 20:53:15 +02:00
Carsten Dominik e8c7796868 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-25 20:50:03 +02:00
Carsten Dominik 41c832ef6f Fix typo 2010-06-25 20:49:55 +02:00
Eric Schulte 940b6f90af babel: bringing languages closer to compilability
removing un-needed 'cl functions from language files, and generally
  cleaning them up as if they were going to be compiled.
2010-06-25 10:26:48 -07:00
Eric Schulte 7f7602e65b babel: assign copyright to FSF on ob-sh.el 2010-06-25 10:17:50 -07:00
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