Commit Graph

9766 Commits

Author SHA1 Message Date
Rick Frankel e955be903a Add better svg support to html exporter.
* lisp/ox-html.el (org-html--format-image): If image is an svg file,
  format as "object" using new function `org-html--svg-image' instead
  of "img".
2014-01-16 17:35:55 -05:00
Rick Frankel 1376df2648 Use an overridable list of available doctypes for customization.
* lisp/ox-html.el (org-html-doctype): Use choice of available
  doctypes (from `org-html-doctype-alist) plus user-entered string.
2014-01-16 17:35:39 -05:00
Nicolas Goaziou 6ef2bd0ef0 Merge branch 'maint' 2014-01-16 16:24:15 +01:00
Yasushi SHOJI b7c1014353 ox-ascii: Convert `length' to `string-width'
* lisp/ox-ascii.el (org-ascii--current-text-width): Convert `length'
  to `string-width'.
  (org-ascii--build-title, org-ascii--build-toc)
  (org-ascii--list-listings, org-ascii--list-tables)
  (org-ascii-template--document-title)
  (org-ascii-inner-template, org-ascii-format-inlinetask-default)
  (org-ascii-format-inlinetask-default, org-ascii-item
  (org-ascii--table-cell-width, org-ascii-table-cell)
  (org-ascii--current-text-width): Likewise.

I've checked all occurrences of the function `length' in ox-ascii.el.
It turns out that the most of them are calculating the width of given
string.  To support fullwidth characters, we better use `string-width'
instead of `length'.

Some characters in UCS are categorized as "East Asian Ambiguous"[1].
The return value of `string-width' with those characters depends on
how Emacs is setup.  We leave those ambiguous character handling to
Emacs.

Two usages of `length' in `ox-ascii.el' were left as-is, because those
were used for:

 - bullet depth calculation in `org-ascii-headline', and
 - cell position calculation in `org-ascii--table-cell-width'.

[1]: http://www.unicode.org/reports/tr11/#Ambiguous
2014-01-16 16:17:48 +01:00
Nicolas Goaziou d99ffcf954 Merge branch 'maint' 2014-01-16 15:52:12 +01:00
Nicolas Goaziou 7d3205a20f ox-latex: Fix items starting with a square bracket
* lisp/ox-latex.el (org-latex-headline, org-latex-item): Fix items
  starting with a square bracket.

Thanks to Jon Degenhardt, Vladimir Lomov and Eric S Fraga for
contributing to the discussion.
2014-01-16 15:49:34 +01:00
Bastien Guerry 81dad90342 Merge branch 'maint' 2014-01-16 12:07:37 +01:00
Bastien Guerry d16477913d Fix ff902c 2014-01-16 12:07:27 +01:00
Bastien Guerry 3fafad7eec Merge branch 'maint' 2014-01-16 11:57:55 +01:00
Bastien Guerry be54f049dd Backport Emacs trunk revno r116039 2014-01-16 11:57:45 +01:00
Bastien Guerry c7408a2bd7 Merge branch 'maint' 2014-01-16 01:19:49 +01:00
Nicolas Goaziou d4b653656e org.el (org-mode-restart): Fix turning off `org-indent-mode' when necessary
* org.el (org-mode-restart): Fix turning off `org-indent-mode'
when necessary.
2014-01-16 01:18:30 +01:00
Bastien Guerry a4a2935c3f org.el (customize-package-emacs-version-alist): Fix Org version for Emacs 24.4
* org.el (customize-package-emacs-version-alist): Fix Org
version for Emacs 24.4.
2014-01-16 01:13:15 +01:00
Bastien Guerry 73a6aba4b7 org.el (customize-package-emacs-version-alist): Fix Org version for Emacs 24.4
* org.el (customize-package-emacs-version-alist): Fix Org
version for Emacs 24.4.
2014-01-16 01:12:51 +01:00
Bastien Guerry c31782d903 org.el (org-src-fontify-natively): Default to `t'
* org.el (org-src-fontify-natively): Default to `t'.

Thanks to Sébastien Vauban for pushing this.
2014-01-16 01:11:33 +01:00
Bastien Guerry a5a7231304 Merge branch 'maint' 2014-01-16 00:55:46 +01:00
Bastien Guerry e7ebe4163a Fix bf0649 2014-01-16 00:53:28 +01:00
Bastien Guerry ff902c4429 Remove spurious defvar
Thanks to Nicolas Goaziou for reporting this.
2014-01-16 00:52:46 +01:00
Bastien Guerry 27ab61acd0 Fix 4a9820 2014-01-16 00:35:12 +01:00
Bastien Guerry 8898c380ab Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-01-15 09:22:59 +01:00
Bastien Guerry 0a8fe04a9d Merge branch 'maint' of orgmode.org:org-mode into maint 2014-01-15 09:21:59 +01:00
Bastien Guerry 947c3f5c2a Fix 035087777 2014-01-15 09:21:44 +01:00
Bastien Guerry d9797ca17e Revert "org.el (org-store-link): When a link has been stored, always returns it"
This reverts commit 035087777d.
2014-01-15 09:19:30 +01:00
Carsten Dominik 723306d6e7 Fix mode reset 2014-01-14 20:45:54 +01:00
Bastien Guerry 8694aa9352 Merge branch 'master' of orgmode.org:org-mode 2014-01-14 15:49:03 +01:00
Bastien Guerry 5cd6b30182 Merge branch 'maint' 2014-01-14 12:39:01 +01:00
Bastien Guerry 4a9820067a Fix bug when demoting invisible headlines
* org.el (org-demote): Ignore invisible text when aligning
tags.
(org-set-tags): When JUST-ALIGN is 'ignore-column, ignore
invisible text when restoring the cursor to the correct
column.

This fixes a bug about demoting hidden headlines.
If org-move-to-column temporarily ignore visibility
specs, this will prevent org-demote to work correctly
in hidden regions.

Thanks to Susan Cragin for reporting this bug.
2014-01-14 12:38:50 +01:00
Michael Brand 46f6fe3655 TBLFM remote ref indirection: Fix start
* lisp/org-table.el (org-table-remote-reference-indirection): Change
the local variable START to a value that will be still valid after
`replace-match'.
2014-01-13 20:23:11 +01:00
Nicolas Goaziou ae0f1c56a7 Small refactoring
* lisp/org.el (org-toggle-item): Do not call `org-list-struct' twice
  and fix checkboxes after modifying one of them.

This patch is relative to 213c2a6aa0.
2014-01-13 17:58:16 +01:00
Bastien Guerry 6ea3dee45d org.el (org-edit-special): Use `find-file-other-window'
* org.el (org-edit-special): Use `find-file-other-window' when
visiting included files.
2014-01-13 01:11:53 +01:00
Nick Dokos a49740ec83 Delete :grouptags from tags list when creating org-mobile index file
* org-mobile.el (org-mobile-create-index-file): delete :grouptags
  entries from tags list when creating the org-mobile index file.

Reported by Dror Atariah - see

    http://thread.gmane.org/gmane.emacs.orgmode/79803

and (the continuation of the above thread)

    http://thread.gmane.org/gmane.emacs.orgmode/79856
2014-01-13 00:27:50 +01:00
Bastien Guerry 672b58a803 Merge branch 'maint' 2014-01-13 00:25:38 +01:00
Bastien Guerry dac6d880b7 ob-python.el (org-babel-python-var-to-python): Bugfix
* ob-python.el (org-babel-python-var-to-python): Bugfix: Strip
properties before formatting the results.

Thanks to Daniel Gerber for reporting this and providing a fix,
and to others who contributed.
2014-01-13 00:25:25 +01:00
Bastien Guerry 213c2a6aa0 org.el (org-toggle-item): Handle TODO and DONE keywords
* org.el (org-toggle-item): When an entry has a TODO or a DONE
keyword, add an empty or a checked checkbox.
2014-01-13 00:02:42 +01:00
Bastien Guerry b9e1dd8ff8 Merge branch 'maint' 2014-01-12 23:57:08 +01:00
Bastien Guerry bf0649c6fc Agenda: Fix dragging line in filtered agendas
* org-agenda.el (org-agenda-regexp-filter-preset): Fix
typo in docstring.
(org-agenda-reapply-filters): New function.
(org-agenda-drag-line-forward): Rewrite to fix a bug when used
in filtered agendas.
(org-agenda-drag-line-backward): Rewrite using
`org-agenda-drag-line-forward'.

Thanks to Thomas Morgan for reporting this.
2014-01-12 23:56:54 +01:00
Bastien Guerry 27b6b164ef Merge branch 'master' of orgmode.org:org-mode 2014-01-12 12:44:49 +01:00
Bastien Guerry e9e182a7f5 Merge branch 'maint' 2014-01-12 12:02:57 +01:00
Bastien Guerry a0610f0775 ob-table.el (org-sbe): Rename from `sbe'
* ob-table.el (org-sbe): Rename from `sbe'.
2014-01-12 12:02:25 +01:00
Michael Brand 9a5b8a7434 TBLFM remote ref: Improve indirection
* lisp/org-table.el (org-table-remote-reference-indirection): Use the
optional arg START of `string-match' to improve performance and to
avoid endless loop on user error.
2014-01-12 11:52:40 +01:00
Michael Brand bc1d54b84b TBLFM remote ref: Add indirection of name or ID
* doc/org.texi (References): Add description for indirection of
NAME-OR-ID.

* lisp/org-table.el (org-table-eval-formula): Make use of
`org-table-remote-reference-indirection'.
(org-table-remote-reference-indirection): New function.

* testing/lisp/test-org-table.el
(test-org-table/remote-reference-indirect): Change to use remote
reference indirection.
2014-01-12 10:53:06 +01:00
Bastien Guerry 90884b9748 Merge branch 'master' of orgmode.org:org-mode 2014-01-12 10:03:38 +01:00
Bastien Guerry 72b8a86d9c Merge branch 'maint' 2014-01-12 10:03:17 +01:00
Bastien Guerry 035087777d org.el (org-store-link): When a link has been stored, always returns it
* org.el (org-store-link): When a link has been stored, always
returns it.

(Storing links from the agenda are broken otherwise.)
2014-01-12 09:56:41 +01:00
Bastien Guerry 9305b41ceb Backport typo fixes from Emacs revno 115988 2014-01-12 09:54:21 +01:00
Nicolas Goaziou cad81696b8 Change no brace sub/superscript syntax
* lisp/org.el (org-match-substring-regexp): Simplify syntax when not
using braces.  Also make the variable a defconst.
(org-match-substring-with-braces-regexp): Make the variable a defconst
and remove a useless group in regexp.
* lisp/org-element.el (org-element-subscript-parser,
  org-element-superscript-parser): Adapt to group changes.
2014-01-11 23:54:22 +01:00
Nicolas Goaziou fd5edd35ae org-element: Fix cache bug
* lisp/org-element.el (org-element-cache-get): Return correct cached
  element when point is at the beginning of an item.
2014-01-11 22:31:53 +01:00
Nicolas Goaziou a4b1fa7ca1 org-element: New accessor for cache root
* lisp/org-element.el (org-element--cache-root): New function.
(org-element--cache-sync, org-element-cache-get): Use new function.

This is a workaround for `avl-tree--root' bug before Emacs 24.  Thanks
to Daniel Clemente for reporting it.
2014-01-11 10:12:45 +01:00
Bastien Guerry 525304cbda Merge branch 'maint' 2014-01-11 01:35:18 +01:00
Bastien Guerry 21472107fa org.el (org-ellipsis): Small docstring enhancement
* org.el (org-ellipsis): Small docstring enhancement.
2014-01-11 01:34:44 +01:00