0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 12:16:27 +00:00
Commit graph

4001 commits

Author SHA1 Message Date
Eric Schulte 839a60f310 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-08 14:19:39 -07:00
Eric Schulte c676f62361 passing header arguments through to called code blocks
* lisp/ob-lob.el (org-babel-lob-get-info): including pass-through
  header arguments in results variable header argument string

* lisp/ob.el (org-babel-execute-src-block): working with new header
  argument setup
  (org-babel-parse-header-arguments): only split header argument
  strings when []'s are balanced
2010-11-08 14:18:33 -07:00
David Maus 6c95170ca0 Limit search for in-buffer options beginning of first headline
* org-exp.el (org-export-visible): Limit search for in-buffer options
beginning of first headline.
2010-11-07 20:06:54 +01:00
David Maus 49a00abf3d Remove stale link handler for news: links
* org.el (org-open-at-point): Remove stale link handler for news:
links.

This condition case is never evaluated because the news: link is
already passed to `browse-url'.
2010-11-07 16:21:32 +01:00
Bastien Guerry 6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Bastien Guerry dfb52eb7a7 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-07 14:42:39 +01:00
Carsten Dominik d96c998019 Fix issue with narrowing and links in clocktables
* lisp/org-clock.el (org-clocktable-write-default): Better handling of
narrowing.

Liang Wang writes:

> After I upgrade orgmode to latest version, clock report shows link
> text literally.
>
> For example,
>
>   [[file:/home/liang/gtd/todo.org::Task...
>
> Unfortunately, in this way, I can not see what this task actually is.
> I have to temporarily disable link in clock report.
2010-11-06 16:16:49 -04:00
Julien Danjou 498bcc0031 org-agenda: fix org-agenda-category-icon-alist defcustom type
* list/org-agenda.el (org-agenda-category-icon-alist): Fix defcustom
  type.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-05 16:50:06 +01:00
Nicolas Goaziou e652a1ed85 Simplify and fix indentation code in lists
* org.el (org-indent-line-function): simplify code and remove bug that
  would insert a tab at the beginning of the line when trying to
  indent the item.
2010-11-04 19:05:10 +01:00
Carsten Dominik da0f4997fb Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-04 16:46:25 +01:00
Julien Danjou 3e4b139f1d org-agenda: return multiple results when sexp return a string with "; "
* lisp/org.el (org-diary-sexp-entry): Split sexp result strings at semicolon.

When evaluating my %%(org-calendar-holidays) on October 31st, I got a
line like:

"Halloween; Daylight Saving Time Ends 3:00am (CEST)"

And it displays in calendar:
3:00 .... Halloween; Daylight Saving Time Ends (CEST)

This is wrong since Halloween is all day, not only at 3:00.

Splitting results on "; " allows to have an independant entry on each
event and displays things correctly.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-04 13:05:50 +01:00
Julien Danjou aaffdb4732 org-agenda: add support for category icons
Signed-off-by: Julien Danjou <julien@danjou.info>

* doc/org.texi (Categories): Document category icons.
* lisp/org-agenda.el (org-agenda-prefix-format): Insert place holder for icon.
(org-agenda-category-icon-alist): New option.
(org-agenda-get-category-icon): New function.
(org-format-agenda-item): Support for icons.
(org-compile-prefix-format): Support for icons.
2010-11-04 13:01:37 +01:00
Julien Danjou 4ef83fbdc9 org-compat: defalias string-match-p and looking-at-p rather than defun
Signed-off-by: Julien Danjou <julien@danjou.info>

* lisp/org-compat.el: Create defalias for `string-match-p' and
looking-at-p.
2010-11-04 12:30:38 +01:00
Eric Schulte 3a62685df9 ob-calc: support for variables -- converts :var variables in calc variables
* lisp/ob-calc.el (org-babel-execute:calc): support for variables --
  converts :var variables in calc variables
2010-11-03 23:45:25 -06:00
Carsten Dominik 106ad6e9e5 Fix sparse tree dispatch menu
* lisp/org.el (org-sparse-tree): Mention [r] in dispatch menu
2010-11-03 23:26:23 +01:00
Carsten Dominik d5e2031bc7 XEmacs compatibility patch
* lisp/org-list.el (org-list-parse-list): Use `org-looking-at-p'.
2010-11-03 23:16:37 +01:00
Carsten Dominik 7f79007e52 Better fix for link problem, use Liam's idea 2010-11-02 23:07:47 +01:00
Carsten Dominik aeaf05238c Limit creation of ID links only in Org mode buffers
* lisp/org-id.el (org-id-store-link): Test for org-mode before checking for
IDs.

Reporte and fix suggestion by Liam Healy
2010-11-02 23:04:10 +01:00
Carsten Dominik 1197b73769 Minor fixes 2010-11-02 09:24:06 +01:00
Carsten Dominik 350b75be63 Rewrite of the clock table code
* lisp/org.el (org-shorten-string): New function.
* lisp/org-exp.el (org-export-convert-protected-spaces): New function.
(org-export-preprocess-string): Call
`org-export-convert-protected-spaces' to handle new hard spaces.

* lisp/org-clock.el (org-clocktable): New customization group.
(org-clocktable-defaults): New option.
(org-clock-clocktable-formatter): New option.
(org-clock-clocktable-default-properties): New option.
(org-dblock-write:clocktable): Rewrite to split out functionality
into separate functions.
(org-clocktable-write-default):
(org-clocktable-indent-string):
(org-clock-get-table-data): New functions.
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-redo):
(org-agenda-clockreport-mode):
(org-agenda-set-mode-name): Rewrite to implement filtered clock tables.
* doc/org.texi (Clocking commands):
(The clock table): New sections.
(Agenda commands): Document filtered clock reports.
2010-11-02 08:47:23 +01:00
David Maus 7bef01a90f Check for heading that ends at end of buffer
* org.el (org-narrow-to-subtree): Check for heading that ends at end
of buffer.
2010-11-01 19:28:11 +01:00
Carsten Dominik adede9fbaf Fix export bug of a region with an ARCHIVE property set 2010-11-01 13:57:02 +01:00
Dan Davison ed5665e1e2 babel: Use copy-sequence' instead of copy-tree'
* lisp/ob.el: `copy-sequence' suffices to copy alist; no need for
`copy-tree'
2010-10-31 13:22:13 +00:00
Dan Davison d6599c5699 babel: Ensure that result is a file link when that is intended
* lisp/ob.el (org-babel-execute-src-block): If ":results file" is in
effect, then ensure that the value of :file is returned as the result;
don't rely on language files for this.

Examples of languages that were not honouring :file are sh and
emacs-lisp.
2010-10-31 12:55:35 +00:00
Dan Davison cf0cdd7785 babel: Fix data structure corruption when sorting parameters
* lisp/ob.el (org-babel-sha1-hash): Avoid corrupting `info' data
structure by side-effects of `sort'.
2010-10-31 12:51:18 +00:00
Nicolas Goaziou 0778fb8748 Fix list end with non-empty blank lines. Fix sorting.
* org-list.el (org-list-bottom-point-with-indent): do not check
  indentation of a non-empty blank line.
* org-list.el (org-sort-list): sort a list with point anywhere inside
  it.
2010-10-30 18:20:52 +02:00
Eric Schulte 598be4a4a4 ob-calc: added to org-src-lang-modes, safer evaluation, better error messages
* lisp/ob-calc.el (org-babel-execute:calc): safer evaluation and
  hopefully better error messages

* lisp/org-src.el (org-src-lang-modes): mapping calc blocks to
  fundamental mode
2010-10-29 19:18:28 -06:00
Eric Schulte 421405df19 adding ob-calc to org-babel-load-languages
* lisp/org.el (org-babel-load-languages): adding calc
2010-10-29 19:02:44 -06:00
Dan Davison 1ee54e0db7 babel: Don't resolve variable references unless requested
* lisp/ob.el (org-babel-initiate-session): Don't resolve variable
  references unless prefix arg is supplied.
2010-10-29 20:44:58 +01:00
Eric Schulte 9c833c456e ob-calc: ensure that calc stack refers to the correct stack
* lisp/ob-calc.el (org-babel-execute:calc): ensure that calc stack
  refers to the correct stack
2010-10-29 10:20:07 -06:00
Eric Schulte f7166a0a05 ob-calc: adding the beginnings of support for calc code blocks
* lisp/ob-calc.el: adding the beginnings of support for calc code blocks
2010-10-29 08:54:12 -06:00
Eric Schulte 2152f1ec28 ob-tangle: detangle changes in code files back to the original org files
* lisp/ob-tangle.el (org-babel-update-block-body): declaring function
  for updating code block bodies
  (org-babel-spec-to-string):
  (org-babel-detangle): detangle all tangled and commented code blocks
  in the current file back to org
  (org-babel-tangle-jump-to-org): jump from a tangled and commented
  file back to the originating org-mode code block
ob-tangle: detangle changes in code files back to the original org files

* lisp/ob-tangle.el (org-babel-update-block-body): declaring function
  for updating code block bodies
  (org-babel-spec-to-string):
  (org-babel-detangle): detangle all tangled and commented code blocks
  in the current file back to org
  (org-babel-tangle-jump-to-org): jump from a tangled and commented
  file back to the originating org-mode code block
2010-10-29 02:13:38 -06:00
Eric Schulte 93600e41a6 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-29 02:10:18 -06:00
Eric Schulte c6565eaa43 fixed typos in tangle comment link format strings
* lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): fix typo
  (org-babel-tangle-comment-format-end): fix typo
2010-10-29 01:37:28 -06:00
Carsten Dominik 82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
Carsten Dominik 110b4c4610 Revert "LaTeX export: use org-export-latex-hyperref-format"
This reverts commit f5918bdcc0.
2010-10-29 05:57:24 +02:00
Dan Davison 9c55868550 Alter way in which user chooses minted for latex source code export
* lisp/org-exp.el (org-export-format-source-code-or-example): Use
  minted for latex source code export if `org-export-latex-listings' has
  the value 'minted
* lisp/org-latex.el (org-export-latex-listings): Document special
  value 'minted
* lisp/org-latex.el (org-export-latex-minted): Delete variable
2010-10-28 21:55:40 +01:00
Carsten Dominik ae91c0cb0c Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-28 09:38:53 +02:00
Carsten Dominik fd7b3e9717 Revert "Fix bug with :maxlevel 0 in clock tables"
This reverts commit 5801fa6c63.
2010-10-28 08:09:46 +02:00
Bastien Guerry 840570c2a3 Update Changes.org and org.texi to reflect changes in org-timer.el
Update org.texi with a new section: Countdown timer.
Update ORGWEBPAGE/Changes.org with a section about timer/clock.
Also fix a small typo in a org-timer.el.
2010-10-27 18:20:27 +02:00
Dan Davison 9c1acbc667 babel: Fix regexp parsing of functional-style arguments
* lisp/ob.el (org-babel-get-src-block-info): Retrieve contents of
  parentheses, excluding parentheses themselves
2010-10-27 16:31:34 +01:00
Eric Schulte fd9e9331ee ob-gnuplot: fixed bug in data file assignment using user variables
Thanks to Nick Dokos and Nigel Beck for raising the issue.

* lisp/ob-gnuplot.el (org-babel-variable-assignments:gnuplot): fixed
  bug in gnuplot data file assignment using user variables
2010-10-26 22:49:12 -06:00
Eric Schulte c52ccaefa7 adding new :headers header argument for latex code blocks
* lisp/ob-latex.el (org-babel-execute:latex): adding new :headers
  header argument for latex code blocks
2010-10-26 17:00:28 -06:00
Carsten Dominik 7635429d44 New capture property :kill-buffer
* lisp/org-capture.el (org-capture-templates): New capture
property `:kill-buffer'. (org-capture-finalize): Kill target buffer
if that is desired.
(org-capture-target-buffer): Remember if we have to make the buffer.

Proposal by Samuel Wales.
2010-10-26 17:46:48 +02:00
Carsten Dominik 8e12716f68 Fix bug when computing clock tables.
* lisp/org-clock.el (org-dblock-write:clocktable): Fix bug
when computing clock tables.

Ouch, bad bug.  Resetting the clock file time was always
happening in the same file, not in the different files
visited by the summer.
2010-10-26 17:17:15 +02:00
Carsten Dominik 5801fa6c63 Fix bug with :maxlevel 0 in clock tables
* lisp/org-clock.el (org-dblock-write:clocktable): Pass file minutes
up to caller even if no table is generated.

Rainer Stengele writes:

> 1. Without maxlevbel I get I get
>
> #+BEGIN: clocktable :scope ("file1.org" "file2") :timestamp t :tstart "<2010-05-01 Sa 00:00>" :tend  "<2010-07-31 Sa 23:55>"
> Clock summary at [2010-07-22 Do 09:07]
>
> | File              | L | Timestamp           | Headline       |     Time |        |        |
> |-------------------+---+---------------------+----------------+----------+--------+--------|
> |                   |   | Timestamp           | *Total time*   | *327:51* |        |        |
> ...
>
>
>
> with :maxlevel 0 I get
>
>
> #+BEGIN: clocktable :maxlevel 0 :scope ("file1.org" "file2") :timestamp t :tstart "<2010-05-01 Sa 00:00>" :tend  "<2010-07-31 Sa 23:55>"
> Clock summary at [2010-07-22 Do 09:11]
>
> | File | L | Timestamp | Headline     | Time     |
> |------+---+-----------+--------------+----------|
> |      |   | Timestamp | *Total time* | *232:17* |
> |------+---+-----------+--------------+----------|
> #+END:
>
>
> I would like to get the same results!
> Is ":maxlevel 0" intended to not include the sublevel clocks?
2010-10-26 13:27:20 +02:00
Łukasz Stelmach 47107b6612 Sexp diary entries may retrurn a list
* lisp/org-agenda.el (org-agenda-get-sexps): Handle lists as return values
from diary entries
* lisp/org-bbdb.el (org-bbdb-anniversaries): Handle lists of anniversaries
* lisp/org.el (org-diary-sexp-entry): Handle lists as return values
from diary entries.

 ukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:

> I've disovered, that %%(org-bbdb-anniversaries) returns (as every other
> sexp) a string. Which is OK if there is only one.
>
>   Anniversaries:  John Doe's 10th wedding anniversary
>
> Unfortunately the agenda view becomes awful if we have noted Jane's
> weeding date too
>
>   Anniversaries:  John Doe's 10th wedding anniversary; Jane Doe's 10th wedding anniversary
>
> And what if we know 3 Eves and 5 Adams and it's Christmas Eve? (Hint:
> their name day)
[...]

As Thomas Bauman pointed out, there are functions that can be used in
sexps which return cons cells like this

    (nil . "Full Moon 3:35am (CEST)")

(this one is diary-lunar-phases), these aren't properly supported by the
previous version of my patch. This one can distinguish between such a
cons cell and a "real" list.

    ("John Doe's 10th wedding anniversary"
     "Jane Doe's 10th wedding anniversary")

This is because

    (consp (cdr '(a . b))) ; => nil

so org-diary-sexp-entry can be made return (cdr result) only in case of
the former cons cell. The third condition in the `cond' block is IMHO
enough as it is now, but if you think adding

    (listp (cdr result))

may help then be it.
2010-10-26 07:27:19 +02:00
Carsten Dominik eab8ea9687 Minor fixes 2010-10-26 07:10:48 +02:00
Carsten Dominik 325daa8228 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-26 06:34:27 +02:00
Carsten Dominik 2a58795e19 Fix empty line bug in capture
* lisp/org-capture.el (org-capture-empty-lines-before):
(org-capture-empty-lines-after): Make sure the n=0 does not insert any
newlines.

Marcel van der Boom writes:

> I'm in the process of migrating from org-remember to org-capture.
> Pretty easy going so far, but it seems org-capture adds newlines, which
> I think it should not do.
>
> My (test) capture-template is:
>
> (("t" "Todo" entry
>  (file "~/.outlet/GTD.org")
>  "* TODO %?" :prepend t :empty-lines 0)
>
> with the intention of inserting the captured task on the
> first line of the file ~/.outlet/GTD.org. What happens when I capture
> an task is this:
>
> <beginning of file>
>
> * TODO Captured task
>
> <original first line of file here>
> ....
>
> Both before and after the task is a newline. Also, when capturing and
> cancelling the capture with C-c C-k the newlines remain whereas the
> task is removed.
2010-10-26 06:34:16 +02:00