Commit Graph

2104 Commits

Author SHA1 Message Date
Achim Gratz 6fbc226ca5 further cleanup for org version
* UTILITIES/org-fixup.el (org-make-org-version): Provide feature
  'org-version.
* lisp/org-compat.el (org-check-version): New macro.  Check if
  org-version.el exists and provide autoloads to that. Otherwise check
  if org-fixup.el exists and use it to provide definitions.  Finally
  if nothing worked, complain about a botched installation and provide
  fallback definitions.
* lisp/org.el: Use org-check-version.

This should finally provide the correct behaviour in all supported
use-cases as well as a few corner scenarios that were reported on the
mailing list and allow to always build on Git, ELPA and Emacs Bzr
correctly.  The file org-version.el must be added to the Emacs sources
and should be re-generated each time orgmode Git is synced to Emacs
Bzr (it would be best to automate this).

Note that the internal functions (org-release) and (org-git-release)
are not autoloaded when org-version is not present and become only
available when org.el is loaded.  This should pose no problem since
they are only used by (org-version), which is autoloaded from org.el.
2012-07-15 13:53:53 +02:00
Achim Gratz 6762c7ea60 Clean-up for build system support and a fix for org-version.
* UTILITIES/org-fixup.el: Clean up and add doc strings.
* UTILITIES/org-fixup.el (org-make-autoloads): Add optional arguments
  and implementation for comopiling and force compiling.
* UTILITIES/org-fixup.el (org-make-autoloads-compile,
  org-make-autoloads-compile-force): Convenience definitions with
  pre-selected arguments, avoids complicated quoted on invocation from
  command line.
* UTILITIES/org-fixup.el (org-fixup): Add "-git" to git version when
  run from a bare Git worktree.  Give message instead of returning
  string inside quoted progn for easier tracing.
* lisp/org.el: Fix a subtle error resulting in version functions
  sometimes not being defined and byte-compiling failing.  Always
  compile in fallback definitions into org.elc -- org-fixup either
  provides re-definitions at compile-time or checks org-version.el and
  then the git work tree when run uncompiled.  So the fallback
  definitions will only come into effect when org-fixup is not
  available.
2012-07-14 20:42:18 +02:00
Bastien Guerry b6cb722377 Explicitely says only letters are supported as fast TODO selection keys.
* org.texi (Fast access to TODO states): Explicitely says only
letters are supported as fast TODO selection keys.

* org.el (org-todo-keywords): Ditto.

Thanks to Samuel Wales for pointing at this.
2012-07-14 09:15:50 +02:00
Bastien Guerry dacd62b98d org.el (org-use-fast-todo-selection): Reformat docstring.
* org.el (org-use-fast-todo-selection): Reformat docstring.
2012-07-14 09:06:24 +02:00
Bastien Guerry fea1b82bef Bind `org-clock-in-last' to C-c C-x C-x and ̀org-clock-cancel' to C-c C-x C-q.
* org.el (org-flag-drawer): Add a docstring.
(org-mode-map): Bind ̀org-clock-cancel' to "C-cC-xC-q" and
`org-clock-in-last' to "C-cC-xC-x".  This fixes a bug in the
previous keybinding for `org-clock-in-last', which would
override the one for `org-clock-in'.

* org-clock.el (org-clock-in-last): Prevent errors when there
is no clocking history.
(org-clock-cancel): Fix bug when checking against a clock log
in a folded drawer.

Thanks to Bernt Hansen who reported the problem.
2012-07-14 08:33:48 +02:00
Bastien Guerry ef3d4b5965 org.el: Allow %(my-function) as a specifier in abbreviated links.
* org.el (org-link-expand-abbrev): Implement "%(my-function)"
as a new specifier.  Update the docstring.

* org.texi (Link abbreviations): Illustrate the use of the
"%h" specifier.  Document the new "%(my-function)" specifier.

Thanks to Takaaki ISHIKAWA who came all the way down from Tokyo
to Paris and raised a not-so-distant issue: "could we translate
emails from the mailing list and have a URI for each translated
email?"  See the update in the manual for an answer.
2012-07-13 18:22:45 +02:00
Bastien Guerry 3270f3a0eb org.el (org-startup-options): Fix docstring formatting.
* org.el (org-startup-options): Fix docstring formatting.
2012-07-13 01:17:42 +02:00
Bastien Guerry ce80dee476 org.el (org-use-sub-superscripts): Fix typo in docstring.
* org.el (org-use-sub-superscripts): Fix typo in docstring.
2012-07-13 01:14:32 +02:00
Bastien Guerry 620737757f org.el: Fix bug in `org-refile'.
* org.el (org-refile): Fix bug: prevent looping when calling
`org-set-tags' internally.
2012-07-12 14:29:54 +02:00
Bastien Guerry 3528fc6b42 Implement continuous clocking. Small other improvements. Update documentation.
* org.el (org-mode-map): Add `C-c C-x C-I' as a keybinding for
`org-clock-in-last'.

* org-clock.el (org-clock-continuously): New option.
(org-clock-in): Three universal prefix arguments set
`org-clock-continuously' to `t' temporarily.
(org-clock-in-last): Fix call to `org-clock-select-task' and
support continuous clocking.
(org-clock-out-time): New variable.
(org-clock-out): set `org-clock-out-time' when clocking out.
Small docstring rewriting.
(org-clock-remove-empty-clock-drawer): Fix "invalid search
bound" bug when trying to delete empty logbook drawer.
(org-clock-cancel): If the clock log is gone, send a warning
instead of deleting the region that is supposed to contain it.

* org.texi (Clocking commands): New cindex.
(Clocking commands): Update documentation for `org-clock-in'.
Document `org-clock-in-last'.  Mention `org-clock-out' and
`org-clock-in-last' as commands that can be globally bound.
(Resolving idle time): Document continuous clocking.
2012-07-12 14:04:54 +02:00
Bastien Guerry 9fb530dc48 org.el: Allow moving the region by one line up and down.
* org.el (org-move-line-down, org-move-line-up): Remove.
(org-metaup, org-metadown): When the region is active, move it
up/down by one line, with no regard to the context.
2012-07-12 11:57:05 +02:00
Bastien Guerry 8610790a4e org.el: Update comment section about mapping outline.el commands. 2012-07-12 08:31:20 +02:00
Bastien Guerry be56d706ae org.el: New function `org-indent-region'.
* org.el (org-mode): Set `indent-region-function'.
(org-indent-region): New function.
(org-fill-paragraph): When in a src block, use `indent-region'
to indent the whole source code instead of falling back on
`fill-paragraph', as this function messes up the code.
2012-07-11 20:45:17 +02:00
Bastien Guerry d5aa0e0d73 Rename `org-indent-line-function' to `org-indent-line'.
* org.el (org-mode, org-add-log-setup)
(org-get-property-block, org-entry-put)
(org-property-next-allowed-value, org-return)
(org-indent-line): Rename `org-indent-line-function' to
`org-indent-line'.

* org-timer.el (org-timer-item): Ditto.

* org-table.el (org-table-store-formulas): Ditto.

* org-clock.el (org-clock-in, org-clock-find-position): Ditto.
2012-07-11 19:11:26 +02:00
Bastien Guerry aa3e68facc Two new speed commands.
* org.el (org-speed-commands-default): Two new speed commands.
Use `:' for `org-columns' and ̀#' for `org-toggle-comment'.
2012-07-06 19:58:35 +02:00
Bastien Guerry 2cf1ff345e org.el (org-time-stamp): C-u C-u C-c . inserts a timestamp with no prompt.
* org.el (org-time-stamp): With two universal arguments,
insert an active timestamp with the current time without
prompting the user.

This idea came up on the list, I can't recall who proposed this.
Thanks to him anyway!
2012-07-06 13:16:13 +02:00
Bastien Guerry f801549160 org.el (org-doi-server-url): Update :group.
* org.el (org-doi-server-url): Update :group.

Also move the option.
2012-07-06 08:57:44 +02:00
Bastien Guerry 2bab6b7b6a org.el: New option `org-doi-server-url'.
* org.el (org-doi-server-url): New option.
(org-open-at-point): Use it.

Thanks to Fabrice Pardo for requesting this.
2012-07-05 19:35:46 +02:00
Bastien Guerry a6e4dcfb4d org.el: `org-toggle-heading' skips comments and returns a message when nothing has been done.
* org.el (org-at-comment-p): New function.
(org-toggle-heading): Use `org-at-comment-p' to skip comments.

Thanks to Charlie Millar for raising this issue.
2012-07-05 16:35:56 +02:00
Achim Gratz 7be6352932 Make org-version more robust
* lisp/org.el (org-version): Make org-version more robust, e.g. when
  byte-compiling single files with 'make compile-dirty'.
2012-06-04 08:41:02 +02:00
Bastien Guerry d8d60627d1 org.el: RET should not follow a timestamp when the point is right after it.
* org.el (org-at-timestamp-p): Set ̀org-ts-what' to 'after when
the point is right after the timestamp.  `org-at-timestamp-p'
still returns `t' in this case, as this is more practical.
(org-return): Check against ̀org-ts-what' to verify that point
is really within the timestamp (if any).

Thanks to Nick Dokos for raising this issue.
2012-06-01 15:54:44 +02:00
Achim Gratz b4d827c402 Revert an undesirable change in org-reload.
* lisp/org.el (org-reload): Revert an undesirable change in
  org-reload.  Do not prepend org-dir to babel-files, which prevents
  the files from being found in load-path.
2012-06-01 10:14:04 +02:00
Bastien Guerry 8c91f690a5 org.el (org-return): Follow time-stamp links when point is an a time-stamp.
* org.el (org-return): Follow time-stamp links when point is
an a time-stamp.

Thanks to Samuel Wales for suggesting this.
2012-05-26 00:15:06 +02:00
Nicolas Goaziou 6cddf74250 Merge branch 'maint' 2012-05-25 20:24:58 +02:00
Nicolas Goaziou 8b46521211 Restrict priorities fontification to headlines and inlinetasks
* lisp/org.el (org-font-lock-add-priority-faces): Restrict priorities
  fontification to headlines and inlinetasks.
2012-05-25 20:23:43 +02:00
Mark Shoulson 4e4e161f8f Fix for displaying entities ending in a number
* lisp/org.el (org-fontify-entities): Fix bug: The entities \sup[123] and
  \there4 were not "prettified" when org-pretty-entities was enabled.

TINYCHANGE
2012-05-25 16:56:57 +02:00
Mark Shoulson bde1b2f942 Fix for displaying entities ending in a number
* lisp/org.el (org-fontify-entities): Fix bug: The entities \sup[123] and
  \there4 were not "prettified" when org-pretty-entities was enabled.

TINYCHANGE
2012-05-25 16:50:06 +02:00
Bastien Guerry 60587ea91c Bump to version 7.8.11. 2012-05-25 09:36:15 +02:00
Bastien Guerry be8d545092 Allow to open the agenda from a timestamp in a headline.
* org.el (org-open-at-point): Allow to open the agenda from an
active or inactive timestamp in a headline.

TINYCHANGE

Thanks to Ingo Lohmar for this patch.
2012-05-24 11:33:00 +02:00
Bastien Guerry 31aa82c998 Merge branch 'maint' 2012-05-23 12:13:39 +02:00
Bastien Guerry 141d0fd24b org.el (org-scan-tags): Fix bug when building the scanner regexp.
* org.el (org-scan-tags): Fix bug when building the scanner regexp.

Thanks to Mike McLean, who first reported this issue and provided a
reproducible recipe.  Thanks to Laurynas Biveinis and Loris Bennett
who provided complementary feedback on this.
2012-05-23 12:13:21 +02:00
Achim Gratz 40a789ecd1 fix org-reload and add parameters to customize output from org-version
* org.el(org-version): Add optional parameters 'full and 'message
  to optionally return the full version string and echo to message
  area in non-interactive calls.

* org.el(org-submit-bug-report): Add optional parameter 'full to
  call of (org-version) so that the bug report has all version
  information.

* org.el(org-reload): Simplify file-re (orgtbl-*.el files do not
  exist anymore).  Keep org-*.el at the end of the files list.
  Explicitely load org-version.el (since it doesn't provide feature
  'org-version) at the very end, but ignore errors when it doesn't
  exist.  Add parameters 'full and 'message to the call
  of (org-version) so that after reload the full version information
  is displayed in the message area again.
2012-05-19 10:52:09 +02:00
Achim Gratz 595d451280 use org-no-warnings macro for XEmacs compatibility
* lisp/org-agenda.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org-bbdb.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org-clock.el: Replace with-no-warnings with
  org-no-warnings (defined in org-macs.el).

* lisp/org.el: Replace with-no-warnings with org-no-warnings (defined
  in org-macs.el).
2012-05-19 09:48:57 +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 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 c4cad9f80b Fix merge conflict. 2012-05-16 23:46:36 +02: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
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
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
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 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
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