0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 22:10:42 +00:00
Commit graph

3474 commits

Author SHA1 Message Date
Carsten Dominik b212d2ed60 Align tags after capture template tags insertion
* lisp/org-capture.el (org-capture-fill-template): Align tags
after insertion.
2010-08-30 13:51:04 +02:00
Carsten Dominik 9bc1d0c74f Avoid a star in a headline to be interpreted as multiline emphasis
* lisp/org-exp.el (org-export-concatenate-multiline-emphasis): Ignore
matches that start in a headline.
2010-08-30 09:39:52 +02:00
Eric Schulte fdad92edd6 ob-plantuml: wrapping in-file and out-file in shell-quote-argument
Thanks to Michael Gauland for pointing out this fix

* lisp/ob-plantuml.el (org-babel-execute:plantuml): wrapping in-file
  and out-file in shell-quote-argument
2010-08-29 19:33:38 -06:00
David Maus 4b7c9136a7 Remove compile-time dependency on doc-view.el
* org-docview.el (org-docview-store-link): Use expanded macro to get
current page.
(doc-view-goto-page, image-mode-window-get): Declare functions for
byte compiler.

doc-view mode is not available in Emacs22.  We need to use the
expanded form of the macro `doc-view-current-page' at compile-time.
2010-08-29 21:29:16 +02:00
Eric Schulte f6c09411a7 ob-scheme: very preliminary support for evaluating scheme code blocks
* Makefile (LISPF): adding ob-scheme.el to the makefile
* lisp/ob-scheme.el: very preliminary support for evaluating scheme
  code blocks
* lisp/org.el (org-babel-load-languages): adding scheme
2010-08-27 18:03:11 -06:00
Eric Schulte 4054eb0b9b ob-js: very preliminary support for evaluating Javascript code blocks
This relies upon node.js as the Javascript execution engine.
  http://nodejs.org/
2010-08-27 16:59:08 -06:00
Eric Schulte de6ff60e25 fixing circular require introduced by previous changes
* lisp/ob.el (require): removing circular (require 'org)
2010-08-27 14:47:59 -06:00
Eric Schulte b183da4be6 Babel: fixing compiler warnings
* lisp/ob-R.el (ess-make-buffer-current): declared
  (ess-ask-for-ess-directory): declared
  (ess-local-process-name): declared
* lisp/ob-latex.el (org-babel-latex-tex-to-pdf): capturing free
  variable
* lisp/ob.el (org-edit-src-code): fixing arguments
  (org-edit-src-exit): declared
  (org-outline-overlay-data): declared
  (org-set-outline-overlay-data): declared
2010-08-27 14:45:55 -06:00
Glenn Morris e314478511 Fix some more Org `check-declare' issues.
* ob.el: Require org when compiling.
(org-save-outline-visibility): Remove macro declaration.
* ob-emacs-lisp.el: Require ob-comint when compiling, for macros.
Remove unnecessary/macro declarations.
* org-docview.el: Require doc-view when compiling.
(doc-view-goto-page): Autoload rather than declaring.
(doc-view-current-page): Remove macro declaration.
* ob.el (tramp-compat-make-temp-file, org-edit-src-code)
(org-entry-get, org-table-import): Fix declarations.
(org-match-string-no-properties): Remove declaration.
* ob-sh.el (org-babel-comint-in-buffer)
(org-babel-comint-wait-for-output, org-babel-comint-buffer-livep)
(org-babel-comint-with-output): Remove unnecessary declarations.
* ob-R.el (orgtbl-to-tsv): Fix declaration.
* org-list.el (org-entry-get): Fix declaration.
2010-08-27 14:45:48 -06:00
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 06034b9813 Expanded docstring for org-emph-re 2010-08-21 05:10:34 +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 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
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
Dan Davison 7befdf8a00 babel: edit docstring
* ob-lob.el (org-babel-lob-get-info): Edit docstring
2010-08-19 09:31:19 -04:00
Dan Davison c11106a3e5 babel: Fix bug in export of #+lob/#+call lines
* ob-exp.el (org-babel-exp-lob-one-liners): Get parameter
	values from all standard sources when executing #+lob/#+call
	lines
2010-08-19 09:30:40 -04:00
Dan Davison bf64d25744 babel: R: Refactor evaluation code
* ob-R.el (org-babel-R-evaluate): Break the two branches into
    two separate functions
    (org-babel-R-evaluate-external-process): New function to
    handle external process evaluation
    (org-babel-R-evaluate-session): New function to handle session
    evaluation
2010-08-18 20:20:54 -04:00
Dan Davison 66ca61126c Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-18 15:15:13 -04:00
Dan Davison 23ab61d93c babel: refactor `org-babel-switch-to-session'
* ob.el (org-babel-initiate-session): new function derived
    from previous `org-babel-switch-to-session'
    (org-babel-switch-to-session): refactored to use new
    `org-babel-initiate-session'

This breaks the original `org-babel-switch-to-session' into a new
function `org-babel-initiate-session' and
`org-babel-switch-to-session'.
2010-08-18 15:13:57 -04:00
Dan Davison ad7d9c43c8 babel: Fix prefix version of `org-babel-switch-to-session'
* ob.el (org-babel-switch-to-session): Supply missing "P"
	argument to (interactive)
2010-08-18 15:13:55 -04:00
David Maus d6868e1602 Decode entry according to its character encoding
* org-feed.el (org-feed-format-entry): Decode entry according to its
character encoding.

Feed entries may contain raw unicode characters that must be converted
to utf-8 before they can be properly inserted in the target buffer.
2010-08-18 21:04:04 +02:00
David Maus 7cbc7a67d4 org-feed: Use `xml-substitute-special' for unescaping XML entities.
* org-feed.el (xml-substitute-special): Declare function for byte
compiler.
(org-feed-unescape): Removed.
(org-feed-parse-rss-entry, org-feed-parse-atom-entry): Use
`xml-substitute-special' to unescape XML entities.

TINYCHANGE

Patch by Michael Brand
2010-08-18 20:49:54 +02:00
Dan Davison ed62a85bf7 babel: Throw error on `org-babel-switch-to-session' when :session not in effect
* ob.el (org-babel-switch-to-session): Throw error if block if
    :session not in effect for the block
2010-08-18 13:55:36 -04:00
Carsten Dominik fbc0ce10de Keep compiler happy 2010-08-18 08:41:29 +02:00
Carsten Dominik ce58d6dd0a Align table before converting it to a table.el table
* lisp/org-table.el (org-table-create-with-table.el): Align table
before converting.
2010-08-18 08:35:15 +02:00
Dan Davison 4ac8294020 Avoid error and unnecessary message in transient use of code edit buffer
* ob.el (org-babel-do-in-edit-buffer): Suppress message and
	check that org-src buffer is current before attempting exit

	* org-src.el (org-edit-src-code): New argument quietlyp allows
	message to be suppressed
2010-08-17 23:40:53 -04:00
Dan Davison 76790e1aa8 Get rid of some compiler warnings.
* org-src.el (ob-comint): require 'ob-comint
	(org-src-babel-info): define variable

Also, reposition `org-src-do-at-code-block' and
`org-src-do-key-sequence-at-code-block' function definitions within
the file.
2010-08-17 22:37:19 -04:00
Dan Davison f9cecd192d Make language major mode commands available at Org code blocks.
* ob.el (org-babel-do-in-edit-buffer): New macro to
    evaluate lisp in the language major mode edit buffer.
    (org-babel-do-key-sequence-in-edit-buffer): New function to call
    an arbitrary key sequence in the language major mode edit
    buffer
    * org-src.el (org-src-switch-to-buffer): Add new allowed value
    'switch-invisibly for `org-src-window-setup'.

    * ob-keys.el (org-babel-key-bindings): Bind
    `org-babel-do-key-sequence-in-edit-buffer' to x and C-x in
    `org-babel-map'
2010-08-17 17:46:04 -04:00
Dan Davison 441288ee72 Make Org-babel commands available in code edit buffers
* org-src.el (ob-keys): Require ob-keys, because
    `org-babel-map' is used.
    (org-src-do-at-code-block): New macro to evaluate lisp with
    point at the start of the Org code block containing the code
    in this edit buffer.
    (org-src-do-key-sequence-at-code-block): New function to
    execute command bound to key at the Org code block containing
    the code in this edit buffer.
2010-08-17 17:45:47 -04:00
Dan Davison a4c8bcd31b babel: implement association of R code buffers with R session
* ob-R.el (org-babel-R-associate-session): New function
    to associate R code edit buffers with ESS comint session.
2010-08-17 17:32:23 -04:00
Dan Davison b61e0c4dfc Associate code edit buffer with babel comint session, if one exists.
* org-src.el (org-edit-src-code): If at src block, store babel
	info as buffer local variable.
	(org-src-associate-babel-session): New function to associate
	code edit buffer with comint session. Does nothing
	unless a language-specific function named
	`org-babel-LANG-associate-session' exists.
	(org-src-babel-configure-edit-buffer): New function to be
	called in `org-src-mode-hook'.
	(org-src-mode-hook): add `org-src-babel-configure-edit-buffer'
	to hook.
2010-08-17 17:32:23 -04:00
Dan Davison b05f8c91fe babel: new function `org-babel-switch-to-session-with-code'
* ob.el (org-babel-switch-to-session-with-code): new function
    to generate split frame displaying edit buffer and session.

    * ob-keys.el (org-babel-key-bindings): binding for
    `org-babel-switch-to-session-with-code'
2010-08-17 17:32:23 -04:00
Dan Davison cbe5089e0f Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-17 17:32:11 -04:00
Bastien Guerry 7cc0612e62 org-agenda-clock-out: remove unnecessary "P" in (interactive). 2010-08-17 18:47:57 +02:00
Dan Davison 7917e8ea29 Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-17 11:29:21 -04:00
Carsten Dominik bf3405a6ba Fix tags column for the case when org-indent-mode is active
* lisp/org.el (org-set-tags): Consider org-indent-mode when computing the
tags column.
2010-08-17 08:34:21 +02:00
Carsten Dominik 17ace08e0f Do not use looking-at-p when it does not exist
* lisp/org-compat.el (org-looking-at-p): Only use looking-at-p when defined.
2010-08-17 06:32:55 +02:00
David Maus 1ab9b17ee8 Delete excluded lines directly after call to sorting filter function.
* org-agenda.el (org-finalize-agenda-entries): Delete excluded lines
directly after call to sorting filter function.
2010-08-16 21:06:12 +02:00
Bastien Guerry 244681c44f org-agenda-clock-out: remove unused optional argument "arg". 2010-08-16 20:46:38 +02:00
Carsten Dominik 3082ea9a30 Use a better regexp to find a refile target headline
* lisp/org.el (org-complex-heading-regexp-format): Document the variable.
(org-get-refile-targets): Use `org-complex-heading-regexp-format' to
make the regular expression for matching the headline.

Now we use the format for the complex heading regexp, which means that
Changing the TODO state, level, priority, or tags of a heading will
still allow the heading to be matched by the regexp.
2010-08-16 19:27:38 +02:00
Carsten Dominik 56cf6ad42d Verify that refile cached position is correct
* lisp/org.el (org-refile-check-position): New function.
(org-goto):
(org-refile-get-location): Call `org-refile-check-position'.

Samuel Wales has reported that the cache is loosing it, occasionally.
2010-08-16 19:20:01 +02:00
Carsten Dominik 3529be82ef Fix interpretation of the :include property as a list of file names 2010-08-16 17:27:25 +02:00
Dan Davison 4f82a58e8c babel: python: use eq instead of equal
* ob-python.el (org-babel-python-initiate-session-by-key): use
	eq instead of equal to compare symbols
2010-08-16 11:09:20 -04:00
Carsten Dominik ac8e3fb8d1 New hook to add more properties to new agenda items, or to filter
* lisp/org-agenda.el (org-agenda-before-sorting-filter-function): New hook
function.
(org-finalize-agenda-entries): Apply
`org-agenda-before-sorting-filter-function'.
2010-08-16 15:39:29 +02:00
Carsten Dominik 796318b215 Fix Table attribute issue during PDF export
* lisp/org-latex.el (org-export-latex-first-lines): Do not protect meta
lines that have nothing to do with babel.
2010-08-16 14:28:29 +02:00
Carsten Dominik 6da5c4525a Fix checkitem and item placement bugs in org-capture
* lisp/org-capture.el (org-capture-place-template): Handle the checkitem
case.
(org-capture-place-item): Provide boundaries for the search to make
sure we do not get a match in a different tree.
2010-08-16 10:24:13 +02:00
Sébastien Vauban ff1b5de478 Fontify whole lines* of code-block or meta-lines
Patch by Sebastien Vauban
2010-08-15 08:53:26 +02:00
Stephen Eglen bb0a1f190b Bug: possible bug in latex export [7.01trans (release_6.36.735.g15ca.dirty)]
> FYI: This is a know limitation of the LaTeX exporter[1] and the
> current state of this issue (dealing with skipped levels) is that
> patches for the problem are welcome.  I agree that even if
> skipped-level-headlines are not allowed, they shouldn't be silently
> droped neither.
>
> Best,
>   -- David
>
> [1] http://thread.gmane.org/gmane.emacs.orgmode/26413

I think I have a patch for this, see below.  I've tested it briefly to
see that it works with both oddeven and odd level headings, but I would
appreciate other people taking a closer look/checking that it doesn't
break other things.  I think I found the problem, in that if you have a
structure like

* A

*** B

(i.e. a level one and a level 3)

after it has found the level 1 content, it expects to find a level 2
subtree, whereas in fact there could be a level 2+ tree.  See the
comment in the code for the change I made.

Stephen
2010-08-15 08:34:26 +02:00
Carsten Dominik 2b28ba8800 Fix typo 2010-08-15 07:50:29 +02:00
Carsten Dominik 168fc09928 Minor fix, still in the macro parser 2010-08-14 19:55:57 +02:00
Carsten Dominik 68b960c099 Fix the macro argument parser
* lisp/org-exp.el (org-export-preprocess-apply-macros): Fix the macro
argument parser.

The macro argument parser was swallowing white space after escaped commas.
2010-08-14 16:41:12 +02:00
Carsten Dominik 8c0db0b909 Fix bug with escaping commas in macro arguments 2010-08-14 11:34:39 +02:00
Carsten Dominik d7377a48ee Merge branch 'implement-mathjax-support' 2010-08-14 07:51:38 +02:00
Noorul Islam 5f5af45971 Fix problem when exporting to PDF to a different directory
* lisp/org-latex.el (org-latex-to-pdf-process): Add output-directory
option for the command pdflatex.
(org-export-as-pdf): Respect directory in path of EXPORT_FILE_NAME.

On Wed, Aug 4, 2010 at 1:26 AM, Manuel Amador <amador.manuel@gmail.com>wrote:

> Hi everybody,
>
> I am running into the following issue.
>
> I would like to export certain subtrees of an org file to a particular
> directory. I set the export property as follows:
>
> * Test 1
>   :PROPERTIES:
>   :EXPORT_FILE_NAME: some_directory/some_name
>   :END:
>
>
> When I try exporting the above subtree as a pdf (say for example, by
> running
> C-c C-e 1 d), the .tex file is created in the appropriate target directory,
> but
> the .pdf file is created in the current directory (while emacs mistakenly
> reports that the pdf was not created). Is there a way to get this to work
> correctly?
>
>

Thanks and Regards
Noorul
2010-08-13 22:42:56 +02:00
Carsten Dominik 999078b0bf Implement MathJax support
* lisp/org-exp.el (org-export-with-LaTeX-fragments): New default t, which
now means to use MathJax processing for HTML.  Also allow new value
`dvipng' to force the old image processing.
(org-infile-export-plist): Parse for MATHJAX setup line.
* lisp/org-html.el (org-export-html-mathjax-options): New option.
(org-export-html-mathjax-config): New function.
(org-export-html-mathjax-template): New option.
(org-export-html-preprocess): Call the LaTeX snippet processor with an
additional argument to declare special ways of processing.
(org-export-as-html): Bind the dynamical variable
`org-export-have-math'.  Insert the MathJax script template when it is
needed by the document.
* lisp/org.el (org-preview-latex-fragment): Call `org-format-latex' with
the additional processing argument.
(org-export-have-math): New variable, for dynamic scoping.
(org-format-latex): Implement specific ways of processing.  New
function argument for processing type.
(org-org-menu): Remove the entry to configure LaTeX snippet
processing.

MathJax is now the default for displaying math in a browser.
2010-08-13 14:22:16 +02:00
Bastien Guerry d17cc96fc7 Remove a compiler warning.
Added (defvar org-clock-current-task) to org-agenda.el.
2010-08-13 10:48:40 +02:00
Bastien Guerry 5b8e10aaed Bugfix in org-clock-set-current.
Don't try to get the filename as it break `org-clock-set-current' when
trying to clock in from an indirect capture buffer.
2010-08-13 10:36:16 +02:00
Bastien Guerry 13a05628f4 org-ctrl-c-ctrl-c: document C-cC-c for capture buffer.
Don't mention remember in this docstring.
2010-08-12 15:24:32 +02:00
Bastien Guerry 12e4140f5d org-bbdb: Ignore case in anniv class string.
Based on Jambunathan's suggestion:
http://article.gmane.org/gmane.emacs.orgmode/28508
2010-08-12 11:03:07 +02:00
Bastien Guerry 0f33e18983 org-agenda-clock-goto: complete the docstring. 2010-08-12 10:27:05 +02:00
Bastien Guerry a7a842457d Rebind org-agenda-clock-goto to `J' in the agenda.
* org-agenda.el (org-agenda-clock-goto): Use `\C-c\C-x\C-j' for
`org-clock-goto' and `J' for `org-agenda-clock-goto'.  If the heading
currently clocked in is not listed in the agenda, display this entry
in another buffer.  If there is no running clock, display a help
message.

* org-clock.el (org-clock-set-current): append the filename after the
heading.
2010-08-11 16:10:14 +02:00
Bastien Guerry f0be9ff91b Bugfix: tiny typo in org-capture.el. 2010-08-11 15:08:45 +02:00
Carsten Dominik 0633c6aa09 Capture: Fix indentation of %i 2010-08-11 11:10:02 +02:00