Commit Graph

3350 Commits

Author SHA1 Message Date
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
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
Nicolas Goaziou da656ba48d Table caption produces trailing "nil" in pdf export
Hello,

>>>>> John Hendy writes:

> Suddenly I'm getting a line with nothing but "nil" between the caption and
> the table when exporting from org-mode to LaTeX. I swear this not happening.
> I believe I did a git pull on Friday or some time last week. The only reason
> I noticed is that I just set up emacs, org, and LaTeX on a new computer and
> tested an old file to make sure the export was working. I then checked my
> other computer with what I thought was a fine install and it's doing it now,
> too. I originally thought I missed something on the new computer, but now
> I'm wondering if it's from the fresh pull.

This patch (needed by my own mistake) should correct the problem.

Regards,

-- Nicolas
>From 38a3ae8cf8716af0db87a47a421b6d5af654d045 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Tue, 10 Aug 2010 22:43:35 +0200
Subject: [PATCH] Fix empty label bug

* org-latex.el (org-export-latex-tables): Return "" instead of nil
  when no label is attached.
2010-08-11 09:50:04 +02:00
Carsten Dominik 6a5d28bce7 Fix typo. 2010-08-11 09:45:36 +02:00
Carsten Dominik d34a5a2613 Agenda: Allow compact two-column display in agenda dispatcher
* lisp/org-agenda.el (org-agenda-menu-show-match): New option.
(org-agenda-menu-two-column): New option.
(org-agenda-get-restriction-and-command): Implement dispatch menu
without showing the matcher, and with two-column display.
2010-08-11 09:42:39 +02:00
Bernt Hansen d0a5e11db9 Fix org-indent-mode message when mode is refused
* lisp/org-indent.el (org-indent-mode): Fix grammar for message when mode is refused
2010-08-09 21:52:33 +02:00
Eric Schulte 693cea9bb9 ob.el fixed bug when inserting into empty buffer
* lisp/ob.el (org-babel-insert-result): ensures `beg' is set, even if
  no previous result exists
2010-08-08 22:01:17 -06:00
Noorul Islam 043f088753 fixed compiler warning in ob.el
* lisp/ob.el
  Declare org-babel-lob-execute-maybe() to avoid compiler warning.
2010-08-08 21:30:16 -06:00
Carsten Dominik 13ddc493e4 Fix bugs to keep compiler happy 2010-08-08 22:20:33 +02:00
Carsten Dominik dff92f433e Fix indentation 2010-08-08 08:43:07 +02:00
Noorul Islam 383802d063 Fix :VISIBILITY: handling of nested "folded" properties
On Fri, Jul 30, 2010 at 4:38 PM, Rainer Stengele
<rainer.stengele@online.de>wrote:

> Having
>
> * headline 1
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> ** headline 2.1
>  - stuff
> ** headline 2.1
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> - stuff
>
> C-u C-u <TAB>
>    Switch back to the startup visibility of the buffer, i.e. whatever is
> requested by startup options and  VISIBILITY  properties in individual
> entries.
>
>
> does not result in
>
>
> * headline 1...>
>
>
> as expected. Instead I get:
>
>
> * headline 1...>
> ** headline 2.1...>
> ** headline 2.1...>
>
>
> removing the second folded propertiy results correctly in:
>
> * headline 1...>
>
>
> This looks like a bug in the :VISIBILITY: handling!?
>
>
>
I am not sure whether this is a bug.  But it looks like the above scenario
was not considered initially. I might be wrong.

The attached patch seems to solve this problem.

* lisp/org.el: org-set-visibility-according-to-property ()
  Use backward search instead of forward, so that top hierarchy gets
priority.

Thanks and Regards
Noorul
2010-08-08 08:43:00 +02:00
Carsten Dominik 26714634a9 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-07 08:23:56 +02:00
Carsten Dominik 5188f71ee8 Timeline: Allow the buffer to be an indirect one
* lisp/org-agenda.el (org-timeline): Allow indirect buffer.
2010-08-07 08:23:33 +02:00
Bastien Guerry 5b85810f4d New command: `org-agenda-clock-goto' (C-c C-x C-j)
This command jumps to the headline of the clocking task within the
agenda buffer.  `org-agenda-clock-goto' is bound to `C-c C-x C-j'.

It is different from `org-clock-goto', which jumps to the currently
clocking entry itself (bound to `J').
2010-08-06 19:28:08 +02:00
Bastien Guerry 5236e0ea31 Revert: don't use :html-resolution in `org-create-formula-image'.
http://article.gmane.org/gmane.emacs.orgmode/28415

,----
| From: Carsten Dominik <carsten.dominik@gmail.com>
| Subject: Re: [Orgmode] Change resolution of LaTeX formulas in HTML output?
| To: Bastien <bastien.guerry@wikimedia.fr>
| Cc: amscopub-mail@yahoo.com, emacs-orgmode@gnu.org
| Date: Fri, 6 Aug 2010 12:46:28 +0200
|
| On Aug 5, 2010, at 12:32 AM, Bastien wrote:
|
| > amscopub-mail@yahoo.com writes:
| >
| >> Is there a way to control the resolution of PNG LaTeX formulas when
| >> you export to HTML?
| >
| > I've implemented this.
|
| I would not think that we need this change, the :scale and :html-scale
| parameters do this for in-buffer display and html formatting,
| respectively.
|
| Please revert this change.
|
| - Carsten
`----
2010-08-06 19:20:17 +02:00
Carsten Dominik 251a3ca7c3 Add org-wikinodes.el as a contributed package
* contrib/lisp/org-wikinodes.el: New file.
* lisp/org-exp.el (org-export-preprocess-after-radio-targets-hook):
(org-export-define-heading-targets-headline-hook): New hooks.
* lisp/org.el (org-modules): Add entry for org-wikinodes.el.
(org-font-lock-set-keywords-hook): New hook.
(org-open-at-point-functions): New hook.
(org-find-exact-headling-in-buffer):
(org-find-exact-heading-in-directory): New functions.
(org-mode-flyspell-verify): Better cursor position for checking if
flyspell should ignore a word.
2010-08-06 15:08:45 +02:00
Carsten Dominik d593bae0ff Merge branch 'internal-link-exact-headline-match' 2010-08-06 15:04:59 +02:00
Carsten Dominik b7b6a72869 Do not call modification hooks when triggering indentation
* lisp/org-indent.el (org-indent-remove-properties):
(org-indent-add-properties): Make sure changing these properties does
not trigger modification hooks
2010-08-06 12:51:56 +02:00
Carsten Dominik 2b1d745c09 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/org.el
2010-08-06 12:49:02 +02:00
Carsten Dominik 2ed0545b99 Minor doc fix 2010-08-06 12:48:16 +02:00
Carsten Dominik a84c8a2cba Make internal links in Org files search for an exact headline match
* lisp/org.el (org-link-search-must-match-exact-headline): New option.
(org-link-search-inhibit-query): New variable.
(org-link-search): Search for exact headline match in Org files
* doc/org.texi (Internal links): Document the changes in internal links.

Internal links used to do a fuzzy text search for the link text.  This
patch changes the behavior for Org files.  Here a link [[My Target]]
now searches for an exact headline match, i.e. for a headline that
does look like "* My Target", optionally with TODO keyword, priority
cookie and tags.

The new option `org-link-search-must-match-exact-headline' is
`query-to-create' by default.  This means that a failed link search
will offer to create the headline as a top-level headline at the end
of the buffer.  This corresponds to a wiki-like behavior where missing
targets are automatically created.  If you do not like this behavior,
change the option to t.
2010-08-06 08:34:33 +02:00
Dan Davison 9330ad5b81 babel: single function to execute executable babel elements
* ob.el (org-babel-execute-src-block-maybe): remove check for
    `org-babel-no-eval-on-ctrl-c-ctrl-c'; this is done in the new
    function `org-babel-execute-safely-maybe'

    (org-babel-execute-maybe): new function to execute src blocks
    or lob/call lines.

    (org-babel-execute-safely-maybe): new function to execute src blocks
    or lob/call lines via C-c C-c

    (org-ctrl-c-ctrl-c-hook): remove
    `org-babel-execute-src-block-maybe' and add
    `org-babel-execute-safely-maybe'.

    * ob-lob.el (org-ctrl-c-ctrl-c-hook): remove
    `org-babel-lob-execute-maybe'

    * ob-keys.el (org-babel-key-bindings): New function
    `org-babel-execute-maybe' is bound to C-c C-v e and C-c C-v
    C-e
2010-08-05 13:45:13 -04:00
Dan Davison 2935464811 babel: make `org-babel-load-in-session' work for remote sessions
2010-08-05  Dan Davison  <davison@stats.ox.ac.uk>

	* ob.el (org-babel-load-in-session): set directory in case
	:dir arg is in effect
2010-08-05 00:43:26 -04:00
Bastien Guerry a4b86a8eac New :html-resolution parameter for `org-format-latex-options'.
This parameter default to 140 and controls the resolution of images
created from LaTeX fragments for HTML output.  There is no :resolution
parameter: the resolution of images produced for a buffer is computed
from the font height.)

This was suggested by Uriel (amscopub-mail@yahoo.com).
2010-08-05 00:31:32 +02:00
Eric Schulte 158f5cc726 ob-tangle: don't throw errors when we're not under of a headline
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): don't throw
  errors when we're not under of a headline
2010-08-04 09:20:58 -06:00
Dan Davison 9978dcf21f babel: octave/matlab: use dlmwrite to write delimited text
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el (org-babel-octave-wrapper-method): use dlmwrite
	to write delimited text instead of save -ascii
	(org-babel-octave-import-elisp-from-file): specify that data
	written to file is tab-delimited
2010-08-03 23:54:24 -04:00