Commit Graph

326 Commits

Author SHA1 Message Date
Nicolas Goaziou 0d24086657 Update some copyright years 2015-02-16 01:40:07 +01:00
Aaron Ecay 56bbacfd89 org-compat: obsolete org-activate-mark.
* lisp/org-compat.el (org-activate-mark): Make obsolete.

The activate-mark function was introduced in Emacs 23 and
org-activate-mark wasn’t called anywhere in the code base.
2015-01-18 23:42:32 -05:00
Achim Gratz e6883dd03d org-compat: Provide compatibility definition for font-lock-ensure
* lisp/org-compat.el: Provide compatibility definition for
  `font-lock-ensure' falling back to `font-lock-fontify-buffer' via an
  alias.

This fallback fixes f36b19eef6.  Using a simple alias means we can't
use the optional arguments for `font-lock-ensure' or would have to
provide a macro if we ever want to use them.
2014-06-01 14:22:42 +02:00
Bastien Guerry 54ab137689 Fix bug when update timestamps on filtered agenda entries
* org-compat.el (org-in-invisibility-spec-p): Tiny code
cleanup.
(org-move-to-column): Only remove '(org-filtered) from
`buffer-invisibility-spec'.

* org-agenda.el (org-agenda-mode): Add buffer invisibility
specs.
(org-agenda-filter-hide-line, org-agenda-remove-filter): Set
the 'invisible text property to 'org-filtered.
(org-agenda-show-new-time): Add the default face to avoid the
foreground of the last character on the line to leak into the
timestamp notification.

Thanks to Thomas Morgan for reporting this.
2014-05-26 14:55:50 +02:00
Bastien Guerry 0e344ae04a org-compat.el (org-move-to-column): Fix bug
* org-compat.el (org-move-to-column): Temporarily set
`buffer-invisibility-spec' more accurately.

Thanks to Samuel Wales for reporting this.
2014-03-25 12:04:09 +01:00
Bastien Guerry a3ec854cab Fix bugs wrt invisibility handline.
* org-compat.el (org-move-to-column): Always ignore invisible
text in agenda buffer, and when there is both a bracket link
and '(org-link) as a member of `buffer-invisibility-spec'.
Add a docstring.

* org.el (org-align-tags-here): Add docstring and remove
useless arguments when calling `org-move-to-column'.

* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row):
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-todo)
(org-agenda-priority, org-agenda-show-new-time)
(org-agenda-clock-in, org-agenda-clock-out): Remove useless
arguments when calling `org-move-to-column'.

This fixes the issue about S-RET not placing the cursor in the right
table field when M-x org-toggle-link-display RET removed '(org-link)
from `buffer-invisibility-spec' and some other discrepancies (like
S-M-<up> not restoring point correctly when there is a bracket link
before point, or M-x org-clock-display RET not aligning overlays
correctly, etc.

Thanks to Matt Lundin and Michael Brand for tracking issues
about this.
2014-03-20 15:04:49 +01:00
Bastien Guerry 84bb027076 Revert "org-compat.el (org-move-to-column): Bugfix"
This reverts commit b32306279b.
2014-03-13 12:14:58 +01:00
Bastien Guerry b32306279b org-compat.el (org-move-to-column): Bugfix
* org-compat.el (org-move-to-column): Fix bug about ignoring
bracket links visibility status in tables with S-RET.

Thanks to Michael Brand for reporting this.
2014-03-12 19:42:07 +01:00
Bastien Guerry 77458b782a org-compat.el (org-set-transient-map): New alias
* org-compat.el (org-set-transient-map): Alias pointing at
`set-transient-map' if defined, at `set-temporary-overlay-map'
otherwise.

Thanks to Eric Abrahamsen for reporting this.
2014-01-22 11:42:51 +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 0beda99171 Revert "Update copyright years."
This reverts commit 21105594fc.
2014-01-05 06:28:07 +01:00
Bastien Guerry 21105594fc Update copyright years. 2014-01-04 18:56:11 +01:00
Alexander Vorobiev b88b5d4fd1 org-compat: Support for getting data from Windows clipboard
* lisp/org-compat.el (org-get-x-clipboard): Use w32-get-clipboard-data
to get the clipboard data under Windows.

TINYCHANGE
2013-11-22 10:52:41 +01:00
Bastien Guerry 2911965bfe org-agenda: Fix bug when showing the new time
* org-agenda.el (org-agenda-show-new-time): Ignore invisible
text when inserting the new time as a text property.

* org-compat.el (org-move-to-column): New argument
`ignore-invisible' to turn on `buffer-invisibility-spec'.

Thanks to Marcin Borkowski and Karl Voit for reporting this.
2013-11-06 09:59:46 +01:00
Carsten Dominik 7f9d0688d4 Fix cursor movement to a specific column
* lisp/org-compat.el (org-move-to-column): Turn off invisibility stuff
for moving the cursor to a column.

Pathc by Nick Dokos
2013-08-31 15:44:34 +02:00
Bastien Guerry ef98a614f6 org-compat.el: Fix indentation. 2013-06-11 03:17:27 +02:00
Achim Gratz 2e4bcfc50d org-compat: XEmacs actually needs the argument lists...
org-compat (define-obsolete-variable-alias,
define-obsolete-function-alias): Re-introduce argument lists as
XEmacs' byte-compiler otherwise stops compilation.

This means that no other advices must modify these functions with a
different argument list.
2013-06-10 20:47:41 +02:00
Achim Gratz d7eed32784 org-compat: remove argument lists from defadvice, use positional arguments instead
org-compat (custom-handle-keyword, define-obsolete-variable-alias,
define-obsolete-function-alias): Remove argument lists from defadvice
and use positional arguments instead of named arguments.
2013-06-10 20:13:43 +02:00
Achim Gratz 66057bd2a8 org-compat: strip last argument from define-obsolete-{function,variable}-alias for XEmacs
* lisp/org-compat.el (define-obsolete-variable-alias,
  define-obsolete-function-alias): Actually remove the third (and any
  following) argument from the argument list before calling the
  advised function.
2013-06-10 19:45:55 +02: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
Bastien Guerry 308f380ebc org-compat.el (org-ignore-region): Tiny docstring fix
* org-compat.el (org-ignore-region): Tiny docstring fix.
2013-03-26 12:50:14 +01:00
Bastien Guerry f9224ea36a lisp/org-compat.el (org-defvaralias): Fix declare form
* lisp/org-compat.el (org-defvaralias): Fix declare form.
2013-03-15 12:06:44 +01:00
Bastien Guerry e0e699ab3d org-compat.el: New compatibility function `org-defvaralias'
* org-compat.el (org-defvaralias): Newcompatibility function.
* org.el:
* org-agenda.el:
* org-list.el:
* org-gnus.el:
* org-clock.el: Use it.
2013-03-14 13:53:52 +01:00
Bastien Guerry bc7dbcab9f org.el (org-insert-heading): DTRT when in a narrowed region
* org.el (org-insert-heading): DTRT when in a narrowed region.

* org-compat.el (org-buffer-narrowed-p): New compatibility
function.

Thanks to Samuel Wales for reporting this problem.
2013-03-13 10:57:49 +01:00
Bastien Guerry 372a3ecda8 New compatibility macro `org-with-silent-modifications'
* org-macs.el: Don't define `with-silent-modifications' for
emacsen that don't have it.

* org-compat.el (org-with-silent-modifications): New
compatibility macro.

* org.el (org-refresh-category-properties)
(org-refresh-properties, org-entry-blocked-p)
(org-agenda-prepare-buffers):
* org-indent.el (org-indent-remove-properties)
(org-indent-add-properties):
* org-colview.el (org-columns-display-here)
(org-columns-remove-overlays, org-columns-quit)
(org-columns-edit-value, org-columns-compute-all)
(org-columns-compute, org-agenda-colview-compute):
* org-clock.el (org-clock-sum): Use the compatibility macro
`org-with-silent-modifications' instead of
`with-silent-modifications'.

Thanks to Achim for a preliminary patch.
2013-02-25 11:44:27 +01:00
Bastien Guerry 5ea1322c99 org-compat.el (org-file-equal-p): New compatibility function
* org-compat.el (org-file-equal-p): New compatibility function.

* ox.el (org-export-output-file-name): Use the new function.

Thanks to Mark Edgington for reporting this.
2013-02-19 18:01:03 +01:00
Bastien Guerry 7369cada30 Merge branch 'maint' 2013-01-13 11:17:56 +01:00
Bastien Guerry e8f5b0ad72 Delete `org-condition-case-unless-debug'
* org-compat.el (org-condition-case-unless-debug): Delete.

* org-odt.el (org-odt-cleanup-xml-buffers): Use
`condition-case' instead of `org-condition-case-unless-debug',
which is now deleted.
2013-01-13 09:27:08 +01:00
Bastien Guerry 3a5a4ddd41 Revert "Backwards compatibility: don't defalias special forms"
This reverts commit b63275350f.
2013-01-13 09:24:43 +01:00
Bastien Guerry 04eb4b08c3 Revert "Compatibility: Use org-define-obsolete-{function,variable}-alias"
This reverts commit 305f29776f.
2013-01-13 09:19:24 +01:00
Achim Gratz 409ee8a2f2 Compatibility: XEmacs does not have user-emacs-directory, use user-init-directory instead
* lisp/org-compat.el (user-emacs-directory): If not bound, define as an alias to
  `user-init-directory´ so that XEmacs continues to be happy with Org.
2013-01-12 18:24:18 +01:00
Bastien Guerry 72bc144c15 Update Copyright lines to match Emacs format. 2013-01-08 15:04:32 +01:00
Achim Gratz 305f29776f Compatibility: Use org-define-obsolete-{function,variable}-alias
* lisp/org-compat.el (org-define-obsolete-function-alias,
  org-define-obsolete-variable-alias): Introduce new compatibility
  macros to obsolete functions and variables.

* lisp/org-agenda.el, lisp/org-clock.el, lisp/org-id.el,
  lisp/org-lparse.el, lisp/org-protocol.el lisp/org.el: Use
  `org-define-obsolete-{function,variable}-alias´instead of
  `define-obsolate{function,variable}-alias´.
2013-01-06 18:29:05 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry 1b4e396b6b Merge branch 'maint-fixes' into maint 2012-12-24 14:01:25 +01:00
Achim Gratz b63275350f Backwards compatibility: don't defalias special forms
* lisp/org-compat.el (org-condition-case-unless-debug): Do not use
  defalias for special forms, the Emacs 22 byte-compiler does not
  recognize them correctly when compiling macros.  Use a macro instead
  and rely on macro expansion.  That however makes the decision at
  compile time, which should be acceptable in this case since it only
  affects debugging.
2012-12-24 14:01:14 +01:00
Bastien Guerry 58999598ed New compatibility function `org-delete-directory'
* org-compat.el (org-delete-directory): New compatibility
function for Emacs 22, where `delete-directory' does not
support recursive deletion.

* org-odt.el (org-odt-cleanup-xml-buffers): Use the new
compatibility function.

Thanks to Achim and Jambunathan for suggesting this.
2012-12-24 13:51:48 +01:00
Achim Gratz b508943d32 org-compat: new macro org-no-popups
* lisp/org-compat.el (org-no-popups): New wrapper macro which
  let-binds the correct variables to suppress popup windows depending
  on the Emacs version in use.  This is a compile-time decision when
  byte-compiling.

* lisp/org.el (org-get-location, org-switch-to-buffer-other-window):
  Use the wrapper `org-no-popups´ to let-bind the correct variables
  for suppression of popup windows.
2012-12-20 12:57:52 +01:00
Bastien Guerry 23e2346c4c org-compat.el: Fix bug: don't use `eval-when-compile' when aliasing `user-error'.
* org-compat.el: Fix bug: don't use `eval-when-compile' when
aliasing `user-error'.

Thanks to Bernt Hansen for reporting this bug.
2012-12-19 17:43:57 +01:00
Achim Gratz b9ea74a195 Backwards compatibility for `user-error´
* lisp/org-compat.el (user-error): Defalias to `error´ for Emacsen
  that don't have it.
2012-12-19 15:33:29 +01:00
Achim Gratz d56ad98544 fix a possible (wrong-type-argument stringp nil) error
* lisp/org-compat.el: Make sure that file-name-directory is getting a
  stringp.  This avoids a possible "(wrong-type-argument stringp nil)"
  error when the library in question does not exist.
2012-10-07 18:11:33 +02:00
Achim Gratz c5977e7e9d Revert "org-compat.el: New compatibility function `org-random'"
This reverts commit 7719734dd7.

* lisp/org-id.el: Do not use (random t), we just want a new random
  number, not a re-seeding of the PRNG for which (random t) doesn't
  provide enough entropy anyway.  Even if (random) would always
  produce the same sequence, the other components going into the MD5
  hash ensure that the result will be unique.
2012-09-11 21:42:38 +02:00
Bastien Guerry 7719734dd7 org-compat.el: New compatibility function `org-random'
* org-compat.el (org-random): New compatibility function.

* org-id.el (org-id-uuid): Use it.
2012-09-03 13:16:52 +02:00
Bastien Guerry 4bde726bbb * org-compat.el (org-check-version): Autoload. 2012-08-26 20:04:41 +02:00
Achim Gratz bf352eceda Rename utils/ to mk/, move some files to mk/ and make the requisite changes throughout
* Makefile: Include default.mk and targets.mk from mk/ where they've
  been moved to.

* README_maintainer: Rename utils to make throughout.

* doc/Makefile: Rename utils to make throughout.

* doc/org.texi: Remove reference to utils/, x11idle.c is now in
  contrib/scripts.

* mk/make_emacs_changelog: Add mk/ to list of directories not to be
  reported in Emacs' ChangeLog.  Also retain utils/ and re-add
  UTILITIES; add a comment explaining why these need to stay.

* mk/default.mk: Rename utils to make throughout.  Include version.mk
  from mk/ where it's been moved to.

* mk/targets.mk: Rename utils to make throughout.

* mk/server.mk: Rename utils to make throughout.  Only put those files
  from mk/ into the archives that are needed outside the server:
  default.mk targets.mk version.mk and org-fixup.el.

* lisp/org-compat.el: Rename utils to make throughout.

* .gitignore:  Rename utils to make throughout.
2012-08-26 15:27:19 +02:00
Bastien Guerry 0c8e87b8d2 Rename UTILITIES/ to utils/ 2012-08-23 12:47:10 +02:00
Bastien Guerry cacb08334a Merge branch 'org-no-properties' 2012-08-15 14:43:35 +02:00
Bastien Guerry b62604236d Replace `org-labels' by `let*'
* ob.el (org-babel-sha1-hash, org-babel-noweb-p): Replace
`org-labels' by `let*'.

* org-bibtex.el (org-bibtex-headline): Ditto.

* org-compat.el: Delete `org-labels'.
2012-08-15 09:56:35 +02:00
Bastien Guerry 722e0e0c83 Remove `org-substring-no-properties' and some redundant code
* org-macs.el (org-no-properties): Allow a new parameter
`restricted' to restrict the properties removal to those in
`org-rm-props'.  The default is now to remove all properties.

* org-compat.el (org-substring-no-properties): Remove unused
defun.

* org-remember.el (org-remember-apply-template): Remove
redundant removal of text properties.
(org-remember-apply-template): Use `org-no-properties'.

* org-capture.el (org-capture-fill-template): Remove redundant
removal of text properties.
(org-capture-fill-template): Use `org-no-properties'.

* org-gnus.el (org-gnus-open, org-gnus-follow-link): Use
`org-no-properties'.
2012-08-15 09:35:21 +02:00
Eric Schulte 37e19ea2d0 Revert "Don't use `org-labels'"
This reverts commit 9d4e1517b6.
2012-08-13 08:17:46 -06:00