Commit Graph

129 Commits

Author SHA1 Message Date
Ihor Radchenko e81a094383
Assert all the Org files to load the same Org version
* lisp/org-compat.el (org-assert-version): New macro comparing Org
version at compile time and laod time.

Add `org-assert-version' call to all files:

* lisp/org-macs.el:
* lisp/org-crypt.el:
* lisp/org-ctags.el:
* lisp/org-cycle.el:
* lisp/org-datetree.el:
* lisp/org-duration.el:
* lisp/org-element.el (avl-tree):
* lisp/org-entities.el:
* lisp/org-faces.el:
* lisp/org-feed.el:
* lisp/org-fold-core.el:
* lisp/org-fold.el:
* lisp/org-footnote.el:
* lisp/org-goto.el:
* lisp/org-habit.el:
* lisp/org-id.el:
* lisp/org-indent.el:
* lisp/org-inlinetask.el:
* lisp/org-keys.el:
* lisp/org-lint.el:
* lisp/org-list.el:
* lisp/org-macro.el:
* lisp/org-mobile.el:
* lisp/org-mouse.el:
* lisp/org-num.el:
* lisp/org-pcomplete.el:
* lisp/org-persist.el:
* lisp/org-plot.el:
* lisp/org-protocol.el:
* lisp/org-refile.el:
* lisp/org-src.el:
* lisp/org-table.el:
* lisp/org-tempo.el:
* lisp/org-timer.el:
* lisp/org.el:
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-icalendar.el:
* lisp/ox-koma-letter.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-publish.el:
* lisp/ox-texinfo.el:
* lisp/ox.el:
2022-09-04 12:24:55 +08:00
Ihor Radchenko fa7530c7b4
Rename old function call to use org-fold 2022-04-25 19:39:53 +08:00
Kyle Meyer 5a229cbc44 Update copyright year to 2022 2022-01-01 15:17:08 -05:00
Bastien 806ac1b7f6 *el: Fix indentation 2021-09-29 09:22:47 +02:00
Stefan Monnier a85b4cc5c6 Backport commit 7d0dc3183 from Emacs
* lisp/ob-lilypond.el (org-babel-lilypond-compile-lilyfile):
Remove always-nil variable `arg-2`.

* lisp/ol-gnus.el (org-gnus-store-link):
Remove always-nil variables `newsgroup` and `xarchive`.

* lisp/ol.el (org-store-link):
Remove always-nil variable `description`.

* lisp/org-clock.el (org-clock-special-range):
Remove always-nil variables `m1` and `m`.

* lisp/org-crypt.el (org--matcher-tags-todo-only): Declare var.

* lisp/org-protocol.el (org-protocol-open-source):
Remove always-nil variable `result`.

* lisp/ox-odt.el (org-odt-format-label):
Remove always-nil variable `short-caption`.
(org-odt-link--inline-formula):
Remove always-nil variables `width` and `height`.

* lisp/ox.el (org-export--missing-definitions):
Remove always-nil variable `seen`.

* lisp/: Delete some always-nil variables
7d0dc31833d471a6f86e947d3165d3fd1452a184
Stefan Monnier
Thu Mar 11 13:07:37 2021 -0500
2021-03-14 17:54:17 -04:00
Kyle Meyer 99eafe3787 Update copyright year to 2021 2021-01-01 14:59:01 -05:00
Bastien Guerry 755367f362 org.el (org-end-of-meta-data): Allow to skip only standard drawers
* lisp/org.el (org-end-of-meta-data): Allow to skip only standard
drawers, i.e. properties and logbook drawers.

* lisp/org-crypt.el (org-at-encrypted-entry-p)
(org-encrypt-entry): Use `org-end-of-meta-data' so that standard
drawers are all skipped, including logbook drawers.

Reported-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
See https://orgmode.org/list/87d02qgj6u.fsf@nicolasgoaziou.fr
and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43094 for the reason
of the previous fix c93983613d.
2020-09-13 18:36:15 +02:00
Bastien d50823be14 fixup! Merge branch 'maint' 2020-09-06 10:05:43 +02:00
Bastien 1170e39bea org-crypt.el: Fix encrypt/decrypt in presence of arbitrary drawers
* lisp/org/org-crypt.el (org-encrypt-entry, org-decrypt-entry): Skip
  _all_ meta data before looking for PGP content.

TINYCHANGE
2020-09-06 10:05:31 +02:00
Nicolas Goaziou 9bc0cc7fb3 crypt: Allow nil value for `org-crypt-key'
* lisp/org-crypt.el (org-crypt-key): Allow nil value.
(org-crypt-key-for-heading): Handle nil value for `org-crypt-key'.
2020-05-17 00:04:35 +02:00
Nicolas Goaziou 5441b2d5ca crypt: Add autoloads, cleanup headers and requires 2020-05-17 00:04:35 +02:00
Nicolas Goaziou d3c15e2b34 crypt: Small improvements
* lisp/org-crypt.el (org-crypt--encrypted-text): New function.
(org-at-encrypted-entry-p): Better return value and more thorough
checks.
(org-encrypt-entry):
(org-decrypt-entry): Use new function.  Better handling of indented
crypted text, and folding.
2020-05-17 00:04:35 +02:00
Nicolas Goaziou 7939da783e crypt: Fix crypting with multiple keys
* lisp/org-crypt.el (org-crypt-key): Improve docstring accuracy.
(org-encrypt-string): Remove function.
(org-crypt-key-for-heading): Correctly handle `epa-file-encrypt-to'
value.  Really return nil for symmetric encryption.
(org-encrypt-entry): Inline removed function. Tiny refactoring.
2020-05-15 16:56:57 +02:00
Kyle Meyer ff5fc050d3 Update copyright year to 2020 2020-01-01 13:38:46 -05:00
Nicolas Goaziou 12f93c112b Use `org-flag-subtree' instead of `outline-hide-subtree'
* lisp/org-agenda.el (org-agenda-show-1):
* lisp/org-archive.el (org-archive-to-archive-sibling):
* lisp/org-crypt.el (org-encrypt-entry):
* lisp/org-feed.el (org-feed-update):
* lisp/org.el (org-set-visibility-according-to-property):
(org-move-subtree-down):
(org-paste-subtree):
(org-yank-generic):
* testing/lisp/test-org-inlinetask.el (test-org-inlinetask/folding-directly-consecutive-tasks/1): Use `org-flag-subtree' instead of `outline-hide-subtree'.

`outline-hide-subtree' leaves overlays on top of white spaces,
particularly at the end of the buffer. `org-flag-subtree' does not.
2019-05-11 09:48:53 +02:00
Bastien f584d37a67 Update copyright year 2019-01-01 11:50:56 +01:00
Kyle Meyer 3e1641ef0a Update copyright years 2018-01-07 00:27:54 -05:00
Paul Eggert ff0dcf52a5 Backport commit bc511a64f from Emacs
Prefer HTTPS to FTP and HTTP in documentation
bc511a64f6da9ab51acc7c8865e80c4a4cb655c2
Paul Eggert
Wed Sep 13 15:54:37 2017 -0700
2017-09-17 00:28:38 -04:00
Kaushal Modi 3bcfed071d Fix breakage due to outline-invisible-p defn change in emacs 26+
* lisp/org.el (org-invisible-p): New function.  Restore the behavior
of outline-invisible-p prior to the following commint on emacs master
<http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9cc59ffbbb2f20fbbf1c72d2e0c9dc47c7906a99>.

* lisp/org.el (org-cycle-internal-local)
(org-clean-visibility-after-subtree-move, org-goto)
(org-get-location, org-move-subtree-down, org-copy-subtree)
(org-paste-subtree, org-next-link, org-mark-ring-goto)
(org-todo, org-deadline, org-schedule, org-set-tags)
(org-truely-invisible-p, org-invisible-p2)
(org-forward-heading-same-level, org-forward-paragraph)
(org-backward-paragraph, org-down-element)
(org-bookmark-jump-unhide, org-mark-jump-unhide):
* lisp/org-list.el (org-insert-item):
* lisp/org-crypt.el (org-encrypt-entry, org-decrypt-entry):
* lisp/org-clock.el (org-clock-load):
* lisp/org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag)
(org-archive-set-tag):
* contrib/lisp/org-drill.el (org-drill-hide-subheadings-if): Use
org-invisible-p instead of outline-invisible-p.

Reference:
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-06/msg00230.html>
2017-06-15 08:10:47 -04:00
Nicolas Goaziou 336bab6ea7 Update copyright years
* lisp/org-crypt.el:
* lisp/ox-publish.el: Update copyright years.
2017-01-01 11:19:15 +01:00
Nicolas Goaziou dd727cf0cb org-crypt: Fix data loss when providing an empty key
* lisp/org-crypt.el (org-encrypt-entry): Insert original text back
  upon encryption failure.

Reported-by: fxiny <wtimew@libero.it>
<http://permalink.gmane.org/gmane.emacs.orgmode/111115>
2017-01-01 10:34:36 +01:00
Nicolas Goaziou de24694f05 Turn org-mode into Org or Org mode
Use Org or Org mode instead of org-mode or Org-mode according to
"Documentation standards".
2016-08-23 22:13:56 +02:00
Nicolas Goaziou b67a3ff715 org-crypt: Use lexical binding 2016-06-20 15:00:47 +02:00
Nicolas Goaziou 0ac099a6f8 Remove final parts of XEmacs compatibility code
* lisp/org-compat.el: Declare `org-add-hook', `org-decompose-region',
  `org-detach-overlay', `org-file-equal-p', `org-float-time',
  `org-indent-line-to', `org-indent-to-column', `org-looking-at-p',
  `org-looking-back', `org-propertize', `org-re' and
  `org-select-frame-set-input-focus' as obsolete.
(org-overlay-display, org-overlay-before-string, org-find-overlays):
Move to "org.el"
(org-xemacs-key-equivalents, org-xemacs-p): Remove variables.
(org-region-active-p): Drop XEmacs support.
(org-xemacs-without-invisibility): Remove macro.
(org-get-x-clipboard-compat): Remove function.
* lisp/org-macs.el (org-match-string-no-properties): Remove function.

* lisp/ob-core.el:
* lisp/org-agenda.el:
* lisp/org-archive.el:
* lisp/org-clock.el:
* lisp/org-colview.el:
* lisp/org-crypt.el:
* lisp/org-element.el:
* lisp/org-faces.el:
* lisp/org-feed.el:
* lisp/org-footnote.el:
* lisp/org-habit.el:
* lisp/org-id.el:
* lisp/org-indent.el:
* lisp/org-inlinetask.el:
* lisp/org-lint.el:
* lisp/org-list.el:
* lisp/org-mouse.el:
* lisp/org-pcomplete.el:
* lisp/org-src.el:
* lisp/org-table.el:
* lisp/org-timer.el:
* lisp/org.el:
* lisp/ox-ascii.el:
* lisp/ox-odt.el:
* lisp/ox.el:
* contrib/lisp/org-notify.el:
* contrib/lisp/ox-taskjuggler.el:
* contrib/lisp/org-wikinodes.el:
* testing/lisp/test-org-src.el:
* testing/lisp/test-org.el: Silence byte-compiler.
2016-05-26 13:56:25 +02:00
Nicolas Goaziou d5a603db1f Merge branch 'maint' 2016-03-10 09:54:52 +01:00
Nicolas Goaziou cb5f323b0d org-crypt: Decrypt entries with a properties drawer
* lisp/org-crypt.el (org-decrypt-entry): Decrypt entries with
  a properties drawer.

This commit propagates changes made to `org-encrypt-entry' in the
previous commit.
2016-03-10 09:52:53 +01:00
Nicolas Goaziou b43898a237 Merge branch 'maint' 2016-03-10 09:50:49 +01:00
Nicolas Goaziou 11d2b3c3f8 org-crypt: Do not encrypt properties drawers
* lisp/org-crypt.el (org-encrypt-entry): Do not encrypt properties
  drawer, as specified in the manual.

Reported-by: "Daniel E. Doherty" <ded@ddoherty.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/105587>
2016-03-10 09:43:36 +01:00
Kyle Meyer 034c176995 Merge branch 'maint' 2016-01-24 16:41:20 -05:00
Kyle Meyer e92a06aeb1 org-crypt: Fix comment typo from Emacs's fbce475 2016-01-24 16:37:22 -05:00
Alan Mackenzie 347191042a Backport commit fbce475 from Emacs
Expunge "allow" + infinitive without direct object from source and doc.
fbce4757a874cc43806eb41b8637538b101c3c69
Alan Mackenzie
Sun Jan 24 20:30:39 2016 +0000
2016-01-24 16:35:22 -05:00
Nicolas Goaziou a02a83793b Make `org-make-tags-matcher' lexical binding friendly
* lisp/org.el (org-make-tags-matcher): Return a function instead of
  a sexp.  Refactor code.
(org--matcher-tags-todo-only): New variable.  Replace `todo-only'
dynamic binding.
(org-scan-tags): Apply changes to `org-make-tags-matcher'.
(org-match-sparse-tree):
(org-map-entries): Use new variable.

* lisp/org-crypt.el (org-encrypt-entries):
(org-decrypt-entries): Use new variable.

* lisp/org-clock.el (org-clock-get-table-data): Apply changes to
  `org-make-tags-matcher'.

* lisp/org-agenda.el (org-tags-view): Use new variable.
2016-01-10 21:16:29 +01:00
Kyle Meyer 6345de2d05 Merge branch 'maint' 2016-01-09 17:43:27 -05:00
Kyle Meyer 6bc48c5f41 Update copyright years 2016-01-09 17:12:03 -05:00
Aaron Ecay 07e16c2fc5 Use setq-local and defvar-local.
* lisp/org-macs.el (org-set-local): Remove.  All callers changed.
* lisp/org-clock.el:
* lisp/org-colview.el:
* lisp/org-macro.el:
* lisp/org-mouse.el:
* lisp/org-table.el:
* lisp/org.el: Use defvar-local.
* lisp/org-agenda.el:
* lisp/org-capture.el:
* lisp/org-crypt.el:
* lisp/org-ctags.el:
* lisp/org-plot.el:
* lisp/org.el:
* lisp/ox-odt.el:
* lisp/ox.el: Use setq-local instead of set + make-local-variable.

Changes in contrib:

* contrib/lisp/org-colview-xemacs.el (org-colview-xemacs-set-local): New
macro. Adjust old callers of `org-set-local'.
2015-11-05 16:47:38 +00:00
Kyle Meyer ef3ea9d02d Use prefix for outline functions
* lisp/ob-lilypond.el (org-babel-lilypond-mark-error-line):
* lisp/org-agenda.el (org-agenda-goto):
(org-agenda-show-and-scroll-up):
(org-agenda-show-1):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-to-archive-sibling):
(org-toggle-archive-tag):
* lisp/org-capture.el:
(org-capture-place-template):
* lisp/org-colview.el:
(org-columns-eval):
* lisp/org-crypt.el (org-encrypt-entry):
* lisp/org-feed.el (org-feed-update):
* lisp/org-mouse.el (org-mouse-popup-global-menu):
* lisp/org.el (org-cycle):
(org-cycle-internal-global):
(org-cycle-internal-local):
(org-global-cycle):
(org-set-startup-visibility):
(org-set-visibility-according-to-property):
(org-overview):
(org-content):
(org-clean-visibility-after-subtree-move):
(org-set-outline-overlay-data):
(org-tree-to-indirect-buffer):
(org-move-subtree-down):
(org-paste-subtree):
(org-sort-entries):
(orgstruct-setup):
(org-show-set-visibility):
(org-mode-map):
(org-check-before-invisible-edit):
(org-kill-note-or-show-branches):
(org-org-menu):
(org-yank-generic):
* lisp/ox-org.el (org-org-publish-to-org): Use prefix for outline
  functions.
* lisp/org-compat.el: Add compatibility functions for outline functions
  that are under the "outline-" prefix as of Emacs 25.
2015-10-04 02:31:16 -04:00
Paul Eggert cc0d491739 Backport commit ab11a1c from Emacs master branch
* lisp/ob-latex.el (convert-pdf):
* lisp/org-crypt.el (org-crypt-check-auto-save):
* lisp/ox-man.el (org-man-compile):
* lisp/ox-odt.el (org-odt--export-wrap):
* lisp/ox-texinfo.el (org-texinfo-compile):
Use %s to avoid translating quotes of file names etc. in diagnostics.

Use %s to format strings instead of splicing them
ab11a1cf27ebe3791df45cccde3c851affd184dd
Paul Eggert
Sun Sep 20 09:42:05 2015 -0700
2015-09-22 00:20:57 -04:00
Kyle Meyer 0839dc4322 Protect remaining apostrophes in docstrings
Protect apostrophes not covered by the last backport.  Convert
expressions like '(...)  to \\='(...)  and symbols written as 'name to
`name'.  (In addition to ensuring the correct display, the latter also
improves consistency with many Org docstrings.)

If these aren't protected, Emacs 25 may display them as curved quotes in
the help buffer, depending on the value of text-quoting-style.
2015-09-21 18:38:39 -04:00
Paul Eggert ecf3a4af2c Backport remaining changes from commit 7e09ef0
Add changes from Emacs repo that should have been backported with
bb77dd2.

Update copyright year to 2015
7e09ef09a479731d01b1ca46e94ddadd73ac98e3
Paul Eggert
Thu Jan 1 14:26:41 2015 -0800
2015-08-10 02:17:19 -04: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
Achim Gratz 5213e0f704 org-crypt: fix 3e87d5893d
* lisp/org-crypt.el: Declare `epg-context´.
  (org-encrypt-string): Correct indentation.
2013-11-23 16:15:45 +01:00
Thierry Volpiatto 3e87d5893d org-crypt.el: Fix warning
* org-crypt.el (org-encrypt-string, org-encrypt-entry)
(org-decrypt-entry): Fix warning.

TINYCHANGE

epg-context is let-bounded in org-crypt and then epg local set it in
this context.  It should just be set as local var instead of being let
bounded.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15081
2013-11-20 19:26:12 +01:00
Bastien Guerry 4231cb4b12 Use `org-add-hook' in some places and merge Emacs revno r112320
* ox.el (org-export-stack-mode)
* org-crypt.el (org-crypt-check-auto-save)
(org-crypt-use-before-save-magic): Use `org-add-hook' when the
hooks are local hooks.

* org-indent.el (org-indent-mode)
* org-agenda.el (org-agenda-mode): Use `org-add-hook' and
merge upstream change from Emacs revno r112320.
2013-04-18 10:29:00 +02:00
Bastien Guerry 31c1aeabae Various small fixes 2013-01-08 15:26:04 +01:00
Bastien Guerry 72bc144c15 Update Copyright lines to match Emacs format. 2013-01-08 15:04:32 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry 6671e80453 org-crypt.el (org-at-encrypted-entry-p): Fix search boundary
* org-crypt.el (org-at-encrypted-entry-p): Fix search
boundary.

Thanks to Samuel Wales for reporting this bug.
2012-12-25 03:29:17 +01:00
Bastien Guerry 8fbf78d185 org-crypt.el (org-at-encrypted-entry-p): Fix bug when the check happens before the first headline
* org-crypt.el (org-at-encrypted-entry-p): Fix bug when
the check happens before the first headline.
2012-09-26 08:28:32 +02:00