Commit Graph

17060 Commits

Author SHA1 Message Date
Nicolas Goaziou 0ab15904ec org-element: Fix "file" link :path
* lisp/org-element.el (org-element-link-parser): Fix :path value.
* testing/lisp/test-org-element.el (test-org-element/link-parser):
  Update tests.

:path now really contains the filename, not some truncated URI.
2015-04-20 12:35:41 +02:00
Rasmus 4ee8f4f286 Revert "ox: Change label naming scheme"
This reverts commit cf7d64f1e4.
2015-04-19 16:00:06 +02:00
Nicolas Goaziou ea4e8e3b2c org.texi: Remove `org-latex-custom-id-as-label'
* doc/org.texi (Publishing options): Remove
  `org-latex-custom-id-as-label'.

This variable was replaced with `org-latex-prefer-user-labels' in
4bbc054bd2.
2015-04-19 15:47:50 +02:00
Nicolas Goaziou 1841892321 org.texi: Introduce `org-latex-prefer-user-labels'
* doc/org.texi (Publishing options): Introduce
  `org-latex-prefer-user-labels'.
2015-04-19 15:46:24 +02:00
Nicolas Goaziou 3d4a153105 ox-latex: Tiny refactoring
* lisp/ox-latex.el (org-latex--label): Tiny refactoring.
2015-04-19 15:42:39 +02:00
Nicolas Goaziou 88108f652f ox-latex: Fix f1548e11fe
* lisp/ox-latex.el (org-latex-prefer-user-labels): Fix docstring.
(org-latex--label): Fix docstring.  Do not add a spurious newline
character when generating "\\label" macro for a target.
(org-latex-link):
(org-latex-radio-target): Radio targets always use internal labelling
scheme.

Radio targets are visible in the document so they can contain
forbidden characters, and user cannot adapt them to naming
restrictions from a given back-end.
2015-04-19 15:16:52 +02:00
Nicolas Goaziou 0449b785b4 ox-html: Fix CUSTOM_ID handling
* lisp/ox-html.el (org-html-headline): Prefer raw CUSTOM_ID over
  internal reference.

This is required for custom CSS and to link generated page from
outside Org.  However, the user is responsible for not using forbidden
characters in its value.
2015-04-19 00:30:58 +02:00
Rasmus d8494b5668 org.el: Respect read-file-name-function
* org (org-iread-file-name): Respect read-file-name-function.
2015-04-16 19:41:26 +02:00
Rasmus b80ed6124f org.el: Refactor org-file-complete-link
* org.el (org-file-complete-link): Refactor.
2015-04-16 19:41:13 +02:00
Rasmus 7ec8ced5d6 org.el: Small refactor
* org.el (org-icompleting-read): Support completing-read-default.
2015-04-16 17:28:10 +02:00
Oleh Krehel acf7f47ecd Use `completing-read-function' for completion
lisp/org.el (org-icompleting-read): When `completing-read-function' is
the default one, use `ido', otherwise, use `completing-read-function'.
2015-04-16 16:22:11 +02:00
Rasmus cf7d64f1e4 ox: Change label naming scheme
* ox.el (org-export-get-reference): Change labeling scheme.

160820bc94 and later changed the label naming scheme to follow types.
This commit maps to types to more standard names, e.g. 'headline' to
'sec'.
2015-04-16 12:08:34 +02:00
Rasmus f1548e11fe ox-latex: Accept user-label for more types
* ox-latex.el (org-latex--label): Add user-labels for targets.
(org-latex--wrap-label, org-latex-link, org-latex-target)
(org-latex-radio-target): Use org-latex--label.
2015-04-16 12:07:49 +02:00
Rasmus 586e29618b Remove intanglibe overlay
* org-colview.el (org-columns-display-here):
* org-agenda.el (org-agenda-dim-blocked-tasks): Remove
  intanglible overlay.

Suggested-by: Stefan Monnier <monnier@IRO.UMontreal.CA>
<http://permalink.gmane.org/gmane.emacs.orgmode/96914>
(Incl. original patch by Stefan).
2015-04-16 11:56:15 +02:00
Nicolas Goaziou cd7cbdcda8 ox-publish: Extend published external links
* lisp/ox-publish.el (org-publish-collect-numbering):
(org-publish-resolve-external-fuzzy-link): Remove functions.

(org-publish--collect-references, org-publish-resolve-external-link):
New functions.
(org-publish-org-to): Use new functions.

* lisp/ox-html.el (org-html-link): Reflect changes above.

This patch extends `org-publish-resolve-external-fuzzy-link', now
known as `org-publish-resolve-external-link' to custom-id links and
dedicated targets.
2015-04-13 15:37:27 +02:00
Nicolas Goaziou 4bbc054bd2 ox-latex: Introduce `org-latex-prefer-user-labels' variable
* lisp/ox-latex.el (org-latex-prefer-user-labels): New variable.
(org-latex-custom-id-as-label): Remove variable.
(org-latex--label): New function.

(org-latex--caption/label-string):
(org-latex-headline):
(org-latex-inlinetask):
(org-latex-latex-environment):
(org-latex-link): Use new function.

* etc/ORG-NEWS: Document new variable.

This variable replaces, and generalizes,
`org-latex-custom-id-as-label'.
2015-04-13 15:21:23 +02:00
Nicolas Goaziou 68eb1d0ab0 ox: Remove `org-export-solidify-link-text'
* lisp/ox.el (org-export-solidify-link-text): Remove function.

* etc/ORG-NEWS: Signal removal.
2015-04-13 15:21:22 +02:00
Nicolas Goaziou 4590332652 Export back-ends: Use `org-export-get-reference'
* lisp/ox-beamer.el (org-beamer-link):
(org-beamer-plain-list):
(org-beamer-target):
(org-beamer-radio-target):

* lisp/ox-html.el (org-html--wrap-image):
(org-html--format-toc-headline):
(org-html-list-of-listings):
(org-html-list-of-tables):
(org-html-headline):
(org-html-inline-src-block):
(org-html-link):
(org-html-paragraph):
(org-html-section):
(org-html-radio-target):
(org-html-src-block):
(org-html-table):
(org-html-target):

* lisp/ox-latex.el (org-latex--caption/label-string):
(org-latex--wrap-label):
(org-latex-center-block):
(org-latex-drawer):
(org-latex-dynamic-block):
(org-latex-example-block):
(org-latex-fixed-width):
(org-latex-headline):
(org-latex-horizontal-rule):
(org-latex-latex-environment):
(org-latex-link):
(org-latex-plain-list):
(org-latex-quote-block):
(org-latex-radio-target):
(org-latex-target):
(org-latex-verse-block):

* lisp/ox-man.el (org-man-target):

* lisp/ox-md.el (org-md-headline):

* lisp/ox-odt.el (org-odt-format-headline--wrap):
(org-odt-headline):
(org-odt-format-label):
(org-odt-link--infer-description):
(org-odt-link):
(org-odt-radio-target):
(org-odt-target):

* lisp/ox-texinfo.el (org-texinfo--get-node):
(org-texinfo-radio-target):
(org-texinfo-target):

* contrib/lisp/ox-groff.el (org-groff-link):
(org-groff-radio-target):
(org-groff-target):

* contrib/lisp/ox-rss.el (org-rss-headline): Use
  `org-export-get-reference'.
2015-04-13 15:21:22 +02:00
Nicolas Goaziou 186bae42a4 ox: Remove `org-export-get-headline-id'
* lisp/ox.el (org-export-get-headline-id):
(org-export--collect-unnumbered-headline-id): Remove function.
(org-export-collect-tree-properties): Apply removal.

* testing/lisp/test-ox.el (test-org-export/org-export-get-headline-id):
  Remove test.
(test-org-export/numbered-headline-p): Update test.

`org-export-get-reference' supersedes it.
2015-04-13 15:21:22 +02:00
Nicolas Goaziou 160820bc94 ox: Implement `org-export-get-reference'
* lisp/ox.el (org-export-get-reference): New function.

* etc/ORG-NEWS: Signal new function.
2015-04-13 15:21:22 +02:00
Nicolas Goaziou 51d83b9165 ORG-NEWS: Update copyright year 2015-04-13 15:21:22 +02:00
Nicolas Goaziou 1efb7561da ox-latex: Tiny fix
* lisp/ox-latex.el (org-latex-link): Tiny fix.
2015-04-13 09:56:44 +02:00
Nicolas Goaziou 65bbb1f7c8 ox-latex: Use :ALT_TITLE: on unnumbered headlines
* lisp/ox-latex.el (org-latex-headline): Use :ALT_TITLE: also on
  unnumbered headlines.

Suggested-by: Marcin Borkowski <mbork@wmi.amu.edu.pl>
<http://permalink.gmane.org/gmane.emacs.orgmode/96860>
2015-04-12 20:09:25 +02:00
Nicolas Goaziou 7584200bb8 org-footnote: Allow new footnotes in headlines
* lisp/org-footnote.el (org-footnote--allow-reference-p): Allow new
footnotes in headlines.

* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add test.

Reported-by: Thomas S. Dye <tsd@tsdye.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96843>
2015-04-12 00:25:33 +02:00
Nicolas Goaziou 0865cbb674 Merge branch 'maint' 2015-04-11 13:47:40 +02:00
François Allisson c000e87888 Fix documentation for org-capture template expansion
* doc/org.texi (Template expansion): Fix typo.

TINYCHANGE
2015-04-11 13:46:16 +02:00
Nicolas Goaziou 9debffbe0f Fix wrong type error with %l in `org-agenda-prefix-format'
* lisp/org.el (org-scan-tags): Fix type.

Reported-by: Dominik Schrempf <dominik.schrempf@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96823>
2015-04-11 00:15:04 +02:00
Nicolas Goaziou 7b97b631ef org-info: Correctly export info links to HTML
* lisp/org-info.el (org-info-export): New function.

Reported-by: Richard Y. Kim <emacs18@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/96779>
2015-04-10 10:39:24 +02:00
Nicolas Goaziou 98fdb642fc Merge branch 'maint' 2015-04-10 10:26:01 +02:00
Jacob Matthews d0bb993f70 org-mobile.org: Properly escape checksum binary path
* lisp/org-mobile.org (org-mobile-copy-agenda-files): Escape org-mobile-checksum-binary.

Fix a bug where if the checksum binary is in a non shell-safe path, then
the shell invocation silently fails. This can happen on any platform but
is probably worst on Windows where it's common to put programs in
"C:/Program Files".

TINYCHANGE
2015-04-10 10:25:23 +02:00
Vicente Vera Parra d6bd969ab2 ox: Fix Spanish translations
* lisp/ox.el (org-export-dictionary): Fix Spanish translations,
  including :ascii and :html properties. Also add :default Spanish
  property for "References".

TINYCHANGE
2015-04-09 20:06:36 +02:00
Rasmus a12d98e93e ox-latex: Fix a780080fc
* ox-latex.el (org-latex-template): Empty string for subtitle
  when it is not set.
2015-04-09 18:39:35 +02:00
Nicolas Goaziou 105ec604c2 ox: Allow multi-line objects in `parse' options
* lisp/ox.el (org-export--get-inbuffer-options): Allow multi-line objects.
* testing/lisp/test-ox.el (test-org-export/get-inbuffer-options): Add
  tests.  Update some others.

It is possible to write, e.g.,

  #+TITLE: *bold
  #+TITLE: sentence*
2015-04-09 14:11:25 +02:00
Nicolas Goaziou d7e7b78c2e Fix a780080fcf
* lisp/ox-latex.el (latex): Parse SUBTITLE, DESCRIPTION and KEYWORDS.
* lisp/ox-beamer.el (org-beamer-template): Do not parse again
  SUBTITLE.
2015-04-09 10:04:29 +02:00
Rasmus a780080fcf ox: Add #+SUBTITLE property in some backends
* ox-texinfo.el (texinfo, org-texinfo-template): Parse subtitle.
* ox-s5.el (org-s5-title-slide-template):
* ox-deck.el (org-deck-title-slide-template):
* ox-odt.el (odt, org-odt-template):
* ox-latex.el (latex, org-latex-template):
* ox-html.el (html, org-html-format-spec, org-html-template):
* ox-ascii.el (ascii, org-ascii-template--document-title):
* ox-beamer.el (beamer, org-beamer-template): Support #+SUBTITLE.
* ox-html.el (org-html-postamble-format)
(org-html-preamble-format):
* ox-latex.el (org-latex-title-command)
(org-latex-hyperref-template): Update docstring.
* ox-html.el (org-html-style-default): New .subtitle css property.
* ox-beamer.el (org-beamer-subtitle-format):
* ox-latex.el (org-latex-subtitle-format)
(org-latex-subtitle-separate): New variable.
* org.texi (ASCII/Latin-1/UTF-8 export)
(Beamer specific export settings)
(HTML Specific export settings)
(@LaTeX{} specific export settings, CSS support)
(ODT specific export settings)
(Texinfo specific export settings, Document preamble)
(Publishing options, Publishing options): Document #+SUBTITLE.

The patch adds a #+SUBTITLE keyword to ox-ascii, ox-latex, ox-html and
ox-odt.
2015-04-08 23:23:13 +02:00
Rasmus 951ae54c2e ox-ascii: Fix 12a6303
* ox-ascii.el (org-ascii-template--document-title): Take full lines
  into considerations for titles.
2015-04-08 22:00:50 +02:00
Nicolas Goaziou bf4edb6d16 ox-html: Silence byte-compiler
* lisp/ox-html.el (org-html--build-meta-info): Silence byte-compiler.
2015-04-08 13:32:31 +02:00
Nicolas Goaziou b6ccee763f ox-html: Silence byte-compiler
* lisp/ox-html.el (org-html--build-meta-info): Use `org-remove-if-not'
  instead of `remove-if-not'.
2015-04-08 13:23:35 +02:00
Rasmus a7becba686 ox-html: Use viewport
* ox-html.el (org-html--build-meta-info): Insert viewport.
  (org-html-viewport): New custom variable.
* ORG-NEWS: Mention viewport.
* org.texi: Mention org-html-viewport.

Viewport makes org-generated html work well with small screens.
2015-04-08 12:06:09 +02:00
Saulius Menkevičius 187dae0ab1 ob-sql: Add possibility to set dbport
* lisp/ob-sql.el (org-babel-sql-dbstring-mysql): Change type
signature to accept server port number too.
(org-babel-execute:sql) Will now recognize the dbport parameter.
Passed to `org-babel-sql-dbstring-mysql' only for now.

TINYCHANGE
2015-04-07 22:24:59 +02:00
Nicolas Goaziou edeb7fd8e1 Fix visibility issue when inserting a heading
* lisp/org.el (org-insert-heading): Fix visibility issue.  Remove
  unused binding.

Reported-by: Daniel E. Doherty <ded-law@ddoherty.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/96732>
2015-04-07 01:39:10 +02:00
Nicolas Goaziou 033847070e Fix b4f9ee4eba
* lisp/org.el (org-at-property-p): Fix typo.
2015-04-07 01:36:29 +02:00
Nicolas Goaziou b4f9ee4eba Fix `org-at-property-p'
* lisp/org.el (org-at-property-p): Return nil when at the beginning of
  the properties drawer.
2015-04-07 00:08:31 +02:00
Nicolas Goaziou 94c7619579 Small refactoring
* lisp/org.el (org-read-property-name): Small refactoring.
2015-04-07 00:02:54 +02:00
Nicolas Goaziou cff54cd127 org-table: `org-table-end' does not return a marker
* lisp/org-table.el (org-table-end): Do not return a maker.
(org-table-align):
(org-table-insert-column):
(org-table-delete-column):
(org-table-move-column):
(org-table-convert):
(org-table-recalculate): Create needed marker.

Creating a marker was not documented, and not always needed.
`copy-marker' should be used when they are.  Markers not deactivated
slow down editing.
2015-04-06 09:38:21 +02:00
Nicolas Goaziou 1ba8413b0a org-element: Fix cache bug
* lisp/org-element.el (org-element--cache-for-removal): Be more
  careful when altering a properties drawer.

* testing/lisp/test-org-element.el (test-org-element/cache): Add test.
2015-04-06 00:37:49 +02:00
Nicolas Goaziou 789ddf155a org-element: Fix regexp
* lisp/org-element.el (org-element--cache-sensitive-re): Fix regexp.
2015-04-05 21:38:10 +02:00
Nicolas Goaziou 12a63035e9 ox-ascii: Fix titles with line breaks
* lisp/ox-ascii.el (org-ascii-template--document-title): Take into
  consideration line breaks when computing title's width.
2015-04-05 21:11:20 +02:00
Nicolas Goaziou 9bf5ecbad1 ox-latex: Parse DATE
* lisp/ox-latex.el (latex): Parse DATE.
2015-04-05 19:00:56 +02:00
Nicolas Goaziou fc790f6200 ORG-NEWS: Document parsed keywords changes 2015-04-05 14:24:27 +02:00