Commit Graph

5956 Commits

Author SHA1 Message Date
Eric Schulte 2a400ef016 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-27 09:45:34 -06:00
Eric Schulte 344163403b call to delete-file no longer throwing errors on some Emacsen
Thanks to Erik Iverson for pointing this out

* lisp/ob.el (org-babel-remove-temporary-directory): removed explicit
  second argument
2010-08-27 09:45:07 -06:00
Carsten Dominik 3a06bc3730 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-27 17:02:12 +02:00
Magnus Henoch b2861749d0 Fix :step day for agenda clockreport
I just tried adding :step day to
org-agenda-clockreport-parameter-plist, but then hitting R in the
agenda caused a crash, since org-clocktable-steps expects ts and te to
be strings, though in fact they are Gregorian day numbers.

This patch fixes the problem for me.  It's quite ugly, so I don't
expect it to be committed in its current form :) but I hope it serves
as inspiration for someone to figure out the right way to solve this.

* lisp/org-clock.el (org-clocktable-steps): Allow ts and te to be
day numbers.

TINYCHANGE
2010-08-27 16:27:38 +02:00
Eric Schulte 2554f27683 moved `org-save-outline-visibility' into org-macs.el
Thanks to Nick Dokos for pointing out this as a fix to a Babel issue

* lisp/org-macs.el (org-save-outline-visibility): moved from org.el

* lisp/org.el: moved `org-save-outline-visibility' to org-macs.el
2010-08-27 08:18:32 -06:00
Carsten Dominik 7be6f7e3d5 Fix typo 2010-08-27 10:02:05 +02:00
Carsten Dominik f0d58188ca Revert "Bug: possible bug in latex export [7.01trans (release_6.36.735.g15ca.dirty)]"
This reverts commit bb0a1f190b.
2010-08-27 09:29:25 +02:00
Carsten Dominik 33f9d116ba Remove some properties from ASCII-exported text 2010-08-27 09:27:59 +02:00
Eric Schulte 3d2dbf8604 additional ":results silent" default header argument for org code blocks
Thanks to David Hajage for suggesting this fix

* lisp/ob-org.el (org-babel-default-header-args:org): additional
  ":results silent" default header argument for org code blocks
2010-08-26 17:36:26 -06:00
Eric Schulte e52909d902 now possible to abort code block evaluation without throwing errors
this makes it possible to export while not evaluating some code
  blocks

* lisp/ob-exp.el (org-babel-exp-do-export): removing hacky ":noeval",
  which is now an alias to ":eval no"

* lisp/ob.el (org-babel-confirm-evaluate): ":noeval" is an alias for
  ":eval no", also no longer throwing errors

  (org-babel-header-arg-names): adding both eval and noeval as general
  header arguments

  (org-babel-execute-src-block): now using the new non-error
  confirmation functionality
2010-08-26 17:14:43 -06:00
Eric Schulte 2c33b2eb66 Introducing ob-org and now wrapping ":results org" in org code block
ob-org has two non-standard header arguments in that it exports it's
  results by default and the result type defaults to raw, this ensures
  that the body of a begin_src org block exports transparently.

  This is a breaking change in that if you are currently using org
  code blocks to export org-fontified code you will have to set the
  ":exports" header argument for org-mode blocks to "code" on a block,
  file, language or system-wide basis.

* Makefile (LISPF): adding ob-org.el to the makefile

* lisp/ob-org.el: defines handling of org code blocks

* lisp/ob.el (org-babel-insert-result): now when "org" is a result
  type the results are wrapped in an org code block
2010-08-26 10:01:21 -06:00
Eric Schulte a89dc43e83 integrating ob-plantuml -- Thanks to Zhang Weize for this contribution!
* Makefile (LISPF): now compiling and installing ob-plantuml.el

* contrib/scripts/.gitignore : ignores the plantuml.jar file, so that
  it can be located next to ditaa.jar

* lisp/ob-plantuml.el: adding copyright notice and FSF attribution

  (org-plantuml-jar-path): now a defcustom

  (org-babel-execute:plantuml): now using org-babel-eval which
  displays error messages

* lisp/org.el (org-babel-load-languages): ob-plantuml is now part of
  org-babel-load-languages
2010-08-26 09:36:08 -06:00
Zhang Weize 810bb09ef3 ob-plantuml.el support for evaluating plantuml scripts 2010-08-26 09:10:03 -06:00
Eric Schulte 9c43017755 Babel -- fix bug in final deletion of `org-babel-temporary-directory'
Thanks to Noorul Islam for pointing out this issue

* lisp/ob.el (org-babel-remove-temporary-directory): the version of
  `delete-directory' found in files.el can not be assumed to be
  present on all versions, so this copies the recursive behavior of
  that command in such a way that all calls to delete-directory will
  also work with the built-in internal C implementation of that
  function.  This is not overly difficult as all elements of the
  directory can be assumed to be files.
2010-08-26 07:22:21 -06:00
Eric Schulte e3d271ea5b fixed issue in org-babel-temp-file when forcing extension types
* lisp/ob-C.el (org-babel-C-execute): corrected arguments to
  org-babel-temp-file

* lisp/ob-latex.el (org-babel-execute:latex): corrected arguments to
  org-babel-temp-file

* lisp/ob.el (org-babel-temp-file): corrected arguments to
  make-temp-file
2010-08-25 19:21:42 -06:00
Eric Schulte 7b00073f2d Babel now cleans up any temporary files created using org-babel-temp-file
* lisp/ob.el (org-babel-temporary-directory): variable to hold the
  value of the Babel temporary directory

  (org-babel-temp-file): replacement for make-temp-file with cleanup
  on exit of Emacs

  (org-babel-remove-temporary-directory): cleanup function run on exit
  of Emacs

  (kill-emacs-hook): now includes babel cleanup function

* lisp/ob-C.el (org-babel-C-execute): using org-babel-temp-file
  instead of make-temp-file

* lisp/ob-R.el (org-babel-R-assign-elisp): using `org-babel-temp-file'
  instead of `make-temp-file'

  (org-babel-R-evaluate-external-process): using `org-babel-temp-file'
  instead of `make-temp-file'

  (org-babel-R-evaluate-session): using `org-babel-temp-file' instead of
  `make-temp-file'

* lisp/ob-asymptote.el (org-babel-execute:asymptote): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-clojure.el (org-babel-clojure-evaluate-external-process):
  using `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-ditaa.el (org-babel-execute:ditaa): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-dot.el (org-babel-execute:dot): using `org-babel-temp-file'
  instead of `make-temp-file'

* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars): using
  `org-babel-temp-file' instead of `make-temp-file'

  (org-babel-execute:gnuplot): using `org-babel-temp-file' instead of
  `make-temp-file'

* lisp/ob-haskell.el (org-babel-load-session:haskell): using
  `org-babel-temp-file' instead of `make-temp-file'

  (org-babel-haskell-export-to-lhs): using `org-babel-temp-file' instead
  of `make-temp-file'

* lisp/ob-latex.el (org-babel-execute:latex): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-ledger.el (org-babel-execute:ledger): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-lisp.el (org-babel-execute:lisp): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-octave.el (org-babel-octave-evaluate-external-process):
  using `org-babel-temp-file' instead of `make-temp-file'

  (org-babel-octave-evaluate-session): using `org-babel-temp-file'
  instead of `make-temp-file'

  (org-babel-octave-import-elisp-from-file): using `org-babel-temp-file'
  instead of `make-temp-file'

* lisp/ob-perl.el (org-babel-perl-evaluate): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-python.el (org-babel-python-evaluate): using
  `org-babel-temp-file' instead of `make-temp-file'
  using `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-ruby.el (org-babel-ruby-evaluate): using
  `org-babel-temp-file' instead of `make-temp-file'
  using `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-sass.el (org-babel-execute:sass): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-sh.el (org-babel-sh-evaluate): using `org-babel-temp-file'
  instead of `make-temp-file'

* lisp/ob-sql.el (org-babel-execute:sql): using `org-babel-temp-file'
  instead of `make-temp-file'

* lisp/ob-sqlite.el (org-babel-execute:sqlite): using
  `org-babel-temp-file' instead of `make-temp-file'

  (org-babel-sqlite-expand-vars): using `org-babel-temp-file' instead of
   `make-temp-file'
2010-08-25 14:47:47 -06:00
Aditya Siram 58f0a4ed41 Noweb style references are now expanded with loading a code block in a session.
* lisp/ob.el (org-babel-load-in-session): expanding noweb references
  when appropriate
2010-08-25 12:21:41 -06:00
Nicolas Goaziou 869b2693a5 Recognize underscores in URL
* org.el (org-make-link-regexps): modified regexp of org-plain-link-re.
2010-08-25 12:33:12 +02:00
Carsten Dominik ffa985a093 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-25 12:31:40 +02:00
Noorul Islam 92e491e52c org-habit.el: better error handling required
Attached is the patch which catch this error and throws meaningful
message.

* lisp/org-habit.el (org-habit-parse-todo): Find sr-days only if
scheduled-repeat is non nil.  Use 4th element of the list returned
by (org-heading-components) as habit-entry.  Modify the error
message to be more meaningful.

TINYCHANGE

paulusm <paulusm@bigpond.com> writes:

> Hi org-mode people,
>
> Whilst playing with the "shaving" example from
> http://orgmode.org/manual/Tracking-your-habits.html I accidentally put a
> bad character in the SCHEDULED timestamp.
>
> Instead of: "SCHEDULED: <2010-08-26 Thu .+2d/4d>"
> I had:      "SCHEDULED: <2010-08-26 Thu .+2nd/4d>"
>
> When trying to view my agenda, I was presented with a blank agenda and Emacs
> very quietly reported:
>     "org-habit-duration-to-days: Wrong type argument: stringp, nil"
> which is not really helpful.
>
> Removing the bad character fixes the issue, and I can duplicate the error
> condition as described above.
>
> Perhaps some better error trapping could be done?
>
>
2010-08-25 12:16:47 +02:00
Eric Schulte 5305fe903f ob-latex :fit,:border header arguments and working with the newest latex export code
* lisp/ob-latex.el (org-babel-execute:latex): adding new ":fit" and
  ":border" header arguments which both use the "preview" latex
  package to fit the resulting pdf image to the figure.

  (org-babel-latex-tex-to-pdf): updated to the latest code from
  org-latex.el
2010-08-24 19:16:12 -06:00
Erik Iverson 1d1439f91e babel: R: Respect value of `ess-ask-for-ess-directory' 2010-08-23 23:06:55 -04:00
David Maus 17c7786bb0 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-23 19:35:52 +02:00
David Maus 9e6391389c Don't try to store link if point is at end of buffer.
* org-wl.el (org-wl-store-link): Don't try to store link if point is
at end of buffer.
2010-08-23 19:35:43 +02:00
Harri Kiiskinen 550278c135 :body-only property for publishing projects
* lisp/org-publish.el (org-publish-project-alist): Document the new
body-only property.
(org-publish-org-to): Use the body-only property.
2010-08-23 13:34:31 +02:00
Jambunathan K 5908e8ed7b org-store-link: Return link when invoked from within agenda buffer
* org.el (org-store-link): Return link when invoked non-interactively from
an agenda buffer.

TINYCHANGE

> Summary:
>
> When I trigger a org-capture, with the cursor positioned on a line in
> the agenda buffer, I want the link to the agenda entry to be available
> as an annotation (%a) to the capture process. Currently this is broken.
>
> The enclosed patch fixes this.
>
> Setup:
>
> # file todo.org
> * TODO Talk to someone
>    SCHEDULED: <2010-08-23 Mon>
>
> # org-capture-templates
>  ("z" "Conversation" entry
>   (file+headline "~/conversation.org" "Conversations")
>   "** Note taken on %U\n   %a\n   %?" :prepend t :empty-lines 1)
>
> Steps for reporduction:
>
> 1. Restrict agenda to todo.org
> 2. Do org-agenda
> 3. Place the cursor on the above todo line
> 4. Trigger an org-capture for the above capture entry
>
> Examine the entries in conversation.org before/after the patch is
> applied. Note the absence/presence of the link to the parent todo entry.
>
> * Conversations
>
> ** Note taken on [2010-08-23 Mon 03:58]
>    [[file:~/todo.org::*Talk%20to%20someone][Talk to someone]]
>
> ** Note taken on [2010-08-23 Mon 03:42]
>
> Jambunathan K.
2010-08-23 12:18:00 +02:00
Jambunathan K 784e5f1488 org-store-link: Fix storing of links to headlines in indirect buffers
* org.el (org-store-link): Storing of links to headlines in indirect
buffers was broken.  Fix it.

TINYCHANGE
Summary:

> When org-store-link is invoked on a headline in indirect buffer (as in a
> capture buffer), hyperlink gets created to the file and NOT the
> headline. This is a bug.
>
> The attached patch fixes this.
>
> Setup:
>
> # ~/.emacs
>
> (defun my-conversation-id ()
>   (interactive)
>
>   (remove-hook 'org-capture-before-finalize-hook 'my-conversation-id)
>
>   (let ((org-link-to-org-use-id t))
>     (call-interactively 'org-store-link)
>     )
>   )
>
> # org-capture-templates
>
>  ("x" "Conversations" entry
>   (file+headline "~/conversation.org" "Conversations")
>   "%(progn (add-hook 'org-capture-before-finalize-hook 'my-conversation-id) \"\")** Note taken on %U\n   %?  " :prepend t :empty-lines 1)
>
> Steps for reproduction:
>
> Trigger org-capture for the above capture entry.
>
> Examine conversation.org before/after the patch is applied. Note the
> absence/presence of IDs for the captured entry.
>
> Check for the stored links using C-c C-l. Note the file/headline links.
>
> # file conversation.org before and after the patch
>
> * Conversations
>
> ** Note taken on [2010-08-23 Mon 04:33]
>    :PROPERTIES:
>    :ID:       7e1974a6-8fa1-43cf-bef3-2adf37d99130
>    :END:
>
> ** Note taken on [2010-08-23 Mon 04:32]
>
> # (org-insert-link) showing stored links before and after the patch
>
> file:~/conversation.org (file:~/conversation.org)
> id:7e1974a6-8fa1-43cf-bef3-2adf37d99130 (Note taken on [2010-08-23 Mon 04:33])
>
2010-08-23 12:14:20 +02:00
Aidan Kehoe 9afcc02588 Use integer syntax for the MODE argument to #'set-file-modes
Hello!

We need this change to get org-mode compiling with recent XEmacs 21.5. On
previous 21.5 and current 21.4, the problem manifests itself at runtime, not
compile time, like so:

  (set-file-modes "/tmp/aidan/foo.el" ?\755)
  => Wrong type argument: integerp, ?í

One old reason to go for the ?\755 syntax instead of the #o755 syntax under
GNU Emacs was to be that older versions of GNU Emacs didn’t support #o755,
but, to my knowledge, every released GNU Emacs since March 2000 has
supported the latter syntax.

Best,

Aidan Kehoe, the XEmacs project.

ChangeLog addition:

2010-08-21  Aidan Kehoe  <kehoea@parhasard.net>

	* ob-tangle.el (org-babel-tangle): Change the MODE argument to
	#'set-file-modes to use integer, not character syntax, avoiding
	compile problems with recent XEmacs.
2010-08-23 12:00:01 +02:00
Carsten Dominik a7660225af Fix code typo 2010-08-21 08:37:11 +02:00
Carsten Dominik 96bacc020b Fix adding context lines in agenda
* lisp/org-agenda.el (org-agenda-add-entry-text): Make sure we move
forward even if there is no text to be added.

Adding entry text with org-agenda-add-entry-text-maxlines greater than
0 could result in an infinite loop.
2010-08-21 07:09:20 +02:00
Robert P. Goldman e50657d7cb Added a call to insert any bodynewline-paragraph value before the start of a line item. 2010-08-21 05:11:02 +02:00
Robert P. Goldman ee736317cb Add a test code file. 2010-08-21 05:10:46 +02:00
Robert P. Goldman 06034b9813 Expanded docstring for org-emph-re 2010-08-21 05:10:34 +02:00
Robert P. Goldman e439e4da27 Substantially improved org-export-generic-fontify based on help from Carsten. 2010-08-21 05:10:28 +02:00
Robert P. Goldman daa6f98cab Partial solution to the fontification problem. Having some trouble with the MATCH-STRING calls, but mostly ok. 2010-08-21 05:10:20 +02:00
Robert P. Goldman dedea0721c Make newline-handling more flexible (per WH), declare keywords.
Followed Wes Hardaker's suggestion to make the translation of
newlines more flexible --- instead of making a boolean for
special translation of blank lines, I added the ability to
specify the translation.

Also added a macro for declaring generic translation keywords
with type information and documentation.  Hope this will make
the generic translator easier to use.
2010-08-21 05:10:11 +02:00
Robert P. Goldman adf2e016e0 Revision to handling of blank lines. Start of declaration protocol.
Followed Wes Hardaker's idea of permitting alternative rewrites for blank
lines, instead of making the blank line handler be a boolean and
hard-wiring a newline character.

Also added a declaration form, with type and documentation options, for the
keywords used in defining a generic export method.
2010-08-21 05:09:58 +02:00
Carsten Dominik 557ce7c01c Revert "Search for LaTeX setup case-insensitively"
This reverts commit 034dbac3ee.
2010-08-20 18:24:09 +02:00
Carsten Dominik 4a028cc7c0 Add org-static-mathjax to the contrib directory
Thanks to Jan Bker for this contribution.
2010-08-20 18:12:59 +02:00
Carsten Dominik 190e88cfc9 Remove the special noutline.el file for XEmacs
The latest XEmacs package release does now contain a modern version of
outline.el, put there by Michael Sperber.

* Makefile: Remove targets related to noutline.el.
* README: Remove the entry for the xemacs directory.
* README_DIST: Remove the entry for the xemacs directory.
* doc/org.texi (Installation): Remove the special installation
instructions for XEmacs.
* lisp/org.el (outline): Remove special code to load noutline.el
for XEmacs.
* xemacs/README: File removed.
* xemacs/noutline.el: File removed.
* xemacs/ps-print-invisible.el: File removed.
2010-08-20 14:19:29 +02:00
Carsten Dominik 838cb818de Show command names in manual
First batch, largely from Andreas Rhler
2010-08-20 13:09:05 +02:00
Magnus Henoch bf0d8c5a0e org-capture + autoload
Jambunathan K <kjambunathan@gmail.com> writes:

> It would be convenient if I could do a
>
> M-x customize-group org-capture and/or
> M-x customize-variable org-capture-templates
>
> without having triggered a prior org-capture.
>
> For now, I trigger a capture, abort it and then proceed ahead with
> customizing these.

Here is a patch that adds an "autoload cookie" for
org-capture-templates.  After recompiling, org-install.el should contain
an autoload declaration for org-capture-templates.

Let's see if the patch tracker likes me :)

Magnus
2010-08-20 10:01:50 +02:00
Carsten Dominik 19b0e03f32 Make backslash escape "-" in property matches
* lisp/org.el (org-make-tags-matcher): Read "\\-" as "-" in
the tags/property matcher.

Ilya Shlyakhter writes:

> When doing an agenda tags match for tags or properties with dashes in
> their name, the dashes become negation operators: "my-prop>0" means
> "entries that have the tag 'my' and do not have a positive property
> 'prop'", rather than "entries that have a positive property
> 'my-prop'".  Is there a way to escape the dashes to get the latter
> meaning?
2010-08-20 09:26:08 +02:00
Carsten Dominik 294d398544 Remove impact of case-fold-search on LaTeX class setup
* lisp/org-exp.el (org-infile-export-plist): Bind case-fold-search to t.
2010-08-20 08:39:55 +02:00
Carsten Dominik 6f61135c84 New macro
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry): New macro.
2010-08-20 08:32:31 +02:00
Carsten Dominik 034dbac3ee Search for LaTeX setup case-insensitively
* lisp/org-latex.el (org-export-latex-set-initial-vars): Bind
`case-fold-search' to t around the search for special LaTeX setup.
* lisp/org-beamer.el (org-beamer-after-initial-vars):  Bind
`case-fold-search' to t around the search for special BEAMER setup.
2010-08-19 23:17:24 +02:00
Carsten Dominik 72a4aeebd3 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-19 22:23:18 +02:00
David Maus 6d9fcf8ff4 Delete postscript file after creating conversion to pdf
* org-agenda.el (org-write-agenda): Delete postscript file after
creating conversion to pdf.
2010-08-19 21:54:12 +02:00
David Maus 768d88acc3 Move require statements to proper place in evaluated lisp expression
* org-agenda.el (org-write-agenda): Move require statements to proper
place in evaluated lisp expression.
2010-08-19 21:52:18 +02:00
David Maus cc5b21e2cb Rename temporary buffer to remove dependency of `flet' macro
* org-agenda.el (org-write-agenda): Rename temporary buffer to remove
dependency of `flet' macro.
2010-08-19 21:37:19 +02:00