Commit Graph

11423 Commits

Author SHA1 Message Date
Nicolas Goaziou 61ad50d758 org-export: Fix #+BIND: keywords evaluation
* contrib/lisp/org-export.el (org-export--install-letbind-maybe): If
  a variable is bound two times in the buffer, be sure to set its
  value to the last bound. Use correct function to confirm binding.
  Allow keyword to start on any column.
* testing/lisp/test-org-export.el: Add tests.
2012-09-01 12:59:57 +02:00
Nicolas Goaziou 06bffa9120 Small refactoring
* lisp/org.el (org-macro-initialize-templates): Small refactoring.
2012-09-01 11:50:51 +02:00
Nicolas Goaziou ea77b2ccb2 org-export: Use new API for macro expansion
* contrib/lisp/org-export.el (org-export-define-backend): Update
  docstring.
(org-export-special-keywords): Remove "MACRO".
(org-export--get-inbuffer-options, org-export--get-buffer-attributes):
Remove internal macro handling.
(org-export-as): Use external tool instead.
(org-export-expand-macro): Remove function.
* contrib/lisp/org-e-ascii.el (org-e-ascii-macro): Remove function.
* contrib/lisp/org-e-groff.el (org-e-groff-macro): Remove function.
* contrib/lisp/org-e-html.el (org-e-html-macro): Remove function.
* contrib/lisp/org-e-latex.el (org-e-latex-macro): Remove function.
* contrib/lisp/org-e-man.el (org-e-man-macro): Remove function.
* contrib/lisp/org-e-odt.el (org-e-odt-macro): Remove function.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-macro): Remove
  function.
* testing/lisp/test-org-export.el: Remove tests.

Since macros are now expanded before parsing (and produce Org syntax),
back-ends will never see them (unless NO-EXPAND argument from
`org-export-as' is non-nil, which isn't the case for any back-end so
far).
2012-09-01 10:56:00 +02:00
Nicolas Goaziou 4a2f3c2093 Implement a basic API around macros
* lisp/org.el (org-mode): Initialize macros templates.
(org-macro-templates): New variable.
(org-macro-expand, org-macro-replace-all,
org-macro-initialize-templates): New functions.
* testing/lisp/test-org.el: Add tests.
2012-09-01 10:56:00 +02:00
Bastien Guerry 2939333e89 Merge branch 'maint' 2012-08-31 07:57:13 +02:00
Bastien Guerry eed50349bc org-colview.el: Fix several bugs
* org-colview.el (org-columns-goto-top-level): Correctly move
the marker `org-columns-top-level-marker'.
(org-agenda-columns): Don't set
`org-agenda-overriding-columns-format' as a buffer variable,
as we only need it dynamically.
(org-agenda-colview-summarize): Fix a bug in returning the
match string.

(The problem with `org-columns-goto-top-level' was introduced
by the commit 8d9e83.)

Thanks to Hannes Schulz and Jacob Riko who reported this.
2012-08-31 07:56:58 +02:00
Bastien Guerry cdbc2d4799 Allow using S-<left/right> to update CLOCKSUM from the column view
* org-colview.el (org-columns-next-allowed-value): Add the
CLOCKSUM property to the list of properties that can be
changed interactively from the column view.

* org.el (org-entry-put): Allow to set the CLOCKSUM property
by updating the most recent clock.  This is useful in the
column view when you want to use S-<left/right> to update the
last clock of the entry at point.

Thanks to Rainer Stengele who suggested something along those
lines.
2012-08-30 16:42:13 +02:00
Nicolas Goaziou 43c0ae945e org-e-latex/org-e-beamer: Allow inserting class option when there was none
* contrib/lisp/org-e-beamer.el (org-e-beamer-template): Allow
  inserting class option when there was none.
* contrib/lisp/org-e-latex.el (org-e-latex-template): Allow inserting
  class option when there was none.

Thanks to Fabrice Popineau for suggesting this.
2012-08-30 15:54:33 +02:00
Bastien Guerry 152ad3362e org.el: Refine `org-image-actual-width' again
* org.el (org-image-actual-width): New choice: use #+ATTR* or
fall back on a number.
(org-display-inline-images): Implement the new choice.
2012-08-30 15:47:34 +02:00
Bastien Guerry 928bb90861 org.el: Rename `org-image-fixed-width' to `org-image-actual-width' and refine
* org.el (org-image-actual-width): Rename from
`org-image-fixed-width'.  Update the docstring.  Give more
choice.
(org-display-inline-images): Use the option new choices.
2012-08-30 15:02:58 +02:00
Bastien Guerry 2e8543f5d9 org.el: New option to set a fixed width for inline images
* org.el (org-image-fixed-width): New option to set a fixed
width for inline images.
(org-display-inline-images): Use the new option.

This option only takes effect for Emacs >=24.1, build with
imagemagick support.

Thanks to Alexander Willand who requested a similar feature.
2012-08-30 14:22:48 +02:00
Bastien Guerry 754195477f Merge branch 'maint' 2012-08-30 13:23:53 +02:00
Bastien Guerry 93fcfe4d36 org-agenda.el: Fix ̀org-agenda-goto-date' again
* org-agenda.el (org-agenda-span-to-ndays): Make the second
argument `starting-day' optional.
(org-agenda-goto-date): Keep parameters of custom agendas.
2012-08-30 13:23:29 +02:00
Bastien Guerry 910291da3b Merge branch 'maint' 2012-08-30 12:12:18 +02:00
Bastien Guerry 4f601b6748 org-agenda.el: Fix compiler warning 2012-08-30 12:11:57 +02:00
Bastien Guerry b6ae8dd0f7 Merge branch 'maint' 2012-08-30 11:52:40 +02:00
Bastien Guerry b78520e149 org-agenda.el: Fix another bug with `org-agenda-goto-date' with sticky agendas
* org-agenda.el (org-agenda-list): Allow setting the agenda
buffer name through a temporary variable.
(org-agenda-buffer-tmp-name): New variable to temporary store
the agenda buffer name.

Thanks to Rainer Stengele for reporting this bug.
2012-08-30 11:52:16 +02:00
Bastien Guerry dfe33f9b6e Merge branch 'maint' 2012-08-30 10:56:53 +02:00
Bastien Guerry a2c4d3e0e9 org-agenda.el (org-agenda-goto-date): Fix behavior when using sticky agendas
* org-agenda.el (org-agenda-goto-date): Fix behavior when
using sticky agendas.

Thanks to Charles Philip Chan and Rainer Stengele who reported
problems about this.
2012-08-30 10:56:35 +02:00
Bastien Guerry 5d16834906 Merge branch 'maint' 2012-08-30 10:33:33 +02:00
Mike Sperber 1e678d8cba XEmacs: Make call to `fill-paragraph' work on XEmacs.
2012-08-25  Michael Sperber  <mike@xemacs.org>

* org.el (org-fill-paragraph): Pass optional argument to
`fill-paragraph' to fix compatibility with XEmacs.
2012-08-30 10:32:54 +02:00
Bastien Guerry e72acc0e1f Merge branch 'maint' 2012-08-30 10:25:58 +02:00
Mats Lidell 8e88bc0e0b org-element.el: Remove illegal t clause in case
* lisp/org-element.el (org-element-paragraph-separate): Remove
redundant and misplaced t clause in case.

TINYCHANGE
2012-08-30 10:25:44 +02:00
Bastien Guerry 383806e5ef Merge branch 'maint' 2012-08-30 10:13:59 +02:00
Mike Sperber 501db42c8c XEmacs: Default `org-self-insert-cluster-for-undo' also on XEmacs.
2012-08-25  Michael Sperber  <mike@xemacs.org>

	* org.el (org-self-insert-cluster-for-undo): Default
	`org-self-insert-cluster-for-undo' also on XEmacs.
2012-08-30 10:13:52 +02:00
Bastien Guerry ae87d2933c Merge branch 'maint' 2012-08-30 10:10:27 +02:00
Bastien Guerry b74140e1b0 org-agenda.el: Unconditionnally set ̀org-compile-prefix-format'
* org-agenda.el (org-diary): Don't check whether there is an
agenda buffer when trying to compile the prefix format.
(org-compile-prefix-format): Check if there is an agenda
buffer.  If not, use the current buffer.
2012-08-30 10:10:18 +02:00
Bastien Guerry c48f322b55 Merge branch 'maint' 2012-08-30 09:52:14 +02:00
Bastien Guerry 92f2e9efb2 org-agenda.el: Fix bug in `org-agenda-get-day-entries'
* org-agenda.el (org-agenda-get-day-entries): Set the agenda
buffer inconditionnally.

For example, when `org-agenda-get-day-entries' is called
through ̀org-diary', we need to make sure `org-agenda-buffer'
is set, otherwise org-diary triggers an error.
2012-08-30 09:52:03 +02:00
Bastien Guerry 9b67fb855a org-agenda.el: Allow to use holiday strings for the `skip-weeks' arguments
* org-agenda.el (org-class): Allow to use holiday strings for
the `skip-weeks' arguments.

Thanks to Enda for this suggestion.

For example, this task will now be skipped only on new year's day:

* Task
  <%%(org-class 2012 1 1 2013 12 12 2 "New Year's Day")>
2012-08-30 09:48:11 +02:00
Bastien Guerry 52479c75bf Merge branch 'maint' 2012-08-30 09:02:57 +02:00
Bastien Guerry a740781fe2 ob.el (org-babel-named-src-block-regexp-for-name): Generate a more general regexp
* ob.el (org-babel-named-src-block-regexp-for-name): Generate
a more general regexp.

Thanks to Loris Bennett for reporting this, and to Nicolas Girard for
pointing out what was the problem precisely.
2012-08-30 08:58:02 +02:00
Bastien Guerry 4b3f64fdcc ob.el: Find a src block head correctly when #+header(s) is before #+name
* ob.el (org-babel-where-is-src-block-head): Find a src block
head correctly when #+header(s) is before #+name.
2012-08-30 08:45:50 +02:00
Bastien Guerry b00a355adb org.el (org-mode): Set the syntax of the " character to "string quote"
* org.el (org-mode): Set the syntax of the " character to
"string quote".

Thanks to Samuel Wales for asking a related question and to Nick Dokos
for suggesting this solution.
2012-08-30 07:03:36 +02:00
Bastien Guerry 96cef218f0 Clean-up variables declaration
Remove some duplicate declarations.
When the variable is declared in another file,
use (defvar [var]).  When it is dynamically bound
in this file (defvar [var]) is enough, but mixed
installations make (defvar [var] [val]) safer.
2012-08-30 06:39:35 +02:00
Bastien Guerry 9f60211944 Merge branch 'maint' 2012-08-30 06:24:32 +02:00
Bastien Guerry c1ce6143b7 org-agenda.el: Rename org-finalize-agenda* to org-agenda-finalize*
* org-agenda.el (org-agenda-finalize-hook)
(org-agenda-finalize, org-agenda-finalize-entries): Rename
from org-finalize-agenda-*.
(org-agenda-run-series, org-agenda-finalize, org-timeline)
(org-agenda-list, org-search-view, org-todo-list)
(org-tags-view, org-diary, org-agenda-finalize-entries)
(org-agenda-change-all-lines): Use the new names.
2012-08-30 06:24:22 +02:00
Jonathan Leech-Pepin 2b9cc23dd0 contrib/lisp/org-e-texinfo: Properly format table heading rows
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-table-row): Check if the row is part of the first row group.  If it is treat it as @headitem rather than a normal @item.
2012-08-29 15:14:03 -04:00
Bastien Guerry 3b792443c1 Merge branch 'maint' 2012-08-29 20:19:47 +02:00
Sean O'Halpin 71af82f55e Fix: org-e-html-special-block had not been converted from LaTeX version
* contrib/lisp/org-e-html.el (org-e-html-special-block): convert LaTeX
markup to HTML

This function had not been modified from its org-e-latex-special-block original
so with #+BEGIN_ORG for example you would get \begin{org}...\end{org}
in the output instead of <div class="org">...</div>.

TINYCHANGE
2012-08-29 20:19:35 +02:00
Bastien Guerry aa476db48c Merge branch 'maint' 2012-08-29 20:16:07 +02:00
Bastien Guerry 555ffa084d org-agenda.el: Fix initialization of some variables 2012-08-29 20:15:47 +02:00
Bastien Guerry 23853e4f66 Merge branch 'maint' 2012-08-29 19:55:44 +02:00
Muchenxuan Tong e2329cc961 org-timer.el: Check `org-timer-display' in `org-timer-set-mode-line' when value is 'off
* lisp/org-timer.el (org-timer-set-mode-line): Check
`org-timer-display' when value is 'off.

This solves the error of (org-timer-set-mode-line 'off) when
`org-timer-display' is 'mode-line. In this case `frame-title-format'
may not be a list.

TINYCHANGE
2012-08-29 19:54:44 +02:00
Bastien Guerry b05621d2b9 Merge branch 'maint' 2012-08-29 19:41:23 +02:00
Stuart Hickinbottom 4f5bd2522e Fix org-clock evaluation startup hang on Windows
* lisp/org-clock.el (org-x11idle-exists-p): Only shell out when running
on X.

The definition of this variable currently executes "command" via the
shell during evaluation, irrespective of the platform on which
Org-mode is running. Unfortunately, on Windows, this matches the
"command.com" NT Virtual DOS Machine executable and so this gets
launched, but this is a shell and therefore sits there waiting for
user input and never returns. The net result is that Emacs will hang
on Windows when evaluating org-clock.el with the ntdvm.exe process
spinning at 100%.

The simple fix is to check that the platform is X before trying to
deal with the "x11idle" external process.

TINYCHANGE
2012-08-29 19:41:14 +02:00
Bastien Guerry 51befd3db0 Merge branch 'maint' 2012-08-29 19:18:25 +02:00
Bastien Guerry 0455cc2084 org-agenda.el: Rewrite of the redo/change/append commands
* org-agenda.el (org-agenda-local-vars): Remove
̀org-agenda-last-arguments' from the list of local variables.
(org-agenda-mode-map): `g' does the same than `r' in buffers
with only one agenda view, but its behavior differs when there
are several views.  In manually appended agendas (with `A'),
`g' displays only the agenda under the point.  With multiple
agenda blocks, `g' reinitializes the view by discarding any
temporary changes (e.g. with ̀f' or `w'), while ̀r' keeps those
temporary changes for the agenda view under the point.
(org-agenda-run-series, org-agenda-redo): Implement the above
changes.
(org-agenda-mark-header-line): Don't set useless properties.
(org-agenda-list, org-todo-only, org-search-view)
(org-todo-list, org-tags-view, org-agenda-list-stuck-projects)
(org-agenda-manipulate-query, org-agenda-goto-today)
(org-agenda-later, org-agenda-change-time-span): Use text
properties for storing the last command and the last arguments
for each agenda block.
(org-unhighlight-once): Delete.
2012-08-29 19:18:05 +02:00
Bastien Guerry 31268add96 Merge branch 'maint' 2012-08-29 01:05:49 +02:00
Bastien Guerry 69e99dff07 org-agenda.el (org-agenda-append-agenda): Fit agenda window to buffer
* org-agenda.el (org-agenda-append-agenda): Fit agenda window
to buffer.
2012-08-29 01:05:34 +02:00