Commit Graph

6743 Commits

Author SHA1 Message Date
Adam Spiers e1630f60c7 Add hyperlink to Org website from HTML export footer
* lisp/org-html.el: add hyperlink to http://orgmode.org/ from export footer
2012-05-18 08:30:02 +02:00
Achim Gratz b3b7769457 guard invocation of org-mode and suppress warning from byte-compiler
* lisp/org.el: Add with-not-warnings around call of (org-fixup).
2012-05-18 07:45:46 +02:00
Achim Gratz 4f29c630d8 XEmacs compatibility improvements
* lisp/org-compat.el (org-find-library-dir): rename
  org-find-library-name (misleading) and implement with a function
  that exists identically in Emacs/XEmacs.

* UTILITIES/org-fixup.el: change calls to org-find-library-dir.
  Simplify invocations of git, use the same arguments as in targets.mk
  and use only functions that work the same in EMacs and XEmacs.

* lisp/org-exp-blocks.el: change calls to org-find-library-dir.

* lisp/org.el: change calls to org-find-library-dir.  Make require for
  noutline fail silently because it is missing from XEmacs.
2012-05-18 07:45:45 +02:00
Achim Gratz e7d2e4e186 ensure that M-x org-version always delivers something useful
* UTILITIES/org-fixup.el (org-make-org-version): change defconst to
  defun for org-release and org-git-version and close over those
  variables (do not make them global anymore).

* UTILITIES/org-fixup.el (org-fixup): check for org-version.el or try
  to use git to get the version from the worktree (code uses parts of
  the former implementation from org.el).

* lisp/org.el (org-version): use functions instead of global variables
  to get the version strings and remove the defvaralias to
  org-version.  Warn when encountering a mixed installation (org and
  org-install.el should be found in the same directory).

Supported use-cases:

1) Org uninstalled (and possibly uncompiled) from Git or tarball.

1a) No org-version.el or org-install.el exists in worktree.  Partially
supported configuration, org version is determined from git if
possible via UTILITIES/org-fixup.el.  However, Emacs versions
delivered with orgmode will provide autoloads that may or may not work
with that version of org (mixed installation).  If such a situation is
encountered, warn the user.  It can work if the autoloads from the
installation match the ones that would be generated for the worktree,
which generelly is only the case if there is a relatively recent
installation in site-lisp.

1b) Autoload file org-install.el exists in worktree.  Fully supported
configuration, org version is determined from git if possible via
UTILITIES/org-fixup.el.

1c) Both org-version.el or org-install.el exist in worktree.
Recommended configuration for 1), org version is taken from
org-version.el (git never gets invoked).

2) Org installed.  Both org-version.el and org-install.el must exist
in install directory.  Only supported configuration for 2), org
version is taken from org-version.el (git never gets invoked since
UTILITIES/org-fixup.el is not available).

Any unsupported configuration should still yield a version string, but
it will contain "N/A" to alert the user about a botched org
installation.
2012-05-18 07:45:45 +02:00
Achim Gratz b567341443 clean up Makefile some more, keep autoloads around
* lisp/Makefile: remove stop targets, make autoloads depend on source
  files again (not .PHONY).  Keep autoload files around after compile,
  but make sure to re-create them before installation and compile.
  Remove autoload files before re-creating them to avoid errors from
  Emacs when saving the buffer.

* targets.mk: remove stop targets and the mess that was necessary to
  support them.

* default.mk: must use $(CURDIR) not $(PWD), $(PWD) is not well
  defined when using sudo.
2012-05-18 07:45:45 +02:00
Achim Gratz df89e3cd0c cleanup in lisp/Makefile, targets; create org-fixup.el, remove version definition
* UTILITIES/org-fixup.el: new file, has functions to create
  org-version.el and org-install.el, now use by the build system.

* lisp/Makefile: delete said definitions, now sourced from toplevel
  make.  "clean" and "cleanall" should do the same thing here, make
  them aliases, ditto for "all" and "compile".  Both autoload files
  must be .PHONY and depend only on each other for correct ordering.
  Make "compile-dirty" actually do that again (i.e. no implied
  "clean", but "cleanauto").  Remove autoload files directly after
  install, so that they will only be present when explicitly requested
  by "autoloads".  Create "org-version.el" before compilation as it is
  mandatory.  Remove $(ORG_MAKE_INSTALL) and $(ORG_MAKE_VERSION),
  source from default.mk/local.mk.

* default.mk: move definitions for $(ORG_MAKE_INSTALL) and
  $(ORG_MAKE_VERSION) here so that they can be more easily configured.
  Remove definition of "org-release" from $(BATCH) and $(BTEST), now
  sourced from "org-version.el".

* targets.mk: target reorganization, introduce "stop" targets to
  prevent cleaning of org-version.el.  Use new targets for "oldorg" to
  make it more robust in case of errors.  New target "cleanutils" to
  remove any "*.elc" files that may have been produced there and add
  this target to "cleanall". Do the same in cleancontrib.
2012-05-18 07:45:44 +02:00
Bastien Guerry 4f60b5f3a5 Use (with-no-warnings ...) construct for `date' and `entry'. 2012-05-17 11:07:19 +02:00
Achim Gratz 71c1cae4a7 suppress byte-compiler warning about unprefixed global variables from calendar.el
* lisp/org.el: add with-no-warning to defvar for two unprefixed global
  variables from calendar.el (there's nothing else we can do inside
  org until it is fixed in calendar.el).
2012-05-17 11:07:15 +02:00
Bastien Guerry e06fff3e50 Remove a blank line causing a merge conflict with patches I want to apply. 2012-05-17 10:12:08 +02:00
Bastien Guerry 443398b766 Merge branch 'master' of orgmode.org:org-mode 2012-05-17 08:16:29 +02:00
Bastien Guerry 872516b8f9 New option `org-export-latex-link-with-unknown-path-format'.
* org-latex.el
(org-export-latex-link-with-unknown-path-format): New option.
(org-export-latex-links): Use it.

Thanks to Sébastien Vauban for a preliminary patch for this.
2012-05-17 08:06:58 +02:00
Rick Frankel eed31ad936 Add dbi support to sql babel mode
* lisp/ob-sql.el: add dbi engine type and pre/post processing
2012-05-16 19:50:43 -04:00
Bastien Guerry c4cad9f80b Fix merge conflict. 2012-05-16 23:46:36 +02:00
Eric Schulte 68c5a2f840 Merge branch 'origin-maint' 2012-05-16 13:15:55 -04:00
Bastien Guerry 9212ff07de Merge branch 'maint'
Conflicts:
	doc/org.texi
	lisp/org.el
2012-05-16 19:21:33 +02:00
Bastien Guerry 429e6aafa6 Bump to version 7.8.10. 2012-05-16 19:20:07 +02:00
Eric Schulte 1b21168d52 save match data during indentation check
Thanks to Karl Berg for pointing out this issue.
2012-05-16 13:15:36 -04:00
Bastien Guerry d34c0b3496 ob-R.el: Fix compiler warning about `org-remove-if-not'. 2012-05-16 16:40:18 +02:00
Bastien Guerry c50f0c78d8 org.el (org-scan-tags): Correctly match TODO keywords.
* org.el (org-scan-tags): Correctly match TODO keywords.

Thanks to Simon Thum for reporting this.
2012-05-14 17:10:06 +02:00
Eric Schulte eabc823bee Can't assume every entry in a table is a sequence
* lisp/ob-R.el (org-babel-R-assign-elisp): Can't assume every entry in
  a table is a sequence.
2012-05-11 16:50:34 -04:00
Bastien Guerry 43ded1398d Remove spurious line inserted by previous commit. 2012-05-10 12:43:32 +02:00
Carsten Dominik 3216210668 Merge branch 'master' of orgmode.org:org-mode 2012-05-10 12:18:49 +02:00
Carsten Dominik b25a931eef Fix bug with hline references on LHS of table formulas
* lisp/org-table.el (org-table-expand-lhs-ranges): Allow hline
references to be expanded correctly in LHS of formulas.

Based on Tobias' fix in http://thread.gmane.org/gmane.emacs.orgmode/55690
2012-05-10 12:17:51 +02:00
Bastien Guerry 505cc7a221 org-agenda.el: Remove any timestamp from the headline text.
* org-agenda.el (org-agenda-get-timestamps): Remove any
active timestamp from the headline text, not only those for
the current date.

Thanks to SW, Nick Dokos, Samuel Wales and Brian van den Broek
for inputs about this.
2012-05-08 16:09:25 +02:00
Bastien Guerry de4001705c Allow setting tags for headlines in the active region.
* org.el (org-set-tags): Allow setting tags for headlines in
the region when `org-loop-over-headlines-in-active-region' is
non-nil.
2012-05-08 15:29:51 +02:00
Bastien Guerry 10aba6b126 New option `org-allow-promoting-top-level-subtree'.
* org.el (org-allow-promoting-top-level-subtree): New option
to allow promoting a top-level subtree.
(org-called-with-limited-levels): New variable, dynamically
bound within the `org-with-limited-levels' macro.
(org-promote): Use the new option to allow promoting a
top-level subtree.

* org-macs.el (org-with-limited-levels): Let-bind
`org-called-interactively-p' to t.

Promoting a top-level subtree can be useful but should not be allowed by
default, as this restructuring is only reversible with M-x undo RET.
2012-05-08 15:19:52 +02:00
Bastien Guerry 6b482c4ed5 org.el: Make sure a file exists before trying to delete it.
* org.el (org-create-formula-image-with-dvipng)
(org-create-formula-image-with-imagemagick): Make sure a file
exists before trying to delete it.

Thanks to Benjamin Motz for this idea.
2012-05-08 14:20:20 +02:00
Simon Thum 925aeebaad Org-Babel: fix maxima invocation without explicit parameters
* ob-maxima.el (org-babel-execute:maxima): Let cmdline always
return a string.

TINYCHANGE

Signed-off-by: Simon Thum <simon.thum@gmx.de>
2012-05-08 14:13:27 +02:00
Bastien Guerry 867c6e38fa org.el (org-scan-tags): Correctly match TODO keywords.
* org.el (org-scan-tags): Correctly match TODO keywords.

Thanks to Simon Thum for reporting this.
2012-05-08 14:10:09 +02:00
Bastien Guerry 0727ce7030 org-agenda.el: Fix bug: use `org-agenda-bulk-unmark-all'.
* org-agenda.el (org-agenda-bulk-action): Fix bug: use
`org-agenda-bulk-unmark-all'.
2012-05-08 10:44:13 +02:00
John Wiegley f3691be03c Cure byte-compilation errors in org-remember.el 2012-05-08 03:25:29 -05:00
Nicolas Goaziou 248d3fa76f Merge branch 'maint' 2012-05-08 09:01:47 +02:00
Nicolas Goaziou 56fe788c8f org-list: Fix visibility preservation
* lisp/org-list.el (org-list-struct): Fix white spaces.
(org-list-swap-items, org-list-send-item): Fix visibility
preservation.
2012-05-08 09:00:18 +02:00
Nicolas Goaziou 9cd8b88a40 Merge branch 'maint' 2012-05-07 22:36:34 +02:00
Nicolas Goaziou 200cf5efe1 org-list: Preserve visibility when moving items
* lisp/org-list.el (org-list-swap-items, org-list-send-item): Preserve
  visibility when moving items.
2012-05-07 22:35:41 +02:00
Bastien Guerry 035ab39e63 Another fix to `org-indent-line-function'.
* org.el (orgstruct++-mode): Fix docstring.
(org-fill-paragraph): Use the 'justify parameter when falling
back on `fill-paragraph'.
2012-05-07 01:39:49 +02:00
Matt Lundin d59762b6fa Don't call org-footnote-unique label if using random labels
* lisp/org-footnote.el (org-footnote-new): Don't call
  org-footnote-unique-label if org-footnote-auto-label is set to
  random.

Calling org-footnote-unique-label calls org-footnote-all-labels, which
can dramatically slow down footnote creation in a buffer with many
footnotes.  This is unecessary if org-footnote-auto-label is set to
random.
2012-05-06 10:10:25 +02:00
Bastien Guerry 99c97fbffc Fix bug in `org-indent-line-function'.
* org.el (org-indent-line-function): Use `org-let' instead of
`orgstruct++-ignore-org-filling'.
(org-fill-paragraph, org-auto-fill-function): Ditto.

* org-macs.el (orgstruct++-ignore-org-filling): Delete.
2012-05-06 09:37:14 +02:00
Mark E. Shoulson f6745ff2d0 org.el (org-fontify-entities): Hide {} when prettifying entities.
* org.el (org-fontify-entities): Hide {} when prettifying
entities.

TINYCHANGE
2012-05-06 00:43:26 +02:00
Bastien Guerry 587b534544 org.el: Prevent the display of messages when cycling from with a Gnus article buffer.
* org.el (org-cycle-internal-global): Prevent the display of
messages when cycling from with a Gnus article buffer.
2012-05-06 00:42:07 +02:00
Bastien Guerry 8fb20b7f93 org-table.el: handle =02:34;t durations formula correctly.
* org-table.el (org-table-time-string-to-seconds): Return the
empty string if provided.
(org-table-eval-formula): When assigning a duration string,
handle it correctly -- i.e. don't make any computation on it,
except the one to insert it using the correct duration format.

Thanks to Sébastien Vauban for spotting this.
2012-05-05 16:14:33 +02:00
Bastien Guerry 73ec767458 org.el (org-indent-line-function): Fix bug.
* org.el (org-indent-line-function): Fix bug.

Don't fall back systematically on `org-fb-vars' to do
the indentation.  Only fall back at then end, when no
modification has been done by indenting a la Org.  In
that case, use `indent-according-to-mode' instead of
using `indent-line-function' to avoid a possible loop.

Thanks to Eric Fraga, Christopher Schmidt and Nicolas
Goaziou who reported problems with this.
2012-05-05 15:32:19 +02:00
Bastien Guerry 7c513b3047 New option `org-clock-frame-title-format'.
* org-clock.el (org-frame-title-format-backup): New variable
to store the value of `frame-title-format' before `org-clock'
might replace it by `org-clock-frame-title-format'.
(org-clock-frame-title-format): New option.
(org-frame-title-string): Delete.
(org-clock-update-mode-line): Minor code reformatting.
(org-clock-in, org-clock-out, org-clock-cancel): Use
`org-clock-frame-title-format'.

See http://thread.gmane.org/gmane.emacs.orgmode/55477

Trying to update `frame-title-format' is tricky and error-prone, since
users can set up this variable in many different ways.  AFAIK there is
no equivalent to `global-mode-string' for setting the frame title, we
would use it otherwise.

The user can still configure `org-clock-frame-title-format' the way he
wants.
2012-05-05 14:21:13 +02:00
Bastien Guerry 005576f0b6 org-clock.el (org-clock-get-clock-string): Add a space.
* org-clock.el (org-clock-get-clock-string): Add a space.
2012-05-05 11:30:58 +02:00
Bastien Guerry c465c7bdf0 org-list.el: Return an error when there is no list at point.
* org-list.el (org-mark-list): Return an error when there is
no list at point.
2012-05-05 10:52:57 +02:00
Bastien Guerry 75e1c141f8 org.el: Allow `C-u C-c *' to toggle headings in the whole list at point.
* org.el (org-toggle-heading): Allow `C-u C-c *' to mark the
list at point before converting items to headings.  With a
simple universal-argument, set `current-prefix-arg' to 1,
otherwise keep the numeric value.
2012-05-05 10:50:07 +02:00
Bastien Guerry e508b497a3 org-agenda.el (org-agenda-view-mode-dispatch): message more readable.
* org-agenda.el (org-agenda-view-mode-dispatch): Make the
message more readable.
2012-05-05 09:57:30 +02:00
Bastien Guerry 405eae0497 Fix small typo and rearrange some parentheses. 2012-05-05 09:49:12 +02:00
Bastien Guerry 39204efe9a New command `org-agenda-bulk-mark-all' bound to `*'. Other minor enhancements.
* org-agenda.el (org-agenda-mode-map): New keybinding ̀*' to
mark all entries for bulk action.
(org-agenda-menu): New menu item for marking all entries.
(org-agenda-bulk-mark-all): New function to mark all entries.
(org-agenda-bulk-mark-regexp): Minor docstring fix.
(org-agenda-bulk-unmark): With a prefix argument, unmark all.
Also send a better message.
(org-agenda-bulk-remove-all-marks): Rename to
`org-agenda-bulk-unmark-all'.  Check against
`org-agenda-bulk-marked-entries' before trying to unmark
entries.  Minor docstring fix.
(org-agenda-bulk-unmark-all): Renamed from
̀org-agenda-bulk-remove-all-marks'.
2012-05-05 09:21:22 +02:00
Bastien Guerry a16814a475 New option ̀org-agenda-bulk-mark-char'.
* org-agenda.el (org-agenda-bulk-mark-char): New option.
(org-agenda-bulk-mark): Use the new option.
2012-05-05 09:07:37 +02:00
Bastien Guerry 578a7f5aa5 New option `org-src-prevent-auto-filling' defaulting to nil.
* org.el (org-src-prevent-auto-filling): New option to prevent
auto-filling in src blocks.  This defaults to nil to avoid people
being surprised that no auto-fill occurs in Org buffers where they
use `auto-fill-mode'.
(org-auto-fill-function): Use the new option.

Thanks to Ken Williams for this feature request and to Charles
C. Berry for a preliminary patch for this.
2012-05-05 08:13:43 +02:00
Mark E. Shoulson 61653a2c01 org.el (org-fontify-entities): Hide {} when prettifying entities.
* org.el (org-fontify-entities): Hide {} when prettifying
entities.

TINYCHANGE
2012-05-05 08:07:26 +02:00
Bastien Guerry e7dda77691 Fix `org-set-property'.
* org.el (org-properties-postprocess-alist): Better
customization type.
(org-set-property): Fix the check against
`org-properties-postprocess-alist'.

Thanks to Bill Wishon for testing/spotting this.
2012-05-04 23:58:55 +02:00
Eric Schulte dec32064a7 adding commented out code which should be activated once org-element has been merged
Used to clean up orphaned keywords of blocks removed by
  org-export-blocks-preprocess.
2012-05-04 09:17:36 -04:00
Bastien Guerry ecd4079f0e org-macs.el (orgstruct++-ignore-org-filling): Set `def-edebug-spec' correctly.
* org-macs.el (orgstruct++-ignore-org-filling): Set
`def-edebug-spec' correctly.
2012-05-03 16:44:17 +02:00
Bastien Guerry 3c34028497 Merge branch 'maint' 2012-05-01 19:19:16 +02:00
Bastien Guerry 0dbe17b8e0 org-table.el: Fix bug about handling a negative duration value.
* org-table.el (org-table-time-seconds-to-string): Fix bug
about handling a negative duration value.
2012-05-01 19:19:06 +02:00
Bastien Guerry 805891523c Fix bugs about computing durations in the column view.
* org-colview.el (org-columns-string-to-number): When
computing the values for the colview, match durations and
convert them to HH:MM values.

* org.el (org-duration-string-to-minutes): Match non-round
numbers.  Add a new optional parameter to allow returning the
output as a string.

Thanks to Sébastien for reporting these bugs.
2012-05-01 17:47:13 +02:00
Bastien Guerry 9f3b35a114 Merge branch 'fix-orgstruct' 2012-05-01 15:56:12 +02:00
Bastien Guerry a8c3125a14 Rework `orgstruct++-mode' so that you can turn if off safely.
* org.el (org-auto-fill-fallback-function)
(org-indent-line-fallback-function)
(org-fill-paragraph-fallback-function)
(org-auto-fill-fallback-function)
(org-indent-line-fallback-function)
(org-fill-paragraph-fallback-function): Remove.
(org-fb-vars): New buffer-local variable.
(orgstruct++-mode): Use the fallback variable `org-fb-vars' to
store, use and restore variables if needed.
(org-fill-paragraph): Ignore `orgstruct++-mode' filling
variables when needed.
(org-auto-fill-function, org-indent-line-function): Ditto.

* org-macs.el (orgstruct++-ignore-org-filling): New macro.
2012-05-01 15:55:41 +02:00
Nicolas Goaziou 39fc2c445a Merge branch 'maint' 2012-05-01 15:33:36 +02:00
Nicolas Goaziou eed9350ed9 * lisp/org.el (org-link-expand-abbrev): Fix docstring 2012-05-01 15:32:46 +02:00
Nicolas Goaziou b9d98cf926 * lisp/org.el (org-translate-link): Fix bug 2012-05-01 15:32:04 +02:00
Feng Shu be1727a68f Using 'call-process to launch latex program
* org.el (org-create-formula-image-with-imagemagick): Use 'call-process
to launch latex so that no shell output buffer will be shown when previewing
formulas.
2012-05-01 13:03:43 +02:00
Feng Shu 24dff8f067 spelling fixes
* org.el (org-create-formula-image-with-imagemagick): Fix typo.
2012-05-01 13:03:39 +02:00
Bastien Guerry bf5b4012e9 Use compatibility function for XEmacs.
* lisp/org-exp-block.el: Use `org-find-library-name' instead of `find-library-name'.
2012-05-01 10:40:19 +02:00
Bastien Guerry b3f60f791e Convert compatibility defun to a macro.
* lisp/org-compat.el (org-find-library-name): Convert into a macro to
  avoid compilation of a function from XEmacs in Emacs and vice versa.

Based on a not fully working proposal by A. Gratz to the orgmode
mailing list:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00009.html
2012-05-01 10:40:15 +02:00
Bastien Guerry e5c8780e5c Merge branch 'maint' 2012-05-01 10:04:46 +02:00
Bastien Guerry adb10d1543 org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug.
* org-agenda.el (org-agenda-bulk-mark-regexp): Fix bug when
setting the number of marked entries.
2012-05-01 10:04:31 +02:00
Bastien Guerry 8342fdb70a org-table.el: Fix bug in ̀org-table-maybe-eval-formula'.
* org-table.el (org-table-store-formulas): Fix typo.
(org-table-maybe-eval-formula): Fix the regexp to only match
formulas, which never end with the `=' character.  If the
field only contain this character, don't eval either.

Thanks to Thomas S. Dye for reporting this.
2012-05-01 02:03:12 +02:00
Bastien Guerry 1f663e7ab3 Merge branch 'maint' 2012-05-01 01:42:17 +02:00
Bastien Guerry 3053c13d2c org-table.el: Fix bug in a free variable name.
* org-table.el (org-tbl-calc-modes): Rename from
`org-table-modes'.
(org-set-calc-mode, org-table-eval-formula): Use it.

Thanks to Mikkel Kristiansen for reporting this and
to Nick Dokos for tracking down the bug and proposing
a fix.
2012-05-01 01:41:50 +02:00
Bastien Guerry 237c65b1f7 org.el: Fix `org-diary' again by checking `org-agenda-buffer' correctly. 2012-04-30 00:04:20 +02:00
Bastien Guerry 491ce5491d org.el (org-set-property): Minor enhancement.
* org.el (org-set-property): Perform the correct check against
`org-properties-postprocess-alist'.

Thanks to Bill Wishon for spotting this.
2012-04-29 18:07:24 +02:00
Bastien Guerry 9604f522fc org-bbdb.el: Enhance a customization type and suppress (defvar name).
* org-bbdb.el (org-bbdb-anniversary-format-alist): Update the
customization type.
(name): Suppress (defvar 'name) as name is not eval'ed when
setting `org-bbdb-anniversary-format-alist'.
2012-04-29 17:00:16 +02:00
Bastien Guerry 6732d633af Make (org-version) always returns a string, use it in exporters.
* org.el (org-version): When called non-interactively, insert
the short version string, otherwise send a message with the
complete version string.

* org-odt.el (org-odt-update-meta-file): Use (org-version) and
delegate checking whether `org-version' is known as a variable
there.

* org-html.el (org-export-as-html): Use (org-version).

* org-docbook.el (org-export-as-docbook): Ditto.

* org-latex.el (org-export-latex-make-header): Ditto.
2012-04-29 12:17:00 +02:00
Eric Schulte 4eb4010a97 Merge branch 'origin-maint'
Conflicts:
	lisp/ob.el
2012-04-28 18:03:23 -04:00
Bastien Guerry c306dbe388 org-clock.el: Fix bug in `org-clocktable-write-default'.
* org-clock.el (org-clocktable-write-default): Temporarily
disable `delete-active-region' so that we don't accidently
delete an active region when exporting a subtree/region.

Thanks to Mike McLean for the detailed bug report.
2012-04-29 01:18:35 +02:00
Eric Schulte 604a55edd6 fixes a bug finding empty named results
* lisp/ob.el (org-babel-find-named-result): Fix bug finding empty
  named results.
2012-04-28 18:02:13 -04:00
Bastien Guerry 008689cc79 org-clock.el: Use `executable-find' instead of `org-program-exists'.
* org-clock.el (org-program-exists): Remove.
(org-show-notification, org-clock-play-sound): Use
`executable-find' instead of `org-program-exists'.

Thanks to Sébastien Vauban for pointing this.
2012-04-28 23:43:10 +02:00
Bastien Guerry 0678e0e359 Merge branch 'master' of orgmode.org:org-mode 2012-04-28 23:35:01 +02:00
Bastien Guerry d7dfe9fd69 org-table.el: Fix `org-table-store-formulas'.
The bug was introduced by this commit:
http://orgmode.org/w/?p=org-mode.git;a=commit;h=1c203d

Thanks to Matt Lundin who reported this nasty/stupid bug.
2012-04-28 23:34:51 +02:00
Nicolas Goaziou f9d4069033 Merge branch 'maint' 2012-04-28 22:37:23 +02:00
Nicolas Goaziou 7f2e22339c Fix `org-planning-or-clock-line-re' regexp
* lisp/org.el (org-set-regexps-and-options): Fix
  `org-planning-or-clock-line-re' regexp.  Indeed "\\>" will never
  match since time keywords must end with colons, which are not word
  constituent.
2012-04-28 22:34:36 +02:00
Bastien Guerry 982b7b972f Merge branch 'fix-org-diary-bug' into fix-compiler-warnings 2012-04-28 22:23:40 +02:00
Bastien Guerry 4b8359a395 org-agenda.el: Prevent org-diary to fail.
* org-agenda.el (org-diary): Prevent failure from
`org-compile-prefix-format' when there is no agenda buffer.

Thanks to Rafael who reported this.
2012-04-28 22:23:08 +02:00
Bastien Guerry c5f73635d0 Replace obsolete variable `buffer-substring-filters'.
* org-agenda.el (org-agenda-mode): Replace obsolete variable
`buffer-substring-filters'.

* org-indent.el (org-indent-mode): Ditto.
2012-04-28 21:36:58 +02:00
Bastien Guerry 69d2d4e130 org-compat.el: Silent the byte-compiler about a warning related to XEmacs support.
* org-compat.el (org-find-library-name): Silent the
byte-compiler about a warning related to XEmacs support.
2012-04-28 19:16:59 +02:00
Bastien Guerry 3d3ad17d74 org-special-blocks.el: `org-line' instead of `line'.
* org-special-blocks.el
(org-special-blocks-convert-html-special-cookies): Use
`org-line' instead of `line'.
2012-04-28 19:08:42 +02:00
Bastien Guerry b69eeee54d org-html.el: Use `org-line' instead of `line' as the free variable name.
* org-html.el (org-html-handle-links, org-export-as-html)
(org-format-org-table-html, org-format-table-table-html)
(org-html-export-list-line): Use `org-line' instead of `line'
as the free variable name.
2012-04-28 19:06:52 +02:00
Bastien Guerry 019bd93ced org-latex.el (org-export-latex-tables): Let-bind `hfmt'.
* org-latex.el (org-export-latex-tables): Let-bind `hfmt'.

Silent byte-compiler.
2012-04-28 18:48:02 +02:00
Bastien Guerry 21e24f8f24 org.el: New face `org-list-dt' for definition terms in list.
* org-faces.el (org-list-dt): New face.

* org.el (org-set-font-lock-defaults): Use `org-list-dt' as
the face for definition terms in definition lists.

Thanks to Alex Lane for suggesting this.
2012-04-27 23:26:05 +02:00
Bastien Guerry 30986cd7c5 org.el: Fix bug in `org-fill-paragraph'.
* org.el (org-fill-paragraph): Pass the `justify' argument to
`org-fill-paragraph-fallback-function'.

Thanks to Nick Dokos for spotting this.
2012-04-27 23:08:56 +02:00
Bastien Guerry 0233eb989b Merge branch 'maint' 2012-04-26 22:43:36 +02:00
Bastien Guerry 0945fea562 org-ctags.el: Fix an option default value back again.
* org-ctags.el (org-ctags-new-topic-template): Fix the option
default value back again.

This option was "fixed" in Emacs emacs-24 branch:
http://git.savannah.gnu.org/cgit/emacs.git/diff/lisp/org/org-protocol.el?h=emacs-24&id=0fc749f9

During an Emacs merge, I didn't check carefully and backported
this change into Org maint branch.  This is now fixed in Org and
in emacs-24.
2012-04-26 22:42:45 +02:00
Eric Schulte 8c18495597 Merge branch 'origin-maint' 2012-04-26 12:53:31 -04:00
Eric Schulte 5d5ce5d7b0 don't rely on kill-new to return a string
* lisp/org-bibtex.el (org-bibtex-export-to-kill-ring): Don't rely on
  kill-new to return a string.
2012-04-26 12:51:36 -04:00
Eric Schulte fa7c989a3f remove call to bibtex-reformat which often hangs
* lisp/org-bibtex.el (org-bibtex-headline): Remove call to
  bibtex-reformat which often hangs.
2012-04-26 12:50:16 -04:00
Bastien Guerry 580add2f41 org.el (org-eval-in-calendar): Fix docstring to mention the KEEPDATE parameter.
* org.el (org-eval-in-calendar): Fix docstring to mention the
KEEPDATE parameter.

Thanks to Toby Cubitt for spotting this.
2012-04-26 15:41:09 +02:00
Bastien Guerry fe0515e5bf org.el (org-refresh-category-properties): Let-bind `inhibit-read-only' to t.
* org.el (org-refresh-category-properties): Let-bind
`inhibit-read-only' to t.
2012-04-26 14:56:31 +02:00
Bastien Guerry 84a358e381 org.el: Fix bug about (auto-)filling and indenting lines with orgstruct++-mode.
* org.el (org-auto-fill-fallback-function)
(org-indent-line-fallback-function)
(org-fill-paragraph-fallback-function): New variables to store
some fall-back functions when turning `orgstruct++-mode' on.
(orgstruct++-mode): Set the new variables.
(org-indent-line-function, org-fill-paragraph)
(org-auto-fill-function): Use them.

Thanks to Christopher Schmidt for reporting this and to Eric
S Fraga for insisting on it.

This commit creates these fall-back buffer-local variables:

(defvar org-auto-fill-fallback-function nil)
(defvar org-fill-paragraph-fallback-function nil)
(defvar org-indent-line-fallback-function nil)

When `org-auto-fill-function' cannot do anything useful in the
current mode and `org-auto-fill-fallback-function' is set (for
example to `message-do-auto-fill), use the fall-back function
before `do-auto-file'.

When `org-fill-paragraph-function' cannot do anything useful in the
current mode and `org-fill-paragraph-fallback-function' is set (for
example to `message-fill-paragraph'), use the fall-back function
before `fill-paragraph'.

When `org-indent-line-fallback-function' is set, always run it
instead of `org-indent-line-function'.
2012-04-26 12:40:41 +02:00
Bastien Guerry e02226bfc2 org.el (org-read-date): Bugfix.
* org.el (org-read-date): Bugfix: call `org-eval-in-calendar'
with the 'keepdate parameter set to t when setting the cursor
type.

Thanks to Matt Lundin for reporting this and for the solution.
2012-04-26 10:59:16 +02:00
Eric Schulte fb7ebd2dae clean up the code implementing reads of irregular data into R
* lisp/ob-R.el (org-babel-R-assign-elisp): Clean up the code
  implementing reads of irregular data into R.
2012-04-25 15:40:13 -04:00
Thomas Dye 870b4e3c9d R-based solution to variable-row-length tables 2012-04-25 15:40:13 -04:00
Jambunathan K 4908ea99ed org-odt.el: Provide for non-availability of `org-version'
* lisp/org-odt.el (org-odt-update-meta-file): Check for
`org-version' is bound before accessing it.
2012-04-26 01:22:04 +05:30
Bastien Guerry 5add9cdef0 org-agenda.el: Implement `org-agenda-persistent-marks' for bulk actions.
* org-agenda.el (org-agenda-persistent-marks): New option to
keep marks after a bulk action.  The option defaults to nil.
(org-agenda-bulk-action): Use the new option.

* org.texi (Agenda commands): Document persistent marks.
2012-04-24 18:10:55 +02:00
Bastien Guerry 1666b910fe org-capture.el: Use %\n instead of %n.
* org-capture.el (org-capture-fill-template): Use %\n instead of %n as a
template element to be replaced with the nth prompted string.
(org-capture-templates): Update docstring.

* org.texi (Template expansion): Update doc to reflect change.

Using %n triggers errors when the template contains escaped strings,
which happens a lot with links.
2012-04-24 11:54:16 +02:00
Bastien Guerry fdace895fa Fix bug in `org-insert-link'. 2012-04-23 22:29:54 +02:00
Nicolas Goaziou 9743a2ca3d Merge branch 'maint' 2012-04-23 20:54:40 +02:00
Nicolas Goaziou 374c56bad3 org-table: Fix typo in a docstring
* lisp/org-table.el (org-table-number-fraction): Fix typo.
2012-04-23 20:53:51 +02:00
Eric Schulte b47bccf81c Merge branch 'origin-maint' 2012-04-23 11:39:50 -04:00
Bastien Guerry 374d1b93c3 org.el (org-goto): Fix docstring and document what C-u does.
* org.el (org-goto): Fix docstring and document what C-u does.

Thanks to John Hendy for pointing this.
2012-04-23 19:08:15 +02:00
Eric Schulte cd080b025a ensure newline precedes automatically-added returns for Python code blocks
* lisp/ob-python.el (org-babel-execute:python): Ensure newline
  precedes automatically-added returns.
2012-04-23 11:39:28 -04:00
Toby S. Cubitt b7982a0024 org-capture.el: Fixed bug in org-capture-templates %<n> expandos
* lisp/org-capture.el (org-capture-fill-template): Fixed regexp for
  %<n> expandos to match any positive integer.
  (org-capture-templates): Updated docstring accordingly.

* doc/org.texi: Updated documentation accordingly.
2012-04-23 17:34:15 +02:00
Daniel Dehennin 077af66a6f org-exp.el: Handle new parameter :addlevel when including a file.
* org-exp.el (org-export-handle-include-files)
(org-get-file-contents): Handle new parameter :addlevel.

TINYCHANGE
2012-04-23 14:46:24 +02:00
Bastien Guerry d592b07d51 org-publish.el: Use (case-fold-search t) when looking for #+INCLUDE:.
* org-publish.el (org-publish-cache-file-needs-publishing):
Use (case-fold-search t) when looking for #+INCLUDE:.
2012-04-23 14:19:21 +02:00
Christophe Rhodes c627a22e29 org-latex.el: Support setting the :hfmt parameter from #+ATTR_LaTeX.
* org-latex.el (org-export-latex-tables): Support setting
the :hfmt parameter from #+ATTR_LaTeX.

TINYCHANGE
2012-04-23 13:41:27 +02:00
niels giesen 549c498bb6 org-table.el: Add defcustoms for LaTeX export of table rules :tstart, :hline and :tend
* org-table.el (orgtbl-to-generic): Add check for :skipheadrule.
When present, the :hline following the head will be skipped.  This is
necessary to avoid doubling of horizontal rules in LaTeX longtable
environments and consequent width problems.

* org-latex.el (org-export-latex-tables-tstart)
(org-export-latex-tables-hline)
(org-export-latex-tables-tend): New options.
(org-export-latex-tables): Use the new options.
2012-04-23 13:23:36 +02:00
Toby S. Cubitt 9432a9f1a0 Agenda: Add org-agenda-skip-timestamp-if-deadline-is-shown
* lisp/org-agenda.el (org-agenda-skip-timestamp-if-deadline-is-shown):
Skip timestamp items in agenda view if item is already shown as a
deadline item.
(org-agenda-skip-dealine-if-done): Pass deadline results to
org-agenda-get-timestamps.
(org-agenda-get-timestamps): Optionally take list of deadline results,
so that timestamp results can be skipped if already included in
deadline results.
2012-04-23 12:50:43 +02:00
Toby S. Cubitt 987b185e90 Agenda: Add org-agenda-diary-sexp-prefix customization option
* lisp/org-agenda.el (org-agenda-diary-sexp-prefix): Regexp matching
deadline/scheduling information to be displayed in diary sexp agenda
items.
(org-agenda-get-sexps): Extract deadline/scheduling information from
diary sexp entries.
2012-04-23 12:48:43 +02:00
Toby Cubitt e13d182ce8 Allow %<num> escapes to capture templates, expanded to text entered in <num>'th prompt
* org-capture.el (org-capture-fill-template): Expand %<num>
escape sequences into text entered for <num>'th %^{PROMPT} escape.
2012-04-23 12:48:40 +02:00
Bastien Guerry 1c203d8d19 Match #+name/#+tblname/#+tblfm along with uppercase twins.
* org.el: Use (case-fold-search t).
(org-edit-special, org-ctrl-c-ctrl-c): Ditto.

* org-table.el:
(org-table-store-formulas, org-table-get-stored-formulas)
(org-table-fix-formulas, org-table-edit-formulas)
(org-old-auto-fill-inhibit-regexp, orgtbl-ctrl-c-ctrl-c)
(orgtbl-toggle-comment, org-table-get-remote-range): Ditto.

* org-footnote.el:
(org-footnote-goto-local-insertion-point): Ditto.

* org-exp.el: Ditto.

* org-colview.el:
(org-dblock-write:columnview, org-dblock-write:columnview):
Ditto.

* org-colview-xemacs.el:
(org-dblock-write:columnview): Ditto.

* org-clock.el (org-clocktable-write-default): Ditto.

* org-capture.el (org-capture-place-table-line): Ditto.

* ob.el (org-babel-data-names, org-babel-goto-named-src-block)
(org-babel-src-block-names)
(org-babel-where-is-src-block-result, org-babel-result-end)
(org-babel-where-is-src-block-head)
(org-babel-find-named-result, org-babel-result-names): Ditto.
2012-04-23 12:48:33 +02:00
Matt Lundin e5101717fa Following gnus links: Don't mark unrelated articles read
* lisp/org-gnus.el: (org-gnus-follow-link): Fix argument to
  gnus-group-read-group so that following a link does not result in
  unread article being selected.

The NO-ARTICLE argument to gnus-group-read-group should be t.
Otherwise org-gnus-follow-link selects the most unread article in a
group before selecting the linked article. This results in unread
articles being unread (which can cause one to miss important mail).
2012-04-23 09:18:52 +02:00
Bastien Guerry e9dec29bb1 org-table.el: Escape some special characters when sending radio tables.
* org-table.el (orgtbl-send-table): Escape special characters.
Introduce a new parameter :no-escape to prevent escaping.

* org.texi (Radio tables): Document the :no-escape parameter.

Thanks to Alexander Willand for raising this issue.
2012-04-23 00:09:35 +02:00
Bastien Guerry 94bc01e77e org-agenda.el: Small fix. Use `org-called-interactively-p' instead of `called-interactively-p'. 2012-04-22 23:15:04 +02:00
Jambunathan K eef6444ac0 org-odt.el (org-odt-schema-dir-list): Adjust search path
* lisp/org-odt.el (org-odt-schema-dir-list): OD Schema files
have been moved away from $(git-root)/contrib/odt/etc/schema/
to $(git-root)/etc/schema/.
2012-04-22 23:48:36 +05:30
Nicolas Goaziou 54e34cca0d Merge branch 'maint' 2012-04-22 18:44:45 +02:00
Nicolas Goaziou 805f3fd92d org-mouse: Do not move point when clicking on a footnote reference
* lisp/org-mouse.el (org-mode-hook): Do not move point when clicking
  on a footnote reference.
2012-04-22 18:43:55 +02:00
Carsten Dominik f1443e7a7a Merge branch 'beamer-inheritance' 2012-04-22 16:35:10 +02:00
Carsten Dominik 6fdfa1ede1 Allow beamer export to inherit some properties
* lisp/org-beamer.el (org-beamer-inherited-properties): New option.
(org-beamer-after-initial-vars): Use new option to look for inherited
properties.
2012-04-22 16:33:24 +02:00
Bastien Guerry de7c48759c Let `org-toggle-sticky-agenda' output a message only when called interactively.
* org-agenda.el (org-toggle-sticky-agenda): Only shout a
message when called interactively.
(org-agenda-get-restriction-and-command): Call
`org-toggle-sticky-agenda' interactively.
2012-04-22 15:27:21 +02:00
Bastien Guerry 18cf324f07 org-agenda.el: Fix bug in top-category filtering.
* org-agenda.el (org-agenda-top-category-filter): New variable
for storing the current top-category filter.
(org-agenda-redo): Apply a top-category filter, if any.
(org-agenda-filter-by-top-category)
(org-agenda-filter-top-category-apply): Set
`org-agenda-top-category-filter' to the right value.

Thanks to John Wiegley for reporting this.
2012-04-22 09:21:42 +02:00
Bastien Guerry ef956d7181 When clocking, Don't modify `frame-title-format' if it is a string.
* org-clock.el (org-clock-out, org-clock-cancel)
(org-clock-in): Don't modify `frame-title-format' if it is a
string.

Thanks to Mike McLean for reporting this and to Matt Lundin for
pointing at the problem in the code.
2012-04-22 09:01:28 +02:00
Bastien Guerry a1fd7c4626 org-latex.el: Fix bug when escaping special characters in a table.
* org-latex.el (org-export-latex-special-chars): Fix bug when
escaping special characters in a table.

Thanks to Alexander Willand for reporting this.
2012-04-22 08:42:35 +02:00
Bastien Guerry c2a6f5de6e Use :inverse-video t for `org-date-selected'.
* org.el (org-read-date): Set cursor-type to nil in the calendar.

* org-faces.el (org-date-selected): Use inverse video.  Don't explicitely
set bold to nil as it causes `customize-face' to show the weight property
and thus encourage the user to change it.  Warn in the docstring that using
bold might cause problems when displaying the calendar.

Using inverse video for the selected date might be too much for many
people, but with cursor-type set to nil (thanks to Toby Cubitt for this)
and with a light-weight font, we need to really highlight the selected
date -- and a simple color change is not catchy enough IMO.
2012-04-22 07:54:32 +02:00
Bastien Guerry eabf8984be Merge branch 'maint' 2012-04-22 00:44:27 +02:00
Bastien Guerry 76c38183bb org-faces.el (org-date-selected): Fix docstring.
* org-faces.el (org-date-selected): Fix docstring.

Thanks to Toby Cubitt for pointing this.
2012-04-22 00:44:03 +02:00
Achim Gratz c83da85416 provide an easier way to get the old behaviour of plain "make" back
* Makefile: move setup includes to top

* lisp/Makefile: reduce verbosity of org-version.el target, add a more
  friendly @echo instead.

* targets.mk: provide compatibility target "oldorg" to do "compile
  autoloads info" which is closest to the old behaviour.
2012-04-21 17:38:49 +02:00
Achim Gratz c5377f6034 always make version files
* doc/Makefile: make org-version.inc .PHONY so that it is always re-made.

* lisp/Makefile: make org-version.el .PHONY so that it is always re-made.
2012-04-21 17:38:43 +02:00
Andrew Hyatt 44e7ed1a59 Allow archiving to a datetree.
* org-archive.el (org-archive-subtree): Allow archiving to a
datetree.

* org.el (org-archive-location): Ditto.

* org.texi (Moving subtrees): Document the ability to archive
to a datetree.

TINYCHANGE
2012-04-21 17:37:48 +02:00
Bastien Guerry cd053cc12f Merge branch 'maint' into master-merge-maint
Conflicts:
	lisp/org-footnote.el
	lisp/org.el
2012-04-21 16:05:22 +02:00
Bastien Guerry 9d01202a7b Remove * character in front of variable docstring.
* org-ctags.el (org-ctags-new-topic-template): Remove *
character in front of variable docstring.

* org-protocol.el (org-protocol-protocol-alist): Ditto.

See http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0fc749f9cc4a3c6f36715bb05e03469eee149b15
2012-04-21 16:03:20 +02:00
Bastien Guerry 58bef074a7 org-id.el (org-id-update-id-locations): New parameter to silent `org-id-find'.
* org-id.el (org-id-update-id-locations): New parameter to
silent `org-id-find'.
(org-id-find): Use the new parameter.

Thanks to Sébastien Vauban for raising a related issue.
2012-04-21 15:46:02 +02:00
Max Mikhanosha 7094dddca4 * lisp/org-agenda.el (org-agenda-quit): Fixed messed up parenthesis in previous commit
TINYCHANGE
2012-04-21 08:40:58 -04:00
Max Mikhanosha 9e4cacc803 Fix q key in sticky agenda not honoring org-agenda-restore-windows-after-quit
* lisp/org-agenda.el (org-agenda-quit): copy the code for optionally
  restoring window configuration after burying the sticky agenda
  buffer.
2012-04-21 08:32:12 -04:00
Nicolas Goaziou 97b0696212 org-list: Fix bugs relative to item indentation
* lisp/org-list.el (org-list-struct-indent): Follow
  `org-list-demote-modify-bullet' specifications for ordered bullets.
(org-list-indent-item-generic, org-indent-item-tree,
org-outdent-item-tree): Fix bug when operating on a region.
(org-outdent-item, org-indent-item): Allow to operate on a region.
* lisp/org.el (org-shiftmetaleft, org-shiftmetaright): Allow to
  operate on a region.
* testing/lisp/test-org-list.el: Add tests.
2012-04-21 12:13:49 +02:00
Nicolas Goaziou 60b84d7f4b org-footnote: Fix positionning in HTML export without a footnote section
* lisp/org-footnote.el (org-footnote-normalize): Fix positionning in
  HTML export without a footnote section.
2012-04-21 12:13:37 +02:00
Madan Ramakrishnan edb7e341d1 org-agenda.el: Fix `org-agenda-bulk-toggle'.
* org-agenda.el (org-agenda-bulk-mark): Truly make arg optional as
advertised by the function.

Problem here was that `org-agenda-bulk-toggle' calls
`org-agenda-bulk-mark' with no parameters; however, the (max arg 1)
call inside `org-agenda-bulk-mark' will fail with no parameter.

TINYCHANGE
2012-04-21 12:13:16 +02:00
Zachary Kanfer 4e4a7eb029 org.el (org-read-date-display): Fix bug when displaying the overlay.
* org.el (org-read-date-display): Fix bug when displaying the
overlay.

TINYCHANGE
2012-04-21 12:13:06 +02:00
Bastien Guerry 628431b06f org.el (org-mode): Don't use `buffer-face-mode' by default.
* org.el (org-mode): Don't use `buffer-face-mode' by default.

Still set `org-default' as the face for `buffer-face-mode-face' in
case the user turn `buffer-face-mode' on.
2012-04-21 12:12:54 +02:00