Commit Graph

11230 Commits

Author SHA1 Message Date
Nicolas Goaziou 095f9322e5 org-export: Make sure back-end specific filters do not make any back-end check
* contrib/lisp/org-e-ascii.el (org-e-ascii-filter-headline-blank-lines):
  Remove backend check.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-filter-section-blank-lines):
  Remove backend check.
* contrib/lisp/org-export.el (org-export-define-backend): Update
  docstring accordingly.
2012-08-24 10:41:41 +02:00
Nicolas Goaziou cced6735a7 org-export: Run export hook with current back-end as argument
* contrib/lisp/org-export.el (org-export-as): Run export hook with
  current back-end as argument.
* testing/lisp/test-org-export.el: Update test.
2012-08-24 10:10:44 +02:00
Nicolas Goaziou cc839259a4 org-export: Nil value from a filter means filter will be skipped
* contrib/lisp/org-export.el (org-export-filter-apply-functions): Nil
  value from a filter means filter will be skipped. To ignore the
  current element or object, the filter has to return the empty string
  instead.

This change is done to ease filter writing. When writing
a backend-specific filter (and I guess most are), there's no more need
for the somewhat contrived:

  (if (not (eq backend 'e-latex)) data
    ... filter's job...)

A more straightforward:

  (when (eq backend 'e-latex)
    ... filter's job...)

is now enough.

On the other hand, it is not possible anymore to specify 'ignore as
a filter to ignore every element or object of a given type. To
achieve that goal, one can now write, for example:

  (add-to-list 'org-export-filter-example-block-functions
                 (lambda (value backend info)
                   (when (eq backend 'e-html) "")))

It will ignore every example block in the `e-html' export back-end.
2012-08-24 09:56:48 +02:00
Nicolas Goaziou 3f40057adc org-export: Limit depth of headline collection to headline level
* contrib/lisp/org-export.el (org-export-collect-headlines): By
  default, limit depth of headline collection to last headline level.
* contrib/lisp/org-e-html.el (org-e-html-toc): Small refactoring.
2012-08-24 09:36:18 +02:00
Nicolas Goaziou 5b19471358 org-e-html: Fix TOC generation with a non numeric value
* contrib/lisp/org-e-html.el (org-e-html-toc): Accept non numeric
  values for depth.
(org-e-html-template): Call previous function even when depth isn't
a number.
(org-e-html-keyword): Call previous function even when depth isn't
a number.  Also react on #+HTML keywords, not #+LATEX.
2012-08-23 21:32:12 +02:00
Achim Gratz a81b54968d Makefile: remove circular dependency created by robo-changing UTILITIES->utils
* targets.mk: Remove circular dependency created by robo-changing
  UTILITIES->utils.

Fortunately this was non-fatal since direct circular dependencies are
ignored by GNU Make.  Must happen more often... :-)
2012-08-23 17:59:23 +02:00
Jonathan Leech-Pepin d4d29efb53 contrib/lisp/org-e-texinfo: Ensure valid export of escaped characters
and remove invalid characters from menu items

* contrib/lisp/org-e-texinfo.el (org-e-texinfo--sanitize-menu): Remove
  invalid characters from menu entries and nodes.
(org-e-texinfo--sanitize-contents): Ensure @ { and } are properly
escaped in text and headlines.
(org-e-texinfo--generate-menu-items): Strip invalid characters from
menu titles.
(org-e-texinfo-fixed-width): Escape @ { and } in fixed-width
environments.
(org-e-texinfo-headline): Ensure nodes do not have invalid characters
and escape @ { and } in section titles.
(org-e-texinfo-plain-text): Use proper escape character for @ { and }.
2012-08-23 10:51:47 -04:00
Jonathan Leech-Pepin 8441782b11 contrib/lisp/org-e-texinfo: Remove markup from headlines when
exporting to ensure info can process them properly

* contrib/lisp/org-e-texinfo.el (org-e-texinfo--generate-menu-items):
  Use org-e-texinfo--sanitize-headline to ensure markup is stripped
  before being used for sectioning and menu information.  Nodes and
  menus can fail because of formatting and section titles do not show
  any formatting when viewed in an info-viewer.
(org-e-texinfo--sanitize-headline): Wrapper function for
org-e-texinfo--sanitize-healine-contents
(org-e-texinfo--sanitize-headline-contents): Strips markup from
headlines.  It treats content recursively to ensure nested formatting
is removed as well.
2012-08-23 09:20:02 -04:00
Jonathan Leech-Pepin 44d68803d3 contrib/lisp/org-e-texinfo: Improve error reporting after makeinfo
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-collect-errors): Fixed
  error checking to actually return an error message.
2012-08-23 08:40:47 -04:00
Bastien Guerry e759d34826 Add eldo.el to utils/
eldo.el allows to write documentation from Elisp files in an org file.
2012-08-23 12:55:45 +02:00
Bastien Guerry 0c8e87b8d2 Rename UTILITIES/ to utils/ 2012-08-23 12:47:10 +02:00
Achim Gratz 91e4ccb6c1 server.mk: implement `cleanrel´ here
* targets.mk: Remove `cleanrel´.

* UTILITIES/server.mk: Implement `cleanrel´, use only the names that
  will be produced by server.mk.
2012-08-23 12:32:43 +02:00
Achim Gratz a90ff91350 Makefile: adding files from contrib
* default.mk: Add customizatin variable ORG_ADD_CONTRIB with
  descriptiona and commented example.

* targets.mk: Strip leading path and trailing suffix from all elements
  of ORG_ADD_CONTRIB, then prefix with contrib/lisp and do wildcard
  expansion (this will also remove any invalid names); store the
  result in ORG_FROM_CONTRIB.  Strip /contrib from ORG_FROM_CONTRIB
  and store the result in ORG_TO_LISP.  If these are non-empty, copy
  the files from contrib/lisp/ into lisp/ before compilation and
  remove them when cleanlisp is called.
2012-08-23 12:32:38 +02:00
Bastien Guerry 85d6b781e4 Revert "server.mk: implement `cleanrel´ here"
This reverts commit ddcf4f8511.
2012-08-23 12:31:44 +02:00
Achim Gratz ddcf4f8511 server.mk: implement `cleanrel´ here
* targets.mk: Remove `cleanrel´.

* UTILITIES/server.mk: Implement `cleanrel´, use only the names that
  will be produced by server.mk.
2012-08-23 12:28:35 +02:00
Bastien Guerry 58885997b6 Merge branch 'master' of orgmode.org:org-mode 2012-08-23 11:51:24 +02:00
Bastien Guerry d378c7b41b Implement context filtering for agenda commands and capture templates.
* org.el (org-contextualize-agenda-or-capture)
(org-rule-validate): New functions, implement context
filtering for agenda commands and capture templates.

* org-agenda.el (org-agenda-custom-commands-contexts): New
option.
(org-agenda): Use it.

* org-capture.el (org-capture-templates-contexts): New option.
(org-capture-select-template): Use it.

* org.texi (Templates in contexts): Document the new option
`org-capture-templates-contexts'.
(Storing searches): Document the new option
`org-agenda-custom-commands-contexts'.

This idea comes from Sylvain Rousseau, who implemented a similar
feature with org-context.el: https://github.com/thisirs/org-context

This implementation is a bit simpler and more general.  Simpler
because it relies on existing templates, no need to define other
contextual ones.  More general because contexts can be defined
wrt files and modes.

Thanks *very much* to Sylvain for paving the way -- certainly a
great addition to Org.
2012-08-23 11:08:47 +02:00
Nicolas Goaziou f9e5600f82 org-export: Fix reference to a free variable in macros
* contrib/lisp/org-export.el (org-export-define-backend,
  org-export-define-derived-backend): Fix reference to a free variable
  in macro.
2012-08-23 11:03:09 +02:00
Achim Gratz 6dedecf806 server.mk: fix release archive names
* UTILITIES/server.mk: Strip "release_" prefix from $(GITVERSION) when
  making the archive names.
2012-08-22 21:40:26 +02:00
Achim Gratz b7338f2fe0 server.mk: fix typo
* UTILITIES/server.mk: Change ORGRDIR->ORGDIR everywhere.
2012-08-22 21:32:53 +02:00
Achim Gratz 142a25b353 Makefile: avoid a superfluous fork
* targets.mk: Avoid superfluous fork in implementation of clean
  targets.
2012-08-22 20:02:48 +02:00
Achim Gratz dd76fceddc Makefile: error out on invalid values of ORGCM
* lisp/Makefile: Check validity of value given in ORGCM and terminate
  with an error message if an illegal value is used.
2012-08-22 20:02:47 +02:00
Jonathan Leech-Pepin 9e0f48db2f contrib/lisp/org-e-texinfo.el: Fix export bugs
* contrib/lisp/org-e-texinfo.el (org-e-texinfo--generate-detailed): Do
  not run if there are no headlines in the file.
(org-e-texinfo-template): Generate menu and detailed menu in initial
let form.  Only insert them if non-empty.
(org-e-texinfo-headline): Ensure that %'s are properly escaped in
@node's to prevent parse errors.
(org-e-texinfo-make-menu): Do not insert "detailed" if menu is empty,
return empty entry instead.

Thanks to Bastien for reporting the failures with headline-less files
and simple "%" in the headline.
2012-08-22 13:51:46 -04:00
Bastien Guerry 841d949d9c org.el: Delete `org-beginning-of-defun' and `org-end-of-defun'
* org.el (org-beginning-of-defun, org-end-of-defun): Delete.
(org-mode): Set `beginning-of-defun-function' and
`end-of-defun-function' directly.
2012-08-22 19:02:39 +02:00
Nicolas Goaziou 436c2a0794 org-e-beamer: Do not normalize empty arguments
* contrib/lisp/org-e-beamer.el (org-e-beamer--normalize-argument): Do
  not normalize empty arguments.
2012-08-22 17:45:18 +02:00
Nicolas Goaziou cd9ce4b914 org-e-latex: Fix bug when exporting empty items
* contrib/lisp/org-e-latex.el (org-e-latex-item): Fix bug when
  exporting empty items.
2012-08-22 16:55:18 +02:00
Nicolas Goaziou d1f36ea313 org-e-beamer: Fix bug with default value for outline frame options
* contrib/lisp/org-e-beamer.el (org-e-beamer-outline-frame-options):
  Value must be a string, so make default value an empty string
  instead of nil.
2012-08-22 16:32:16 +02:00
Bastien Guerry 6e3c944764 Merge branch 'master' of orgmode.org:org-mode 2012-08-22 12:25:44 +02:00
Bastien Guerry 53c230a9f6 org.el: Fix bug: include links abbreviations when completing
* org.el (org-insert-link): Fix bug: include links
abbreviations when completing.
2012-08-22 12:24:14 +02:00
Nicolas Goaziou a273a37ce0 org-e-latex: Fix typo in a docstring
* contrib/lisp/org-e-latex.el (org-e-latex--delayed-footnotes-definitions):
  Fix typo in a docstring.
2012-08-22 09:34:24 +02:00
Bastien Guerry 7d8f69068e org-icalendar.el: Fix bug.
* org-icalendar.el (org-icalendar-print-entries): Fix bug:
when `org-icalendar-use-plain-timestamp' is nil, scheduled and
deadline items should not be ignored.

Thanks to Friedrich Delgado for reporting this.
2012-08-22 02:41:18 +02:00
Bastien Guerry 655c7fb360 org.el: Small docstring clean-up
* org.el (org-ds-keyword-length, org-make-tags-matcher):
Docstring clean-up.
2012-08-22 02:39:18 +02:00
Bastien Guerry 8e307a8ef2 org-freemind.el: Fix bug when converting links
* org-freemind.el (org-freemind-convert-links-from-org):
Replace literally to prevent errors when replacing with string
containing backslashes.

Thanks to Martin Beck for reporting this.
2012-08-22 00:42:02 +02:00
Bastien Guerry 65e0b5bccd org-pcomplete.el: Allow to match and complete a "thing" containing dashes
* org-pcomplete.el (org-thing-at-point): Allow to match (and
then complete) a "thing" containing dashes.

Thanks to Aidan Gauland for reporting this problem.
2012-08-22 00:20:09 +02:00
Charles b0dc7ec164 org.texi (Advanced features): Fix error in table
* org.texi (Advanced features): Fix error in table.

TINYCHANGE
2012-08-22 00:12:21 +02:00
Achim Gratz 628ccbfee7 Makefile: add link to Worg to `make help´
* Makefile: Add link to documentation for the build system on Worg.
2012-08-21 21:34:18 +02:00
Achim Gratz d72ea5b214 server.mk: implement ELPA
* UTILITIES/server.mk: Add ELPA archive generation.
2012-08-21 21:24:25 +02:00
Achim Gratz 00af0f9079 Makefile: fix some errors
* targets.mk: Repair .PHONY target.  Correctly group ORed parameters
  in find calls.  Introduce $(CLEANDIRS) and use variable instead of
  literals.  Have a command succeed at the end of `config-*´ so that
  no spurious warning is given by make.
2012-08-21 21:24:24 +02:00
Achim Gratz 226b15baa0 Makefile: implement different compilation methods, rename _COMPILE_ to ORGCM
* default.mk, targets.mk, lisp/Makefile: Rename _COMPILE_ to ORGCM.

* default.mk: Define ORGCM=dirall, show other possible values as
  comments

* targets.mk: Implement target `single´, temporarily set
  ORGCM (overriding configuration).  Show newly introduced
  configuration variables with `check-*´.

* lisp/Makefile: Implement dispatch for compile based on ORGCM.
  Output header that contains the target for easier debugging.

* Makefile: Document target `single´.
2012-08-21 21:24:23 +02:00
Achim Gratz 3c1c04d8bc Revert "Revert "Makefile: allow for different compilation methods""
This reverts commit 510f6464b0.
2012-08-21 21:24:21 +02:00
Bastien Guerry 51b9ad93c9 org-table.el: Better message when interactively toggling Row/Col display
* org-table.el (org-table-toggle-coordinate-overlays): Better
message when interactively toggling.
2012-08-21 20:09:25 +02:00
Jay McCarthy ade209b7c5 org-colview.el: Make sure to add a face to a string that has no face
* org-colview.el (org-columns-new-overlay): Make sure to add a
face to a string that has no face.

TINYCHANGE

See the description of the bug here:
http://thread.gmane.org/gmane.emacs.orgmode/58984
2012-08-21 20:05:34 +02:00
Nicolas Goaziou 043f2fcbbc org-e-latex: Display nicer horizontal rules
* contrib/lisp/org-e-latex.el (org-e-latex-horizontal-rule): Display
  nicer horizontal rules. Support :width and :thickness attributes.
2012-08-21 18:55:17 +02:00
Bastien Guerry 5d57364256 org-table.el: Minor docstring update
* org-table.el (org-table-number-regexp): Update the docstring
to show an example of a decimal number using the comma as a
separation mark.
2012-08-21 18:31:12 +02:00
Bastien Guerry cd5fa2396c org.texi (Formula syntax for Lisp): Reformat
* org.texi (Formula syntax for Lisp): Reformat.
2012-08-21 18:28:35 +02:00
Bastien Guerry 43df5aa25a Merge branch 'master' of orgmode.org:org-mode 2012-08-21 18:16:11 +02:00
Bastien Guerry 6a69ceaed6 org-agenda.el: Fix a bug in category filtering
* org-agenda.el (org-prepare-agenda): Minor code clean-up.
(org-agenda-filter-by-category): Filtering must be turned off
only when a category filter has been set and this filter is
not empty.
2012-08-21 18:12:16 +02:00
Bastien Guerry 88213fff61 org-agenda.el: Code clean-up
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks): Use
`category-pos' instead of `org-category-pos'.
2012-08-21 18:01:30 +02:00
Nicolas Goaziou 7ff8c166e6 org-table: Accept comma as a decimal mark to represent numbers
* lisp/org-table.el (org-table-number-regexp): By default, accept
  comma as a decimal mark to represent numbers.
2012-08-21 13:53:57 +02:00
Bastien Guerry c71b0dacb1 Replace "ob-" by "org-babel-" as a prefix for two functions
* ob-fortran.el (org-babel-fortran-transform-list): Rename
from `ob-fortran-transform-list'.
(org-babel-fortran-var-to-fortran): Use the new function's
name.

* ob-calc.el (org-babel-calc-maybe-resolve-var): Rename from
`ob-calc-maybe-resolve-var'.
(org-babel-execute:calc): Use the new function's name.
2012-08-21 13:17:08 +02:00