Commit Graph

12855 Commits

Author SHA1 Message Date
Nicolas Goaziou 48da6a46e0 Move macro expansion code into its own library
* lisp/org-macro.el: New file.
* lisp/org.el: Remove macro code.
* lisp/ox.el: Require new library
* testing/lisp/test-org-macro.el: New file.
* testing/lisp/test-org.el: Remove macro test.
2013-02-16 15:55:30 +01:00
Nicolas Goaziou f33d90fb28 ox: Fuzzy link matching ignores statistics cookies
* lisp/ox.el (org-export-resolve-fuzzy-link): Ignore statistics
  cookies when matching an headline.
* testing/lisp/test-ox.el: Add test.
2013-02-16 15:05:45 +01:00
Bastien Guerry 9c4d403ada org.el (org-mode): Use org-unmodified during startup initialization for functions that may be inhibited
* org.el (org-mode): Use org-unmodified during startup
initialization for functions that may be inhibited.
2013-02-16 14:10:14 +01:00
Bastien Guerry adcc0d414b org-table.el (org-table-align): Only set the window start when table alignment is performed in the selected window
* org-table.el (org-table-align): Only set the window start
when table alignment is performed in the selected window.

Thanks to Michael Brand for reporting this.

When opening an .org file from another .org file, org-mode
is initialized in the second one while the window is not yet
selected.  So, functions run during org-mode's initialization
need to check if the org-mode window is the selected one before
manipulating the "current window".
2013-02-16 14:08:47 +01:00
Bastien Guerry 09ffff9cee Merge branch 'master' of orgmode.org:org-mode 2013-02-16 11:35:59 +01:00
Bastien Guerry 25aabd7d2f org-src.el (org-edit-src-auto-save-idle-delay): New option
* org-src.el (org-edit-src-auto-save-idle-delay): New option.
(org-src-ask-before-returning-to-edit-buffer): Make a defcustom.
(org-edit-src-code-timer): New timer variable.
(org-edit-src-code): Run the timer.
(org-edit-fixed-width-region): Enhance message.
(org-edit-src-exit): Cancel the timer.

Thanks to Andreas Leha for suggesting this.
2013-02-16 11:35:39 +01:00
Achim Gratz 213e168c53 Merge branch 'maint' 2013-02-16 11:15:37 +01:00
Achim Gratz 45d52bfb4c fix wrong key for org-reload uncompiled in menu
* lisp/org.el (org-org-menu): Use correct key "C-u C-c C-x !" to do
  org-reload uncompiled in the menu.

The key binding has been changed in 8619361669 due to a conflict with
agenda mode, but the menu entry had never been corrected.
2013-02-16 11:14:35 +01:00
Bastien Guerry 602d6edb56 org-src.el: Prevent saving when editing fixed-width buffer, exiting will save already
* org-src.el (org-edit-src-save): Prevent saving when editing
fixed-width buffer, exiting will save already.
(org-edit-src-exit): Inconditionally kill the src/example
editing buffer.
2013-02-16 10:35:08 +01:00
Nicolas Goaziou 3eac442249 ox: Display a visible help for scrolling dispatcher's buffer
* lisp/ox.el (org-export--dispatch-ui): Display a help message in
  header line for scrolling dispatcher's buffer
2013-02-16 08:59:45 +01:00
Bastien Guerry 9215a8c6c3 org-pcomplete.el (pcomplete/org-mode/file-option): Require 'org-element.
* org-pcomplete.el (pcomplete/org-mode/file-option): Require
'org-element.  This fixes a bug about unbound variable
`org-element-affiliated-keywords' when trying to complete a
keyword before 'org-element was required.
2013-02-16 08:26:08 +01:00
Bastien Guerry 88c79b8071 Clean up commented code. 2013-02-16 07:56:43 +01:00
Aaron Ecay 23d9920e00 org-bibtex.el: Use visual-line-mode instead of longlines-mode
* org-bibtex.el (org-bibtex-ask): Use visual-line-mode instead
of longlines-mode.

TINYCHANGE
2013-02-15 23:36:16 +01:00
Bastien Guerry 996e3b6da3 Merge branch 'master' of orgmode.org:org-mode 2013-02-15 23:11:28 +01:00
Bastien Guerry 1ee94060bc org-list.el (org-list-bullet-string): Small fix
* org-list.el (org-list-bullet-string): Replace match when
there is a match, otherwise just return the bullet.
2013-02-15 23:09:10 +01:00
Nicolas Goaziou 2df6ded853 ox: Fix radio link resolution
* lisp/ox.el (org-export-resolve-radio-link): Radio targets are
  case-insensitive.
* testing/lisp/test-ox.el: Add test.
2013-02-15 23:03:29 +01:00
Bastien Guerry 6dd035c925 Merge branch 'master' of orgmode.org:org-mode 2013-02-15 22:59:29 +01:00
Bastien Guerry 7c9663eb4a org-src.el: Allow to abort editing with C-c k
* org-src.el (org-src-mode-map): New binding C-c k to abort
editing.
(org-edit-src-code): Mention the keybinding to abort editing
and go back to the correct position.
(org-edit-src-abort): New command to abort editing.

Thanks to Zech for suggesting this.
2013-02-15 22:59:13 +01:00
Nicolas Goaziou daa1d7d8f8 Fix some docstrings
* lisp/ox-icalendar.el (org-export-icalendar): Fix docstring.
* lisp/ox.el (org-export-dispatch): Fix docstring.
2013-02-15 22:01:49 +01:00
Bastien Guerry 451e8be770 ox-html.el (org-html--build-meta-info): Add a newline before the title meta information
* ox-html.el (org-html--build-meta-info): Add a newline before
the title meta information.
2013-02-15 21:50:35 +01:00
Bastien Guerry a2fac38d56 Merge branch 'master' of orgmode.org:org-mode 2013-02-15 19:52:35 +01:00
Bastien Guerry 006bbe6e62 orgguide.texi: Small updates
* orgguide.texi (@LaTeX{} and PDF export): Fix option's name.
Update maintainer contact information.
2013-02-15 19:52:23 +01:00
Bastien Guerry 5864432451 org.texi: Update the maintainer contact info
* org.texi: Update the maintainer contact info.
2013-02-15 18:41:46 +01:00
Bastien Guerry 9fa715b7f7 org.el: Fix the names of the HTML export and publishing options
* org.texi (HTML preamble and postamble)
(Tables in HTML export, Images in HTML export)
(Math formatting in HTML export, CSS support)
(@LaTeX{} and PDF export, Publishing options): Fix the names
of the HTML export and publishing options.
2013-02-15 18:40:38 +01:00
Nicolas Goaziou 68ab722a49 ox: Small improvement to scrolling
* lisp/ox.el (org-export--dispatch-action): Small improvement to line
  by line scrolling.
2013-02-15 18:32:47 +01:00
Nicolas Goaziou 4f2fccefc5 ox: Small refactoring
* lisp/ox.el (org-export-resolve-fuzzy-link): Refactor.
2013-02-15 18:30:14 +01:00
Nicolas Goaziou 78a652716e ox: Whitespaces are not significant when matching a fuzzy link
* lisp/ox.el (org-export-resolve-fuzzy-link): Whitespaces are not
  significant when matching a fuzzy link.
* lisp/org-element.el (org-element-link-parser): Do not remove
  newlines characters in paths anymore, since this is not required.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-ox.el: Add test.
2013-02-15 18:08:03 +01:00
Nicolas Goaziou 5a1d46b990 ox: Implement vertical scrolling in non-expert UI
* lisp/ox.el (org-export--dispatch-ui): Renamed from
  `org-export-dispatch-ui'.  Handle scrolling.
(org-export--dispatch-action): Renamed from
`org-export-dispatch-action'.  Implement scrolling.
(org-export-dispatch): Apply renaming.

Heavily based on a patch from Jambunathan K.
2013-02-15 17:24:20 +01:00
Bastien Guerry 1298b6468a Merge branch 'master' of orgmode.org:org-mode 2013-02-15 16:48:40 +01:00
Bastien Guerry 7306e04193 org.el (org-return-follows-link): Mention that this does not affect the behavior of RET in tables
* org.el (org-return-follows-link): Mention that this does not
affect the behavior of RET in tables.
2013-02-15 16:44:58 +01:00
Bastien Guerry 4d7f4d87fb Fix last commit 2013-02-15 16:42:04 +01:00
Nicolas Goaziou 0b6a2e2416 C-c C-c does nothing when at a blank line
* lisp/org.el (org-ctrl-c-ctrl-c): Do nothing when at a blank line,
  but still run `org-ctrl-c-ctrl-c-final-hook'.
2013-02-15 16:14:15 +01:00
Nicolas Goaziou dbadb2916b Remove unnecessary `ignore-error'
* lisp/org.el (org-end-of-line): Remove `ignore-error'.  It is
  unnecessary since 3bc8c9647a.
2013-02-15 16:14:09 +01:00
Nicolas Goaziou 3bc8c9647a org-element: Fix error and infloop in `org-element-at-point'
* lisp/org-element.el (org-element-at-point): Return nil when in the
  first empty lines of the buffer.  Return headline when in empty
  lines just after the headline.
2013-02-15 16:13:53 +01:00
Bastien Guerry 94dbeedd4a ox-html.el (org-html--build-mathjax-config): Do not always include MathJax configuration
* ox-html.el (org-html--build-mathjax-config): Only include
MathJax configuration if the resulting HTML contains LaTeX
fragments.
2013-02-15 15:50:38 +01:00
Bastien Guerry 0641a22606 Fix typo and compiler warnings 2013-02-15 15:39:12 +01:00
Bastien Guerry 5d467d6f8a org.texi: Fix LaTeX options names
* org.texi (Literal examples, Export options)
(@LaTeX{} and PDF export, Header and sectioning)
(Publishing options): Fix LaTeX options names.
2013-02-15 15:28:35 +01:00
Nicolas Goaziou a8e48bd3a8 Prevent export to file from overwriting current file
* lisp/ox.el (org-export-output-file-name): Add a protection when
  output file name is the same as the original org.
* testing/lisp/test-ox.el: Add tests.
2013-02-15 15:06:01 +01:00
Nicolas Goaziou 5bceb62142 ox-latex/beamer: Fix reported error when no suitable class is found
* lisp/ox-beamer.el (org-beamer-template): Add missing `class'
argument for `format-string'.
* lisp/ox-latex.el (org-latex-template): Add missing `class' argument
for `format-string'.

Thanks to Sébastien Vauban for reporting the problem and providing the
initial patch.
2013-02-15 14:18:59 +01:00
Bastien Guerry 5cdf84ea68 org.el: New functions `org-drag-line-forward' and `org-drag-line-backward'
* org.el (org-syntax-table, org-transpose-words): Delete.
(org-mode): Syntactically Define {} and <> as parentheses.
(org-drag-line-forward, org-drag-line-backward): New
functions.
(org-shiftmetaup, org-shiftmetadown): Fall back on the new
functions instead of throwing an error.

M-up/down used to drag a line up or down in contexts where it could not do
another move.  When org-element.el was integrated to core, dragging line by
line was not possible anymore since a line is not an "element".  This
commit reintroduces the ability to drag a line up/down with S-M-<up/down>.
2013-02-15 12:12:15 +01:00
Bastien Guerry 7afb487a28 org.el (org-make-org-heading-search-string): Don't use statistic or [x/y] cookies when creating a link
* org.el (org-make-org-heading-search-string): Don't use
statistic or [x/y] cookies when creating a link.

Thanks to William Lechelle for reporting this.
2013-02-15 11:15:57 +01:00
Rüdiger Sonderfeld 614a80490f org-contacts: Fix Agenda format.
* contrib/lisp/org-contacts.el: Use `org-agenda-prefix-format' to
  format entry instead of unused org-agenda-format.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2013-02-14 21:41:25 +01:00
Grégoire Jadi aff4b0b2de Do not complete when it's not necessary
* contrib/lisp/org-contacts.el (org-contacts-message-complete-function):
  Remove `completion-in-region--postch' from `post-command-hook'
  because it doesn't (seem?) do anything really useful.
2013-02-14 21:23:10 +01:00
Grégoire Jadi 5800920c99 Add caching mecanism
* contrib/lisp/org-contacts.el: Add a caching mecanism around
  `org-contacts-filter'.
2013-02-14 21:21:44 +01:00
Nicolas Goaziou 8768fd125f ox: Docstring fix
* lisp/ox.el (org-export-stack-mode): Fix docstring.
2013-02-14 20:38:31 +01:00
Gregor Kappler 12d592b732 Export: Prevent babel src blocks from being evaluated if org-export-babel-evaluate is nil
* lisp/ox.el (org-export-as): Make sure org-export-babel-evaluate is not nil before calling `org-export-execute-babel-code'.

TINYCHANGE
2013-02-14 18:58:51 +01:00
Jonathan Leech-Pepin 0f6cb7f850 ox-texinfo: Ensure detailed menu generation does not exceed maximum
recognized depth

* lisp/ox-texinfo.el (org-texinfo-max-toc-depth): Maximum depth
  recognized by texinfo for nodes and sectioning.  Left as a constant
  to be updated if ever necessary.
(org-texinfo--generate-detailed): Use the smaller between
org-texinfo-max-toc-depth and headline levels (H: )
2013-02-14 11:59:48 -05:00
Nicolas Goaziou 3f421f309f Small fixes to completion
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option): Allow
  completion for ATTR_ prefixed keywords.
* lisp/org.el (org-options-keywords): Add missing colons.
2013-02-14 17:50:58 +01:00
Bastien Guerry 131d70ab48 ox-html.el (org-html-table): Append #+attr_html attributes
* ox-html.el (org-html-table): Append #+attr_html attributes.

Thanks to Дядов Васил Стоянов for reporting this and for a preliminary
patch.
2013-02-14 11:07:18 +01:00
Bastien Guerry 6aa8829a1a Merge branch 'maint' 2013-02-14 10:40:04 +01:00