Paul Eggert
1f046ea4b1
Backport commit 65c8c7c from Emacs
...
* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-exp.el (org-element-context):
* lisp/ob-gnuplot.el (org-time-string-to-time)
(orgtbl-to-generic):
* lisp/ob-haskell.el (org-export-to-file):
* lisp/ob-latex.el (org-create-formula-image)
(org-latex-compile):
* lisp/ob-python.el (run-python):
* lisp/ob-tangle.el (org-link-escape, org-back-to-heading):
* lisp/org-colview.el (org-agenda-redo):
* lisp/org-feed.el (url-retrieve-synchronously):
* lisp/org-info.el (Info-find-node):
* lisp/org-list.el (org-previous-line-empty-p):
* lisp/org-macs.el (org-string-match-p):
* lisp/org.el (org-beamer-mode):
Fix prototype to match current definition.
* lisp/ob-comint.el (tramp-flush-directory-property):
* lisp/ob-tangle.el (org-babel-update-block-body):
* lisp/org-bibtex.el (org-babel-trim):
* lisp/org-pcomplete.el (org-export-backend-options):
* lisp/org-protocol.el (org-publish-get-project-from-filename):
Fix file name in declare-function.
* lisp/ob-comint.el (with-parsed-tramp-file-name)
* lisp/ob-core.el (with-parsed-tramp-file-name):
* lisp/org.el (org-beamer-mode):
Append ‘t’ to declare-function, since the declaration isn’t a defun.
* lisp/ob-core.el (org-save-outline-visibility):
Remove; not needed.
* lisp/ob-scheme.el (run-geiser, geiser-mode)
(geiser-eval-region, geiser-repl-exit):
* lisp/ox-org.el (htmlize-buffer):
Prepend "ext:" to file name, since it is not part of Emacs.
* lisp/org-gnus.el (nnimap-group-overview-filename):
Remove decl, since function was removed.
* lisp/org-macro.el (org-with-wide-buffer):
Omit unnecessary (and mismatching) decl.
* lisp/org-clock.el (calendar-iso-to-absolute):
Declare calendar-iso-to-absolute instead, since it is the
non-obsolete version of this function.
* lisp/org-compat.el (w32-focus-frame):
Remove decl, since function is now obsolete.
Pacify ‘make check-declare’
65c8c7cb96c14f9c6accd03cc8851b5a3459049e
Paul Eggert
Sat May 14 19:57:44 2016 -0700
2016-05-15 18:59:16 -04:00
Nicolas Goaziou
9ab973d0a6
org-macro: Fix expansion in narrowed buffers
...
* lisp/org-macro.el (org-macro-replace-all): Expand macro even outside
narrowed part of the buffer.
* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Add test.
Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104562 >
2016-01-29 00:52:49 +01:00
Kyle Meyer
6bc48c5f41
Update copyright years
2016-01-09 17:12:03 -05:00
Richard Hansen
11bba63dc3
fix SETUPFILE pathname expansion with subdirectories
...
* lisp/org-macro.el (org-macro--collect-macros): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.
* lisp/org.el (org--setup-collect-keywords): cd to the directory
containing the SETUPFILE before recursing so that relative pathnames
in the SETUPFILE are expanded properly.
* lisp/ox.el (org-export--get-inbuffer-options,
org-export--list-bound-variables): cd to the directory containing the
SETUPFILE before recursing so that relative pathnames in the SETUPFILE
are expanded properly.
If /path/to/foo.org contains:
#+SETUPFILE: settings/beamer.org
and /path/to/settings/beamer.org contains:
#+SETUPFILE: common.org
then we want to read /path/to/settings/common.org, not
/path/to/common.org.
TINYCHANGE
2015-09-24 10:16:04 +02:00
Nicolas Goaziou
b4d85b47a9
Remove spurious argument to `org-link-search'
...
* lisp/org.el (org-link-search): Remove TYPE argument, used to force
`org-occur' or `org-do-occur' on fuzzy search. Instead, enclose string
within forward slashes.
* lisp/org-macro.el (org-macro-initialize-templates):
* lisp/ob-exp.el (org-link-search): Apply signature change.
2015-08-04 14:10:44 +02:00
Nicolas Goaziou
a0c1e490b3
Silence byte-compiler
...
* lisp/org-footnote.el:
* lisp/org-list.el:
* lisp/org-macro.el:
* lisp/org-src.el:
* lisp/org.el: Silence byte-compiler.
2015-05-30 14:28:35 +02:00
Nicolas Goaziou
fa5f8c8f90
Allow optional argument to {{{property}}} for remote entries
...
* lisp/org-macro.el (org-macro-initialize-templates): "property"
template accepts an optional argument, as a search option to grab
properties from other headlines.
* doc/org.texi (Macro replacement): Document new feature. Improve
documentation.
(An example): Update documentation.
* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Add
tests.
2015-05-10 11:48:13 +02:00
Nicolas Goaziou
ecc8b9f3db
org-macro: Fix incomplete docstring
...
* lisp/org-macro.el (org-macro-replace-all): Document missing KEYWORDS
optional argument.
2015-05-10 10:05:46 +02:00
Nicolas Goaziou
fa64b59b05
org-macro: Allow macros in parsed keywords and associated properties
...
* lisp/org-macro.el (org-macro-replace-all): Add optional argument.
Now accept macros in parsed keywords and associated properties.
* lisp/ox.el (org-export-as): Apply signature change.
* testing/lisp/test-ox.el (test-org-export/expand-macro): Add test.
2015-04-05 13:48:28 +02:00
Nicolas Goaziou
fa0cc0ab70
Revert "Fix c9a52787c14c3a7429bcd3c8975350525e0baa04"
...
This reverts commit 359572d37e
.
COMMENT headlines are expected to be ignored completely during export.
2015-03-28 09:54:37 +01:00
Nicolas Goaziou
2f58e3c011
org-macro: Small refactoring
...
* lisp/org-macro.el (org-macro-initialize-templates): Remove spurious
lambda funcall.
2015-03-24 09:44:27 +01:00
Nicolas Goaziou
359572d37e
Fix c9a52787c1
...
* lisp/org-macro.el (org-macro--collect-macros): Ignore macro
definitions in commented subtrees.
* lisp/ox.el (org-export--get-inbuffer-options): Ignore options in
commented subtrees.
(org-export--delete-commented-subtrees): Remove function.
(org-export-as): Apply removal.
Removing the whole subtree is not subtle as Babel might want to use
data there.
Reported-by: Robert Klein <RoKlein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/96347 >
2015-03-24 09:35:39 +01:00
Nicolas Goaziou
0d24086657
Update some copyright years
2015-02-16 01:40:07 +01:00
Aaron Ecay
076e0ea518
Fix error messages.
...
* lisp/ob-coq.el (org-babel-coq-initiate-session):
* lisp/ob-latex.el (org-babel-execute:latex):
* lisp/org-macro.el (org-macro-replace-all):
* lisp/org.el (org--get-display-dpi): Fix formatting of error
messages.
2015-01-26 02:53:15 -05:00
Nicolas Goaziou
ec0706ea40
macro: Implement argument extracting and escaping functions
...
* lisp/org-macro.el (org-macro-escape-arguments,
org-macro-extract-arguments): New functions.
* lisp/org-element.el (org-element-macro-parser): Use new function.
* testing/lisp/test-org-macro.el (test-org-macro/escape-arguments,
test-org-macro/extract-arguments): New tests.
2015-01-21 00:27:24 +01:00
Aaron Ecay
5f423f1208
Warn about unexpanded macros on export
...
* lisp/org-macro.el (org-macro-replace-all): Add optional `finalize'
argument.
* lisp/ox.el (org-export-as): Use it.
2014-10-12 16:47:09 +01:00
Bastien Guerry
f8e1745440
Merge branch 'maint'
...
Conflicts:
contrib/lisp/org-favtable.el
2014-01-07 14:19:03 +01:00
Bastien Guerry
7d9a883b50
Update copyright years again.
...
Hint: copyright years are all updated in Emacs.
2014-01-07 14:18:17 +01:00
Bastien Guerry
c41f5075ac
Merge branch 'maint'
...
Conflicts:
contrib/lisp/org-favtable.el
2014-01-05 06:36:11 +01:00
Bastien Guerry
0beda99171
Revert "Update copyright years."
...
This reverts commit 21105594fc
.
2014-01-05 06:28:07 +01:00
Bastien Guerry
096ff7e078
Merge branch 'maint'
...
Conflicts:
contrib/lisp/org-favtable.el
2014-01-04 18:58:12 +01:00
Bastien Guerry
21105594fc
Update copyright years.
2014-01-04 18:56:11 +01:00
Nicolas Goaziou
2b22886005
org-element: Prepare signature change
...
* lisp/ob-exp.el: Declare signature change.
* lisp/org-macro.el: Declare signature change.
* lisp/org.el (org-backward-element, org-drag-element-backward): Avoid
using optional argument from `org-element-at-point'.
* testing/lisp/test-org-element.el: Update test.
2013-11-26 18:08:19 +01:00
Bastien Guerry
f95641c443
Backport changes from Emacs revs 115081 and 115082
...
2013-11-12 Stefan Monnier <monnier@iro.umontreal.ca>
Address some byte-compiler warnings.
* ob-abc.el (org-babel-expand-body:abc): Use dolist.
(org-babel-execute:abc): Fix regexp quoting.
* ob-calc.el (org--var-syms): Rename from `var-syms'.
* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
* ob-table.el (sbe): Move debug declaration.
* org-clock.el (org--msg-extra): Rename from `msg-extra'.
* org.el (org-version): Avoid var name starting with _.
(org-inhibit-startup, org-called-with-limited-levels)
(org-link-search-inhibit-query, org-time-was-given)
(org-end-time-was-given, org-def, org-defdecode, org-with-time):
* org-colview.el (org-agenda-overriding-columns-format):
* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
(org-agenda-show-log-scoped):
* ob-python.el (py-which-bufname, python-shell-buffer-name):
* ob-haskell.el (org-export-copy-to-kill-ring):
* ob-exp.el (org-link-search-inhibit-query):
* ob-R.el (ess-eval-visibly-p):
* ob-core.el (org-src-window-setup): Declare before use.
(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
* ox-odt.el (org-odt-hfy-face-to-css):
* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
(org-bibtex-check):
* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
(org-babel-tangle-single-block, org-babel-tangle-comment-links):
* ob-table.el (sbe):
* ob-sqlite.el (org-babel-sqlite-expand-vars):
* ob-sql.el (org-babel-sql-expand-vars):
* ob-shen.el (org-babel-execute:shen):
* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
* ob-scala.el (org-babel-scala-evaluate):
* ob-ruby.el (org-babel-ruby-table-or-string)
(org-babel-ruby-evaluate):
* ob-python.el (org-babel-python-table-or-string)
(org-babel-python-evaluate-external-process)
(org-babel-python-evaluate-session):
* ob-picolisp.el (org-babel-execute:picolisp):
* ob-perl.el (org-babel-perl-evaluate):
* ob-maxima.el (org-babel-execute:maxima):
* ob-lisp.el (org-babel-execute:lisp):
* ob-java.el (org-babel-execute:java):
* ob-io.el (org-babel-io-evaluate):
* ob-haskell.el (org-babel-execute:haskell):
* ob-fortran.el (org-babel-execute:fortran):
* ob-exp.el (org-babel-exp-code):
* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
* ob-ditaa.el (org-babel-execute:ditaa):
* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
(org-babel-parse-header-arguments, org-babel-reassemble-table)
(org-babel-goto-src-block-head, org-babel-mark-block)
(org-babel-expand-noweb-references, org-babel-script-escape)
(org-babel-process-file-name):
* ob-clojure.el (org-babel-execute:clojure):
* ob-calc.el (org-babel-execute:calc):
* ob-awk.el (org-babel-execute:awk):
* ob-abc.el (org-babel-execute:abc):
* ob-R.el (org-babel-expand-body:R):
* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).
2013-11-12 Glenn Morris <rgm@gnu.org>
* ox-html.el (org-html-scripts): Add 2013 to copyright years.
(org-html-infojs-template): Copyright holder to FSF.
2013-11-12 20:57:31 +01:00
Achim Gratz
d36a933c65
Compatibility: fix XEmacs compilation failures
...
* lisp/ob-eval.el, lisp/ob.el, lisp/org-macro.el, lisp/org-mhe.el:
Require org-macs and org-compat as necessary.
* lisp/ob-tangle.el: Declare function `org-store-link' and
`org-open-link-from-string'.
* lisp/org-compat.el: Extend eval-and-compile clause and add advices
for functions that have different parameter lists in XEmacs. Add
variable definitions that XEmacs lacks .
* lisp/org-macs.el (declare-function): Define macro to use autoload
instead for XEmacs.
* lisp/ox-html.el, lisp/ox-odt.el: XEmacs does not have table.el, so
use 'noerror on the require form.
* lisp/ox-texinfo.el (org-texinfo-table-column-widths): Fix spliced
argument list that XEmacs complains about by adding parenthesis.
This fixes all compilation failures on XEmacs and warnings related to
Org that indicate that XEmacs has compiled things wrongly (for
instance it might have interpreted a function as a variable symbol).
There are still many warnings that probably indicate serious problems.
2013-06-01 11:31:07 +02:00
Achim Gratz
93da18174a
fix macro expansion with separators and backslashes
...
* lisp/org-macro.el (org-macro-expand): Do not try to interpret the
macro replacement text as a regex so that escaped backslashes and
commas in macro arguments will be interpreted correctly.
2013-04-28 10:24:59 +02:00
Nicolas Goaziou
a82b06ae4b
org-macro: Properly handle macros in setup files
...
* lisp/org-macro.el (org-macro--collect-macros): Fix a bug where
reading a macro in a setup file would remove other macros read so
far from template. Change function signature.
(org-macro-initialize-templates): Apply signature change from function
above.
* testing/lisp/test-org-macro.el: Add test.
2013-04-01 15:47:39 +02:00
Bastien Guerry
e9e32173cc
Update headers.
2013-02-23 09:56:24 +01:00
Bastien Guerry
272ca45701
Fix compiler warnings.
...
Thanks to Achim Gratz for reporting these problems.
2013-02-19 20:32:09 +01:00
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