Commit Graph

191 Commits

Author SHA1 Message Date
Stefan Kangas 2e1c984153 Prefer HTTPS to HTTP in most links 2021-03-21 15:21:22 -04: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
Stefan Kangas ce22aa15fd Backport commit 5ab5c3898 from Emacs
* lisp/org-indent.el
(org-indent-mode-turns-off-org-adapt-indentation)
(org-indent-mode-turns-on-hiding-stars):
* lisp/org-protocol.el (org-protocol-project-alist): Shorten doc
strings to not exceed 80-column limits.  (Bug#44858)

Shorten over-wide docstrings in defcustoms
5ab5c3898778406103e7183bf41c7d018077092b
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
2021-02-14 17:38:07 -05:00
Kyle Meyer 99eafe3787 Update copyright year to 2021 2021-01-01 14:59:01 -05:00
fpi 928e67df7e org-protocol: Allow slashes after sub-protocol
* lisp/org-protocol.el (org-protocol-check-filename-for-protocol):
Handle URIs with additional slashes before the start of the query
string, e.g. "org-protocol:/capture/?template=..." instead of
"org-protocol:/capture?template=...", as neede for some browsers.

TINYCHANGE
2020-05-22 17:54:41 +02:00
Stacey Marshall 1228b73313 org-capture: Allow for no file extension on open-source protocol
* lisp/org-capture.el (org-protocol-open-source): Remove requirement
to have :online-suffix and :working-suffix.

The problem here was that two assignments expected suffix's to be
provided in org-protocol-project-alist.  When they were missing an
error occurred.  With the changes source URLs that include the file
name as-is, such as those presented by openGrok, may be opened.

TINYCHANGE
2020-05-12 16:40:26 +02:00
Mattias Engdegård 7265f2864e Backport commit af085ef40 from Emacs
* lisp/org-agenda.el (org-agenda-hide-tags-regexp)
(org-agenda-category-icon-alist):
* lisp/org-protocol.el (org-protocol-data-separator):
* lisp/org-table.el (org-table-number-regexp):
* lisp/ox-latex.el (org-latex-known-warnings):
Use 'regexp' instead of 'string' as type for values that are regexps
in defcustom declarations.

Use regexp type for regexps in defcustom declarations
af085ef40b961ca3466e8b2dfb7f722573e5a4cc
Mattias Engdegård
Thu Dec 26 16:50:58 2019 +0100
2020-03-15 22:51:31 -04:00
Kyle Meyer ff5fc050d3 Update copyright year to 2020 2020-01-01 13:38:46 -05:00
Kyle Meyer c2f3f1912e Merge branch 'maint' 2019-03-17 22:56:24 -04:00
Paul Eggert 602f2280e3 Backport commit 3c94c7bc0 and db9c924d3 from Emacs
* lisp/ob-core.el (org-babel-string-read):
* lisp/org-agenda.el:
(org-agenda-add-entry-to-org-agenda-diary-file):
* lisp/org-element.el (org-element-keyword-parser):
* lisp/org-list.el (org-list-indent-item-generic):
* lisp/org-mhe.el (org-mhe-get-message-folder-from-index):
* lisp/org-mobile.el (org-mobile-apply):
* lisp/org-mouse.el (org-mouse-context-menu):
* lisp/org-plot.el (org-plot/gnuplot):
* lisp/org-protocol.el (org-protocol-flatten-greedy):
* lisp/org-table.el (org-table-copy-down)
(org-table-formula-make-cmp-string)
(org-table-get-stored-formulas, org-table-recalculate)
(org-table-edit-formulas):
* lisp/org.el (org-translate-link-from-planner)
(org-fill-line-break-nobreak-p):
* lisp/ox-ascii.el (org-ascii-item):
* lisp/ox-latex.el (org-latex-clean-invalid-line-breaks):
* lisp/ox.el (org-export-expand-include-keyword):
Fix regular-expression infelicities and typos.

Fix regular-expression glitches and typos
3c94c7bc02fcacb4a101188dddb0c44d53444178
Paul Eggert
Mon Mar 4 18:00:58 2019 -0800

More regexp corrections and tweaks
db9c924d3d53f46846ad8fd74a5d08f4586a520e
Paul Eggert
Fri Mar 8 09:09:40 2019 -0800

Note(km): These two commits are ported together because, with respect
to Org files, db9c924d3 is a fix of an error from 3c94c7bc0.
2019-03-17 22:52:27 -04:00
Nicolas Goaziou 2b00d62816 Change bracket link escape syntax
* contrib/lisp/org-link-edit.el (org-link-edit--link-data):
* lisp/ob-tangle.el (org-babel-tangle-comment-links): Update match-group.
(org-babel-detangle): Remove unnecessary `org-link-escape' call.
(org-babel-tangle-jump-to-org): Update match group.
(org-link-url-hexify):
(org-link-escape-chars): Remove variables.
* lisp/ol.el (org-link--decode-compound): Renamed from
  `org-link--unescape-compound'.
(org-link--decode-single-byte-sequence): Renamed from
`org-link--unescape-single-byte-sequence'.
(org-link-make-regexps): Update `org-link-bracket-re' syntax.
(org-link-encode): New function, renamed from `org-link-escape'.
(org-link-decode): New function, renamed from `org-link-unescape'.
(org-link-escape):
(org-link-unescape): Use new escape syntax.
(org-link-make-string): Apply new escaping rules.
(org-link-display-format):
(org-insert-link): Update match group.
* lisp/org-agenda.el (org-diary):
(org-agenda-format-item):
(org-agenda-to-appt): Update match group.
* lisp/org-clock.el (org-clocktable-write-default): Update match group.
* lisp/org-element.el (org-element-link-parser): Update match group.
* lisp/org-mobile.el (org-mobile-escape-olp):
(org-mobile-locate-entry): Apply function renaming.
* lisp/org-protocol.el (org-protocol-split-data):
(org-protocol-parse-parameters): Apply function renaming.
* lisp/org.el (org-refile): Update match group.
* testing/README (Interactive testing from within Emacs): Fix
  examples.
* testing/lisp/test-ol.el (test-ol/encode): Merge old escape tests.
(test-ol/decode): Merge old unescape tests.
(test-ol/escape):
(test-ol/unescape):
(test-ol/make-string): New tests.
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/link):
* testing/lisp/test-org.el (test-org/custom-id):
(test-org/fuzzy-links):
* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Update
  tests.
2019-03-10 18:00:36 +01:00
Nicolas Goaziou a486d9cbd7 Move link-related core functions out of "org.el"
* contrib/lisp/org-wl.el (org-wl-store-link-message):
* lisp/Makefile (clean-install):
* lisp/ob-core.el (org-link-bracket-re):
(org-babel-open-src-block-result):
(org-babel-read-element):
(org-babel-read-link):
(org-babel-result-end):
* lisp/ob-tangle.el (org-link-bracket-re):
(org-babel-tangle-single-block):
(org-link-analytic-bracket-re):
(org-babel-detangle):
(org-babel-tangle-jump-to-org):
* lisp/ol.el:
* lisp/org-agenda.el (org-agenda-get-some-entry-text):
(org-diary):
(org-agenda-format-item):
(org-agenda-open-link):
(org-agenda-switch-to):
(org-agenda-to-appt):
* lisp/org-bbdb.el (org-bbdb-store-link):
* lisp/org-bibtex.el (org-bibtex-store-link):
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-clock.el (org-clocktable-write-default):
(org-clock-get-table-data):
* lisp/org-compat.el (org-doi-server-url):
(org-email-link-description-format):
(org-make-link-description-function):
(org-from-is-user-regexp):
(org-descriptive-links):
(org-url-hexify-p):
(org-context-in-file-links):
(org-keep-stored-link-after-insertion):
(org-display-internal-link-with-indirect-buffer):
(org-confirm-shell-link-function):
(org-confirm-shell-link-not-regexp):
(org-confirm-elisp-link-function):
(org-confirm-elisp-link-not-regexp):
(org-file-complete-link):
(org-email-link-description):
(org-make-link-string):
(org-store-link-props):
(org-add-link-props):
(org-make-link-regexps):
(org-angle-link-re):
(org-plain-link-re):
(org-bracket-link-regexp):
(org-bracket-link-analytic-regexp):
(org-any-link-re):
* lisp/org-docview.el (org-docview-store-link):
(org-docview-complete-link):
* lisp/org-element.el (org-element-link-parser):
* lisp/org-eshell.el (org-eshell-store-link):
* lisp/org-eww.el (org-eww-store-link):
(org-eww-copy-for-org-mode):
* lisp/org-footnote.el (org-footnote-next-reference-or-definition):
* lisp/org-gnus.el (org-gnus-article-link):
(org-gnus-store-link):
* lisp/org-id.el (org-id-store-link):
* lisp/org-info.el (org-info-store-link):
* lisp/org-irc.el (org-irc-erc-store-link):
* lisp/org-mhe.el (org-mhe-store-link):
* lisp/org-pcomplete.el (pcomplete/org-mode/searchhead):
* lisp/org-protocol.el (org-protocol-do-capture):
* lisp/org-rmail.el (org-rmail-store-link):
* lisp/org-w3m.el (org-w3m-store-link):
(org-w3m-copy-for-org-mode):
2019-03-10 18:00:27 +01:00
Nicolas Goaziou e0bfdec22e org-protocol: Fix URL handling
* lisp/org-protocol.el (org-protocol-parse-parameters): Un-escape
  extracted link as it is url-encoded externally.

Reported-by: Pierre Téchoueyres <pierre.techoueyres@free.fr>
<http://lists.gnu.org/r/emacs-orgmode/2019-03/msg00081.html>
2019-03-09 11:12:19 +01:00
Nicolas Goaziou cc7c4a6732 Rationalize `org-link-(un)escape'
* contrib/lisp/org-contacts.el (org-contacts-vcard-format):
* contrib/lisp/org-link-edit.el (org-link-edit--link-data):
* contrib/lisp/org-notmuch.el (org-notmuch-search-store-link):
(org-notmuch-search-follow-link):
(org-notmuch-tree-follow-link):
* lisp/org-docview.el (org-docview-export):
* lisp/org-element.el (org-element-link-parser):
* lisp/org-lint.el (org-lint-link-to-local-file):
* lisp/org-protocol.el (org-protocol-split-data):
(org-protocol-parse-parameters):
* lisp/org.el (org-open-at-point):
(org-display-inline-images):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex--inline-image):
(org-latex-link):
* lisp/ox-publish.el (org-publish-resolve-external-link):
* lisp/ox.el (org-export-custom-protocol-maybe):
(org-export-resolve-fuzzy-link): Do not call `org-link-unescape' when
the link is obtained through the parser or as a user input.
* doc/org-manual.org (Link Format): Document escape syntax.

See <http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00320.html>
2019-02-27 20:22:51 +01:00
Nicolas Goaziou bdbb7a255b org-protocol: Fix message string
* lisp/org-protocol.el (org-protocol-store-link): Remove spurious
  single quotes.
2019-02-27 11:06:19 +01:00
Paul Eggert 5a958f3fae Backport commit c5e02f2bc from Emacs
* lisp/org-protocol.el (org-protocol-flatten):
Rewrite as top-level alias, as per Stefan’s suggestion,
to avoid compiler warnings.

Make org-protocol-flatten always an alias
c5e02f2bce28f3b1f2006ce1f208f4a92ca05ed9
Paul Eggert
Mon Dec 17 13:32:52 2018 -0800
2019-01-13 12:43:04 -05:00
Paul Eggert 7937b26867 Backport commit ef144113f from Emacs
* lisp/org-protocol.el (org-protocol-flatten): Make it an alias for
flatten-tree if available.

Some more flatten-tree aliases
ef144113f3473f39d3df3e96e780c832e0d5420e
Paul Eggert
Mon Dec 17 10:26:15 2018 -0800
2019-01-13 12:43:04 -05:00
Bastien f584d37a67 Update copyright year 2019-01-01 11:50:56 +01:00
Renato Ferreira 255c9c1655 org-protocol: Fix `org-protocol-capture' return value
* lisp/org-protocol.el: Make sure protocols with :kill-client do
not return a string.

TINYCHANGE
2018-12-19 16:23:59 +01:00
Nicolas Goaziou fbd1deca57 org-protocol: Fix capture protocol without a URL
* lisp/org-protocol.el (org-protocol-capture): Do not corrupt
  `org-stored-links' when there is no URL to capture.
(org-protocol-do-capture): Remove function.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://lists.gnu.org/r/emacs-orgmode/2018-12/msg00131.html>
2018-12-18 09:30:32 +01:00
Aaron Ecay 7106eab974 Many small code improvements
* lisp/org-capture.el (org-capture-member): Make obsolete; the old
definition was identical to ‘org-capture-get’ anyway.
(org-capture-mode-map): Move the calls to ‘define-key’ up to where the
variable is defined.
(org-capture-mode-hook): Small docstring tweak.
(org-capture-mode): Fix typo in mode lighter.
(org-capture-set-target-location, org-capture-place-item):
(org-capture-place-plain-text, org-capture-narrow):
(org-capture-empty-lines-after):
(org-capture-import-remember-templates): ‘if’ without else -> ‘when’
* lisp/org-colview.el (org-columns-edit-value): Change an error to a
user-error.
(org-columns-uncompile-format): Improve docstring.
* lisp/org-compat.el (org-remove-from-invisibility-spec): Make
obsolete, the underlying emacs function exists since 1997, commit 31aa282e.
(org-in-invisibility-spec-p, org-count-lines): ‘if’ without else -> ‘when’.
* lisp/org-element.el (org-element-swap-A-B):
* lisp/org-entities.el (org-entities-create-table):
* lisp/org-list.el (org-insert-item):
* lisp/org-macs.el (org-with-point-at, org-base-buffer):
(org-preserve-local-variables, org-overlay-display):
(org-overlay-before-string): ‘if’ without else -> ‘when’.
* lisp/org-eshell.el (org-eshell-open): Fix docstring typo.
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/language):
(pcomplete/org-mode/file-option/startup):
(pcomplete/org-mode/file-option/options):
(pcomplete/org-mode/file-option/infojs_opt):
(pcomplete/org-mode/link, pcomplete/org-mode/tex):
(pcomplete/org-mode/todo, pcomplete/org-mode/searchhead):
(pcomplete/org-mode/tag, pcomplete/org-mode/prop): Avoid the formerly
misspelled ‘pcomplete-uniqify-list’ function.  It has a defalias in
emacs >= 27; we add our own for older emacsen.
(pcomplete/org-mode/file-option/bind): ‘if’ without else -> ‘when’.
* lisp/org-protocol.el (org-protocol-capture):
(org-protocol-convert-query-to-plist): ‘if’ without else -> ‘when’.
(org-protocol-do-capture): Pacify byte compiler, simplify conditional
logic.
* lisp/org-table.el (org-table-create-with-table.el): Simplify conditional
logic.
(org-table-create, org-table-convert-region, org-table-next-field):
(org-table-beginning-of-field, org-table-end-of-field):
* lisp/org-w3m.el (org-w3m-copy-for-org-mode): ‘if’ without else ->
‘when’.
* lisp/org.el (org-babel-do-load-languages, org-previous-link):
(org-refile): Use ‘(foo ...)’ instead of ‘(funcall 'foo ...)’.
(org-add-log-note): Convert a long cond into a cl-case.
(org-priority): Improve docstring, show a deprecation warning if the
‘show’ argument is passed (which was previously silently ignored).
Also, use ?\s instead of ?\ as a character literal for space.
(org-fast-tag-insert): Fix docstring typo.
(org-fill-element): ‘if’ without else -> ‘when’.
(org-on-target-p): Remove ancient compatibility alias.
2018-05-10 04:22:30 +01:00
Glenn Morris 4ddfc6bd69 Backport commit 66a4e651f from Emacs
; Fix doc typos related to indefinite articles
66a4e651f3cf38c320d1a9d5ae6f88dcc641792b
Glenn Morris
Fri Feb 16 15:16:15 2018 -0500
2018-02-18 16:32:41 -05:00
Tim Landscheidt 63c0266688 Update URLs in source code or tests
TINYCHANGE
2018-01-19 18:30:40 +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
Mario Martelli 37bba84a5e org-protocol: Sources with date URL are supported
lisp/org-protocol.el (org-protocol-project-alist): Date-URL is added
as example.
(org-protocol-open-source): First match is processed in rewrite.

testing/lisp/test-org-protocol.el (test-org-protocol/org-protocol-open-source):
Configuration displaying a date-style URL is added.

TINYCHANGE
2017-06-28 17:44:27 +02:00
Mario Martelli cbcd714b23 org-protocol: Fix for silently failing open-source subprotocol
* (org-protocol-open-source): Tests URL against base-url and not the
  filename.

TINYCHANGE
2017-06-28 11:19:46 +02:00
Mario Martelli 5748615c48 org-protocol: Fix for failing open-source subprotocol
* (org-protocol-open-source): Make sure url is sanitised before
   processing.

TINYCHANGE
2017-06-28 11:19:44 +02:00
Matt Lundin 8f4989d00d org-protocol: Don't push url to kill-ring
* lisp/org-protocol.el: (org-protocol-do-capture) Don't push link to
  kill-ring when invoking `org-protocol-capture'.  Otherwise,
  `org-protocol-do-capture' interferes with capture templates that
  insert the contents of the clipboard or the kill ring.
2017-04-18 08:26:42 +02:00
Nicolas Goaziou 137c6ad658 org-protocol: Do not catch all errors when providing backward compatibility
* lisp/org-protocol.el (org-protocol-check-filename-for-protocol): Do
  not catch every error so as to ease old style support.  Re-format
  code to fit within 80 columns.

Reported-by: Adam Porter <adam@alphapapa.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/113102>
2017-04-17 11:03:47 +02:00
Nicolas Goaziou e1fa353e0a org-protocol: Fix library name
* lisp/org-protocol.el (org-protocol-create-for-org): Use `ox-publish'
  instead of outdated `org-publish'.  Improve warning message.

Reported-by: Jonas Bernoulli <jonasbernoulli@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112386>
2017-02-28 13:37:48 +01:00
Kyle Meyer 713f785017 Update copyright years 2017-01-05 20:19:37 -05:00
Nicolas Goaziou 0cf58cc208 Improve docstrings
* lisp/ob-core.el (org-confirm-babel-evaluate):
(org-babel-no-eval-on-ctrl-c-ctrl-c):
(org-babel-hash-at-point):
* lisp/org-agenda.el (org-agenda-custom-commands):
(org-stuck-projects):
(org-agenda):
(org-timeline):
(org-todo-list):
(org-agenda-filter-by-tag):
(org-agenda-log-mode):
(org-agenda-refile):
(org-agenda-show-and-scroll-up):
(org-agenda-tree-to-indirect-buffer):
(org-agenda-show-the-flagging-note):
(org-agenda-to-appt):
* lisp/org-capture.el (org-capture-mode):
(org-capture-use-agenda-date):
(org-capture):
* lisp/org-clock.el (org-clock-in):
(org-clock-display):
* lisp/org-colview.el (org-columns--display-here):
(org-columns):
* lisp/org-footnote.el (org-footnote-section):
* lisp/org-gnus.el (org-gnus-prefer-web-links):
* lisp/org-lint.el (org-lint):
* lisp/org-list.el (org-plain-list-ordered-item-terminator):
(org-list-allow-alphabetical):
(org-list-automatic-rules):
(org-list-use-circular-motion):
* lisp/org-protocol.el (org-protocol-store-link):
(org-protocol-create-for-org):
* lisp/org-src.el (org-src-preserve-indentation):
(org-edit-src-content-indentation):
(org-src-mode-hook):
(org-src-mode):
(org-edit-table.el):
(org-edit-export-block):
(org-edit-src-code):
(org-edit-fixed-width-region):
* lisp/org-table.el (org-table-automatic-realign):
(org-table-copy-increment):
(org-table-formula-evaluate-inline):
(org-table-allow-automatic-line-recalculation):
(org-table-edit-field):
(orgtbl-ascii-plot):
* lisp/org-timer.el (org-timer):
* lisp/org.el (org-deadline-string):
(org-comment-string):
(org-ellipsis):
(org-show-context-detail):
(org-indirect-buffer-display):
(org-cycle-global-at-bob):
(org-insert-heading-respect-content):
(org-enable-table-editor):
(org-context-in-file-links):
(org-display-internal-link-with-indirect-buffer):
(org-file-apps):
(org-refile-targets):
(org-todo-keywords):
(org-use-fast-todo-selection):
(org-treat-insert-todo-heading-as-state-change):
(org-time-clocksum-use-fractional):
(org-time-clocksum-use-effort-durations):
(org-agenda-files):
(org-cycle-hide-archived-subtrees):
(org-cycle):
(org-global-cycle):
(org-tree-to-indirect-buffer):
(org-insert-heading):
(org-store-link):
(org-insert-link):
(org-mark-ring-push):
(org-refile):
(org-todo):
(org-show-todo-tree):
(org-reveal):
(org-check-deadlines):
(org-switchb):
(org-cdlatex-mode):
(org-toggle-latex-fragment):
(org-ctrl-c-ctrl-c):
(org-toggle-heading):
(org-indent-line):
(org-yank):
(org-speedbar-set-agenda-restriction):
* lisp/ox-html.el (org-html-htmlize-output-type):
* lisp/ox-icalendar.el (org-icalendar-combined-agenda-file):
* lisp/ox-publish.el (org-publish-project-alist):
* lisp/ox.el (org-export-in-background):
(org-export-stack-mode):
(org-export--stack-source-at-point):
(org-export-dispatch): Improve quotes and formatting in docstrings.
2016-10-15 17:43:54 +02:00
Aaron Ecay 6b52bc6a21 Clean up string handling.
* lisp/org-compat.el (string-prefix-p, string-suffix-p):
Add compatibility definitions for 24.3.

* lisp/ob-R.el (org-babel-edit-prep:R):
* lisp/ob-core.el (org-babel-demarcate-block):
* lisp/ob-js.el (org-babel-js-read):
* lisp/ob-latex.el (org-babel-execute:latex):
* lisp/ob-ref.el (org-babel-ref-parse):
* lisp/ob-shell.el (org-babel-variable-assignments:shell):
* lisp/org-protocol.el (org-protocol-create):
* lisp/org-table.el (org-table-field-info):
* lisp/org.el (org-get-buffer-for-internal-link):
* lisp/ox-publish.el (org-publish-compare-directory-files):
* lisp/ox-texinfo.el (org-texinfo-template):
Use `string-{suffix,prefix}-p' instead of `string-match(-p)'.

* lisp/ob-python.el (org-babel-python-read-string):
Ditto, also use `substring' rather than `match-string'.

* lisp/org-table.el (org-table-copy-down):
(org-table-insert-hline, org-table-current-field-formula):
(org-table-get-formula): Use `string-match-p' instead of
`string-match'.
2016-08-24 16:05:54 +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 b2091f6d75 Move obsolete declarations into "org-compat.el"
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-goto-today):
(org-agenda-reset-view): Remove reference to obsolete
`org-agenda-ndays'.
2016-06-30 15:20:51 +02:00
Nicolas Goaziou 267af5e2fb org-protocol: Tiny clean up 2016-06-21 23:37:19 +02:00
Nicolas Goaziou 097edbfde4 org-protocol: Silence byte-compiler 2016-06-21 23:36:31 +02:00
Nicolas Goaziou 3dab837aef org-protocol: Use lexical binding
* lisp/org-protocol.el (org-protocol-store-link):
(org-protocol-open-source):
(org-protocol-check-filename-for-protocol):
(org-protocol-create): Silence byte-compiler.
2016-06-21 23:23:18 +02:00
Kyle Meyer 4925d5be7b Merge branch 'maint' 2016-05-15 19:00:30 -04:00
Paul Eggert 1f046ea4b1 Backport commit 65c8c7c from Emacs
* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-exp.el (org-element-context):
* lisp/ob-gnuplot.el (org-time-string-to-time)
(orgtbl-to-generic):
* lisp/ob-haskell.el (org-export-to-file):
* lisp/ob-latex.el (org-create-formula-image)
(org-latex-compile):
* lisp/ob-python.el (run-python):
* lisp/ob-tangle.el (org-link-escape, org-back-to-heading):
* lisp/org-colview.el (org-agenda-redo):
* lisp/org-feed.el (url-retrieve-synchronously):
* lisp/org-info.el (Info-find-node):
* lisp/org-list.el (org-previous-line-empty-p):
* lisp/org-macs.el (org-string-match-p):
* lisp/org.el (org-beamer-mode):
Fix prototype to match current definition.
* lisp/ob-comint.el (tramp-flush-directory-property):
* lisp/ob-tangle.el (org-babel-update-block-body):
* lisp/org-bibtex.el (org-babel-trim):
* lisp/org-pcomplete.el (org-export-backend-options):
* lisp/org-protocol.el (org-publish-get-project-from-filename):
Fix file name in declare-function.
* lisp/ob-comint.el (with-parsed-tramp-file-name)
* lisp/ob-core.el (with-parsed-tramp-file-name):
* lisp/org.el (org-beamer-mode):
Append ‘t’ to declare-function, since the declaration isn’t a defun.
* lisp/ob-core.el (org-save-outline-visibility):
Remove; not needed.
* lisp/ob-scheme.el (run-geiser, geiser-mode)
(geiser-eval-region, geiser-repl-exit):
* lisp/ox-org.el (htmlize-buffer):
Prepend "ext:" to file name, since it is not part of Emacs.
* lisp/org-gnus.el (nnimap-group-overview-filename):
Remove decl, since function was removed.
* lisp/org-macro.el (org-with-wide-buffer):
Omit unnecessary (and mismatching) decl.
* lisp/org-clock.el (calendar-iso-to-absolute):
Declare calendar-iso-to-absolute instead, since it is the
non-obsolete version of this function.
* lisp/org-compat.el (w32-focus-frame):
Remove decl, since function is now obsolete.

Pacify ‘make check-declare’
65c8c7cb96c14f9c6accd03cc8851b5a3459049e
Paul Eggert
Sat May 14 19:57:44 2016 -0700
2016-05-15 18:59:16 -04:00
Kyle Meyer dade0d5b28 Merge branch 'maint' 2016-03-11 22:51:07 -05:00
Kaushal Modi ebacca39b4 Display quotes in key-bindings as straight quotes
* lisp/org-agenda.el (org-agenda-show-the-flagging-note):
* lisp/org-footnote.el (org-footnote-goto-definition):
* lisp/org-table.el (org-table-edit-formulas): Fix straight quotes
  rendered as curvy quotes in echoes messages (in emacs 25.1).
* lisp/org-table.el (org-table-align): Fix straight quotes rendered as
  curvy quotes in help echo (in emacs 25.1).

* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting.

The below thread discusses why these changes were needed especially when
using emacs 25.1 or newer emacsen (that added support for rendering
back-quotes and straight quotes as left/right curvy quotes by default):
http://thread.gmane.org/gmane.emacs.orgmode/105594

Fix the quote style displayed when key-bindings are shown in
the echo via (message .. (substitute-command-keys ..)).

So below will render that single quote as curly.

(message "C-c '")

The fix (Reference:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-10/msg00234.html)
is to print that quote verbatim using the "%s" modifier:

(message "%s" "C-c '")

Also an help-echo text property value was fixed in `org-table-align'.
`substitute-command-keys' should not be used in that.  Instead \\[COMMAND]
should be used directly in the string.
2016-03-11 22:40:30 -05: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
Sacha Chua 25eb14bc2c org-protocol: Allow key=val&key2=val2-style URLs
* lisp/org-protocol.el: Update documentation.
  (org-protocol-store-link, org-protocol-capture,
  org-protocol-open-source): Accept new-style links.
  (org-protocol-check-filename-for-protocol): Update documentation.
  (org-protocol-parse-parameters, org-protocol-assign-parameters):
  New functions.

  This allows the use of org-protocol on KDE 5 and makes org-protocol
  links more URI-like.  New-style links are of the form:
  org-protocol://store-link?title=TITLE&url=URL

* testing/lisp/test-org-protocol.el: New file.
2015-12-22 13:41:45 +01:00
Kyle Meyer d77a52a502 Backport quote-related commits from Emacs
These changes are the combination of the commits below (in order
applied).  Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits.  Changes to message and help quote
display for Emacs 25 seem to be here to stay.  The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.

  Quoting fixes in lisp/org
  6cd2629bd1b3ce77d29ac28e29237c94a4197116
  Paul Eggert
  Mon Aug 31 00:29:40 2015 -0700

  More-conservative ‘format’ quote restyling
  fbb5531fa11d13854b274d28ccd329c9b6652cfc
  Paul Eggert
  Sun Aug 23 22:39:06 2015 -0700

  Prefer directed to neutral quotes
  875a5d0ead827d3da32ecbd30e739a29f07bbc87
  Paul Eggert
  Mon Aug 24 23:57:25 2015 -0700

  Escape ` and ' in doc
  19532d147b431a4fe34f088d6de07891c48e2c5c
  Paul Eggert
  Tue Sep 1 18:23:21 2015 -0700

  Fix some more docstring etc. quoting problems
  26bd978d87dfbf9baa115cd961a67d42b416c4bf
  Paul Eggert
  Thu Sep 3 15:32:54 2015 -0700

  Go back to grave quoting in source-code docstrings etc.
  6afef3f6ca2f3009c722b84e249903b7f807b044
  Paul Eggert
  Mon Sep 7 16:09:27 2015 -0700
2015-09-21 18:38:18 -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
Paul Eggert 6b04312e85 Backport commit 96794d2 from Emacs master branch
Don't quote nil and t in doc strings
96794d2f97cd064e4c2bf4f71459b42558cc8c79
Paul Eggert
Thu May 21 10:06:44 2015 -0700
2015-07-26 23:29:31 -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