Commit Graph

5010 Commits

Author SHA1 Message Date
Paul Eggert e3090573be Backport commit 946a56a10 from Emacs
* lisp/org.el (org-doi-server-url): Prefer https: to http: un URLs.

Update some URLs
946a56a10fed769646a8b7c4ebc53f53c84be896
Paul Eggert
Mon Sep 23 00:12:52 2019 -0700

Notes(km):

  - It's not mentioned in 946a56a10's message, but that commit also
    drops the dx subdomain, an "earlier syntax which continues to be
    supported" according to https://www.doi.org/factsheets/DOI_PURL.html.

  - 946a56a10 replaced a link in the manual with https://api.uva.nl/
    (which the previous link redirects to).  Here we instead use the
    replacement link from master's f4083eefd (manual: Fix URL,
    2019-06-01).
2019-09-29 15:47:58 -04:00
Juanma Barranquero 97feee0469 Backport commit 114323226 from Emacs
* lisp/ob-C.el (org-babel-prep-session:C)
(org-babel-load-session:C):
* lisp/ob-J.el (org-babel-execute:J):
* lisp/ob-asymptote.el (org-babel-prep-session:asymptote):
* lisp/ob-awk.el (org-babel-execute:awk):
* lisp/ob-core.el (org-babel-process-file-name):
* lisp/ob-ebnf.el (org-babel-execute:ebnf):
* lisp/ob-forth.el (org-babel-execute:forth):
* lisp/ob-fortran.el (org-babel-execute:fortran)
(org-babel-prep-session:fortran, org-babel-load-session:fortran):
* lisp/ob-groovy.el (org-babel-execute:groovy):
* lisp/ob-io.el (org-babel-execute:io):
* lisp/ob-js.el (org-babel-execute:js):
* lisp/ob-lilypond.el (org-babel-default-header-args:lilypond)
(org-babel-lilypond-compile-post-tangle)
(org-babel-lilypond-display-pdf-post-tangle)
(org-babel-lilypond-tangle)
(org-babel-lilypond-execute-tangled-ly)
(org-babel-lilypond-compile-lilyfile)
(org-babel-lilypond-check-for-compile-error)
(org-babel-lilypond-process-compile-error)
(org-babel-lilypond-mark-error-line)
(org-babel-lilypond-parse-error-line)
(org-babel-lilypond-attempt-to-open-pdf)
(org-babel-lilypond-attempt-to-play-midi)
(org-babel-lilypond-switch-extension)
(org-babel-lilypond-set-header-args):
* lisp/ob-lua.el (org-babel-prep-session:lua):
* lisp/ob-picolisp.el (org-babel-execute:picolisp):
* lisp/ob-processing.el (org-babel-prep-session:processing):
* lisp/ob-python.el (org-babel-prep-session:python):
* lisp/ob-scheme.el (org-babel-scheme-capture-current-message)
(org-babel-scheme-execute-with-geiser, org-babel-execute:scheme):
* lisp/ob-shen.el (org-babel-execute:shen):
* lisp/org-agenda.el (org-agenda-entry-types)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-time-grid, org-agenda-sorting-strategy)
(org-agenda-filter-by-category, org-agenda-forward-block):
* lisp/org-faces.el (org-verbatim, org-cycle-level-faces):
* lisp/org-indent.el (org-indent-set-line-properties):
* lisp/org-macs.el (org-get-limited-outline-regexp):
* lisp/org-mobile.el (org-mobile-files):
* lisp/org.el (org-use-fast-todo-selection)
(org-extend-today-until, org-use-property-inheritance)
(org-refresh-effort-properties)
(org-track-ordered-property-with-tag, org-shiftright):
* lisp/ox-html.el (org-html-checkbox-type):
* lisp/ox-man.el (org-man-source-highlight)
(org-man-verse-block):
* lisp/ox-publish.el (org-publish-sitemap-default): Assorted
docfixes.

lisp/*.el: Fix typos and other trivial doc fixes
11432322650830fe9ae365f4113733a79226056d
Juanma Barranquero
Sat Sep 21 00:27:53 2019 +0200
2019-09-29 15:47:58 -04:00
Juanma Barranquero 001306c1c0 Backport commit 79a01866a from Emacs
* lisp/org-agenda.el (org-agenda-change-all-lines)
(org-agenda-today-p):
* lisp/org-id.el (org-id-get):
* lisp/org.el (org-highlight-latex-and-related)
(org--valid-property-p):
* lisp/ox-beamer.el (org-beamer--get-label):
* lisp/ox-latex.el (org-latex--caption-above-p):
* lisp/ox-odt.el (org-odt--copy-image-file)
(org-odt--copy-formula-file):
* lisp/ox.el (org-export-with-timestamps): Fix typos in docstrings.

lisp/*.el, src/*.c: Fix typos in docstrings
79a01866a01754b9f566af76ef96e80cd90d094b
Juanma Barranquero
Thu Sep 19 04:32:25 2019 +0200
2019-09-29 15:47:57 -04:00
Gustav Wikström 6175593530 Fix predicate comment string
Ref. (info "(elisp) Documentation Tips")

* lisp/org.el (org-at-comment-p, org-at-drawer-p)
(org-at-block-p): Fix documentation.
2019-09-29 09:02:17 +02:00
Marco Wahl 1fd07c1eeb Fix org-activate-links
* lisp/org.el (org-activate-links): Set the match group number
  back.  See commit d07d8ff4 for the number switch.
2019-09-18 10:45:21 +02:00
Max Mouratov d07d8ff416 Prevent loss of `re-search-forward' results
* org.el (org-activate-links): `match-beginning' and `match-end` should
be called shortly after `re-search-forward'. Otherwise, they may return
values corresponding to a different invocation of `re-search-forward'.

TINYCHANGE
2019-09-16 18:55:04 +02:00
Michaël Cadilhac 876a4419dd Fontify drawers correctly.
* lisp/org.el (org-fontify-drawers): Fix face used, fix range of text
properties.
(org-set-font-lock-defaults): Fontify drawers after keywords.
2019-09-05 18:53:26 +02:00
Bastien cff97c361a Bump Version keyword 2019-09-04 06:53:49 +02:00
Marco Wahl 48da60f47a org: Relax dependance on imagemagick for image width setting
* lisp/org.el (org-display-inline-images): Don't depend on image type
  imagemagick for rescaling.  When imagemagick is available use that
  type at image creation.

Reported by Terje Larsen.

https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00303.html
2019-08-29 17:28:58 +02:00
Marco Wahl 3c24be0945 org: Equip inline images with key-map `image-map' 2019-08-26 22:53:24 +02:00
Nicolas Goaziou 4f3d1eefbd Remove `org-enable-fixed-width-editor'
* lisp/org.el (org-enable-fixed-width-editor): Remove variable.
2019-08-19 12:22:22 +02:00
Kyle Meyer c7c04b0447 Merge branch 'maint' 2019-08-18 17:44:08 -04:00
Kyle Meyer 9e1b9fe627 Port more time-related changes
* lisp/org-agenda.el (org-agenda-check-clock-gap):
* lisp/org-clock.el (org-clock-get-clocked-time)
(org-clock-resolve-clock, (org-clock-resolve)
(org-resolve-clocks, org-resolve-clocks-if-idle)
(org-clock-in, org-clock-out, org-clock-sum, org-clocktable-steps):
* lisp/org-element.el (org-element-cache-sync-duration)
(org-element--cache-set-timer, org-element--cache-interrupt-p):
(org-element--cache-sync):
* lisp/org-habit.el (org-habit-insert-consistency-graphs):
* lisp/org-indent.el (org-indent-add-properties):
* lisp/org-timer.el (org-timer-start):
(org-timer-pause-or-continue, org-timer-set-timer):
* lisp/org.el (org-today, org-auto-repeat-maybe): Port time-related
changes from the Emacs repo by using compatibility wrappers.

In the Emacs repo, there has been a lot of changes to Org files
involving time-related code.  I've ported some of those changes but
have largely ignored any changes that break compatibility with older
Emacsen that we support.  That, however, isn't a good approach because
it will be hard to do a systematic update once we bump our minimum
Emacs requirement.  Instead use the recently added compatibility
wrappers where needed, which is ugly but more maintainable.

The main time-related changes this leaves unported are changes that
replace (apply #'encode-time args) calls with (encode-time args).
Until the first form is unsupported, adding a compatibility function
doesn't seem worth the churn.

Relevant Emacs commits include
c75f505dea6a560b825384cf3d277690f86840bf,
57c74793c46c6533b63836f00aecaf3ac2accb6d,
988e37fa0f922b852715671d59a0e3f682373411,
476066e89d6f0bb87220da690b8a476bf9655b80,
89c63b3522b62c0fd725f0b348927a2069238452.
2019-08-18 17:37:51 -04:00
Kyle Meyer a23d0225ab org-time-stamp: Simplify encode-time call
* lisp/org.el (org-time-stamp): Use org-time-string-to-time.

This should have been applied with a6cead0d2 (Backport commit
476066e89 from Emacs, 2019-02-22).
2019-08-18 17:36:13 -04:00
Paul Eggert 74bf99502d Backport commit 988e37fa0 from Emacs
* lisp/org-agenda.el (org-agenda-get-timestamps, org-agenda-get-progress)
(org-agenda-show-clocking-issues):
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-clock.el (org-clock-get-sum-start):
* lisp/org.el (org-current-time, org-store-link)
(org-read-date, org-read-date-display)
(org-display-custom-time, org-timestamp-to-time)
Simplify use of encode-time.
* lisp/org-clock.el (org-clock-in, org-clock-update-time-maybe):
* lisp/org-colview.el (org-columns--age-to-minutes):
* lisp/org-macs.el (org-2ft):
* lisp/org.el (org-get-scheduled-time, org-get-deadline-time)
(org-add-planning-info, org-time-string-to-absolute)
(org-closest-date):
Use org-time-string-to-time instead of doing it by hand with
encode-time.
* lisp/org.el (org-read-date): Avoid extra trip through encode-time.

Simplify use of encode-time
988e37fa0f922b852715671d59a0e3f682373411
Paul Eggert
Sun Feb 10 23:54:35 2019 -0800

Note(km): org-current-time has been modified to use org-time-subtract
and org-time-less-p for backward compatibility.  Some changes from
988e37fa0 have been dropped to keep encode-time's call compatible with
older Emacsen.
2019-08-18 17:36:13 -04:00
Nicolas Goaziou 3405b9afac Hide newly created properties drawers
* lisp/org.el (org-flag-drawer): Change signature.
(org-insert-property-drawer): Hide newly created properties drawers.
2019-08-17 17:47:01 +02:00
Renato Ferreira 413736f315 org-todo: Respect state argument when called from elisp
* lisp/org.el (org-todo): Respect argument when called from elisp when
calling from elisp (such as in `org-clock-in').

Fast selection should only be shown if a state argument was not used.
This fixes a regression introduced by f1c030bed (Prefix argument to
`org-todo' forces stage change logging, 2019-08-14).

TINYCHANGE
2019-08-16 18:30:09 -04:00
Carsten Dominik 07e48a7af6 Merge branch 'fix-org-columns-formatdocumentation' 2019-08-16 09:37:54 +02:00
Carsten Dominik 6dda536f9f Clear up unclear setting of columns format for the agenda
* lisp/org.el (org-columns-default-format-for-agenda): New option.

* lisp/org-colview.el (org-overriding-columns-format): Updated documentation.
(org-agenda-columns): `Use org-columns-default-format-for-agenda'

* doc/org-manual.org (Using Column View in the Agenda): Fix the
description how to set the columns format for agenda views.
2019-08-16 09:34:55 +02:00
Carsten Dominik 4d88d41430 Cleanup code 2019-08-14 10:32:03 +02:00
Carsten Dominik f1c030bed5 Prefix argument to `org-todo' forces stage change logging
* lisp/org.el (org-use-fast-todo-selection): Allow values
`auto' and `expert'.
(org-todo): Change the interpretation of the prefix argument.
A single `C-u' now forces taking a logging time stamp and note.
(org-fast-todo-selection): Implement the `expert' option of
`org-use-fast-todo-selection' and avoid showing the selection
window.  Instead, show the options in the prompt.

* doc/org-manual.org: (Basic TODO Functionality): Document that `C-u
C-c C-t' is the simplest way to log a TODO state change.
(TODO keywords as workflow states): Slightly simplify text.
(TODO keywords as types): Document that tags should be used instead.
(Progress Logging, Closing items, Tracking TODO state changes):
Document that `C-u C-c C-t' is the simplest way to log a TODO
state change.
(Remote editing): Document using a prefix to the `org-agenda-todo'
command logs the state change.
(Using CDLaTeX to enter math): Document that CDLaTeX is	available on
MELPA.

* doc/org-guide.org (Progress Logging): Document the use of a
prefix to `org-todo' to force logging.
2019-08-14 09:58:38 +02:00
Carsten Dominik e3856a0c8e Fix tag alignment after todo state change with empty headline
* lisp/org.el (org-todo): Fix tag alignment with empty headline.
2019-08-12 11:35:29 +02:00
Carsten Dominik 495826e897 Make it customizable if block lines should be fontified to end
* lisp/org.el (org-fontify-whole-block-delimiter-line): New option.

* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Use
`org-fontify-whole-block-delimiter-line'. Also, clean-up the function.
2019-08-12 09:03:29 +02:00
Carsten Dominik 20d9fefe4e Hide drawer contenxt after sorting entries
2019-08-10  Carsten Dominik  <carsten.dominik@gmail.com>

* lisp/org.el (org-sort-entries): Hide drawers after sort.
2019-08-10 07:58:28 +02:00
Carsten Dominik de3faf0767 Improve TODO selection if some keys are present in several sequences
* lisp/org.el (org-todo): Give the current state as an
argument to `org-fast-todo-selection'.
(org-fast-todo-selection): Accept current state as an
argument.  Use that state to find out to which TODO sequence
the current state belongs and use that to make the right
choice if selection keys are not unique globally.  For
example, if you have a task sequence, and a project sequence,
you could use the "d" selection key in both sequences to
switch to the appropriate DONE (or e.g. PRDN) state.
2019-08-09 23:00:21 +02:00
Carsten Dominik db6952cfe4 Improve docstring of `org-todo' 2019-08-09 10:04:02 +02:00
Nicolas Goaziou ff6508ad4b Bump Version keyword
* lisp/org.el: Bump Version keyword.

This is necessary for GNU ELPA. Ideally, such a change should be
tagged with the official release.
2019-08-02 09:55:53 +02:00
Carsten Dominik 4910bec3aa Bug fix for previous commit 2019-08-01 08:35:47 +02:00
Carsten Dominik 64739aa065 Implement force logging of a TODO state change
* lisp/org.el (org-todo): Make a tripple `C-u' prefix force
          logging the todo state change with timestamp and a note.
          Ignoting blocking a change now needs four `C-u' prefixes,
          because this is probably hardly ever used.

	* doc/org-manual.org (Tracking TODO state changes): Document
          forcing of state change logging with `C-u C-u C-u C-c C-t'.
2019-08-01 08:10:20 +02:00
Marco Wahl 63b9c2634e Merge branch 'master' into compact-folding-refinement 2019-07-13 23:21:12 +02:00
Marco Wahl d2a5a6e4d0 Make feature "show children" applicable to whole file
* lisp/org.el (org-ctrl-c-tab): Make function applicable to a whole
  file.  Further flag (aka hide) all content in the subtrees.
2019-07-13 22:30:02 +02:00
Marco Wahl fd63eee797 Make feature "show branches" applicable to whole file
* lisp/org.el (org-kill-note-or-show-branches): Extend and refactor.
2019-07-13 22:29:29 +02:00
Nicolas Goaziou 2c8e8b4a18 contrib: Remove Org Drill
* contrib/README:
* lisp/org.el (org-modules): Remove reference to Org Drill.
contrib/lisp/org-drill.el: Remove file.

Org Drill is now developed externally, and available through an
ELPA (MELPA at this point).
2019-07-11 22:55:02 +02:00
Marco Wahl ee4fcc2aaa Add function to show just every headline in buffer
* lisp/org.el (org-show-branches-buffer): New function.
2019-07-11 12:12:37 +02:00
Marco Wahl add2614cf9 Add function to flag region above first heading
* lisp/org.el (org-flag-above-first-heading): New function.
2019-07-11 12:08:47 +02:00
Gustav Wikström ae9cd4370b org-attach*, org, org-manual, org-news, ox-html, testing/*
* lisp/org-attach.el

Changed the way attachments deal with property-inheritance.  It now
adheres to the =org-use-property-inheritance= setting by default but
it can be customized if needed (I recommend to enable it!).
The property ATTACH_DIR is deprecated in favour of the shorter and simpler
property DIR.

Added an explicit option to =org-attach= for unsetting
attachment-directories (i.e. remove DIR property and deal with the
attachments by interaction).

Added attachment link type with the prefix "attachment:".

Added customizations:
- org-attach-dir-relative
- org-attach-preferred-new-method
- org-attach-use-inheritance
- org-attach-id-to-path-function

Hooks added:
- org-attach-after-change-hook
- org-attach-open-hook

A new linktype "attachment" is added in order to reduce
link-duplication when wanting to link to files in attached folders of
nodes.  This works for both ID and DIR properties.  The goal is to
make the functionality for attachment links mirror the functionality
for file links.

* lisp/org-attach-git.el

New file, existing functionality.  Code here has been factored out
from org-attach.el and if GIT-functionality is to be used this module
needs to be required sepatately.  It extends org-attach by use of its
hooks.

Activating git functionality in org-attach is done by loading
org-attach-git from now on, instead of customizing a variable.

Naming of both functions and tests has been modified to match the move
of functionality into its own module.

* lisp/org.el

Inline images are shown also using attachment-links, exactly the same
as it works for file-links today.

Make org-open-at-point respect ARG when opening attachment-dir.

* lisp/org-compat.el

org-attach-directory has been deprecated in favour for
org-attach-id-dir.  The new name matches its purpose better.

* lisp/ox-html.el

Export attachment links to images as inline images, in the same way as
file links work today.

* etc/ORG-NEWS

Mention the changes in this patch.

* doc/org-manual.org

The chapter "Refile, Copy, Archive" has been split into two separate
chapters.
- "Refile, Copy and Archiving" for information related to moving
  existing data around.

- "Capture, Attachments, RSS Feeds and Protocols" for information
  related to working with external data.

The attachment-part has been rewritten and extended to match the
changes in this patch.

The new attachment link type is mentioned both inside the attachments
chapter and in the chapter dealing with links.

Documentation related to external links has been improved.

* testing/lisp/test-org-attach-annex.el

Require org-attach-git instead of org-attach, since this file tests
the GIT-functionality.

* testing/lisp/test-org-attach.el

Add tests for org-attach.

* testing/org-test.el

Define a symbol for a file to test attachments with.

* testing/examples/*

A bunch of new example files and folders are created and are used in
testing of org-attach to verify its functionality.
2019-07-07 19:55:49 +02:00
Neil Jerram 85711ba3d9 Make capture's idea of the current day more intuitive 2019-06-10 11:20:20 +02:00
Kyle Meyer 81920b3f86 Merge branch 'maint' 2019-06-09 21:39:18 -04:00
Paul Eggert 55e19d973e Backport commit 797ee5871 from Emacs
The convention is that a file with Author: but not Maintainer:
means the author is a maintainer, which makes it confusing
when a file lists the same person as author and maintainer.
Avoid the confusion by removing the duplicate Maintainer: line.

Remove Maintainer: when it duplicates Author:
797ee5871e458d6d97f57a24405412a053f5ef32
Paul Eggert
Sun May 26 01:00:15 2019 -0700
2019-06-09 21:28:44 -04:00
Paul Eggert 43bdc85b9d Backport commit 542443645 from Emacs
* lisp/org-id.el (org-id-link-to-org-use-id):
* lisp/org.el (org-support-shift-select, org-file-apps):
Remove backslash-newline that immediately precedes another
newline, as this is not the usual style and is confusing.

Avoid backslash-newline-newline in source code
5424436452bc0b3d8a62a8398f92d0c2db81e22b
Paul Eggert
Wed May 22 23:59:36 2019 -0700
2019-06-09 21:26:08 -04:00
Nicolas Goaziou 0ff65e9f4c org-list: Change `org-list-to-subtree' signature
* lisp/org-list.el (org-list-to-subtree): Add optional argument to
  specify level of the subtree.
(org-list-make-subtree):
* lisp/org.el (org-toggle-heading): Adapt to signature change.

Reported-by: Felix Wiemuth <felixwiemuth@hotmail.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-06/msg00010.html>
2019-06-10 00:19:32 +02:00
Nicolas Goaziou 5832c8fc93 Fix `org-image-actual-width' behaviour
* lisp/org.el (org-image-actual-width): Improve docstring.
(org-display-inline-images): Ignore case when looking for ATTR
keywords.  Refactor code.

Reported-by: 'Ihor Radchenko' <yantar92@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-06/msg00030.html>
2019-06-05 18:31:35 +02:00
Nicolas Goaziou b373e688be Merge branch 'maint' 2019-05-30 14:19:49 +02:00
Nicolas Goaziou 24555a0c00 Revert "Fix strike-through fontification on heading"
This reverts commit 42abf5c695.
2019-05-30 14:19:09 +02:00
Nicolas Goaziou 4a383ee0f1 Merge branch 'maint' 2019-05-28 11:20:21 +02:00
Cheong Yiu Fung e4f5a194c7 org.el: Fix docstring of org-latex-packages-alist
* lisp/org.el (org-latex-packages-alist): Fix docstring to match
`org-latex-default-packages-alist'

TINYCHANGE
2019-05-28 11:19:51 +02: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
Nicolas Goaziou d79e80fc4a Merge branch 'maint' 2019-05-09 22:01:13 +02:00
Ingo Lohmar d1ce59571f Fix fast tag selection affecting wrong line
* lisp/org.el (org-fast-tag-selection): Wrap `save-window-excursion'
with `save-excursion'.

In the case when the tags are changed remotely from the agenda, and
the affected buffer is already visible in another window, the tag
change was applied to the currently visible line in the target buffer,
not the headline in the agenda.
2019-05-09 22:00:00 +02:00
Nicolas Goaziou f8d8da6491 Merge branch 'maint' 2019-05-07 09:36:41 +02:00
Nicolas Goaziou e91bf47e4d Fix docstring
* lisp/org.el (org-timestamp-change): Fix docstring.

Reported-by: Tim Landscheidt <tim@tim-landscheidt.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-05/msg00047.html>
2019-05-07 07:32:20 +02:00
Nicolas Goaziou 7cfc9ce95f Merge branch 'maint' 2019-04-27 18:54:51 +02:00
Kévin Le Gouguec 42abf5c695 Fix strike-through fontification on heading
* lisp/org.el (org-do-emphasis-faces): Fix face priority.
2019-04-27 18:52:57 +02:00
Kyle Meyer 92a59795f1 Merge branch 'maint' 2019-04-02 19:07:21 -04:00
Paul Eggert b0324a7405 Backport commit f9ff60e0d from Emacs
* lisp/org-eshell.el (org-eshell-open):
* lisp/org.el (org-deadline-time-hour-regexp)
(org-scheduled-time-hour-regexp):
Avoid attempts to chain ranges, as this can be confusing.
For example, instead of [0-9-_.], use [0-9_.-].

Improve regexp advice again, and unchain ranges
f9ff60e0d7288e30cdbd1e43225059f1374441f1
Paul Eggert
Tue Apr 2 15:01:34 2019 -0700
2019-04-02 19:04:56 -04:00
Bastien 01182eb775 org.el: Bump version number 2019-04-02 08:30:19 +02:00
Kyle Meyer d9afed12f4 Merge branch 'maint' 2019-03-24 20:44:13 -04:00
Paul Eggert c856b34bd1 Backport commit bc2a93d5b from Emacs
* lisp/org.el (org-increase-number-at-point)
(org-fill-line-break-nobreak-p):
Fix regular expression typos.

Fix more regular expression typos
bc2a93d5b7c3d749b31927452e31b32bdb1b9108
Paul Eggert
Mon Mar 18 17:02:29 2019 -0700
2019-03-24 20:35:02 -04:00
Nicolas Goaziou 3a2ef56195 Fix last commit
* lisp/org.el (org-dynamic-block-define): Fix match.
2019-03-22 18:36:02 +01:00
Nicolas Goaziou 6c88d8e406 Fix multiple calls to `org-dynamic-block-alist'.
* lisp/org.el (org-dynamic-block-define): Update entry instead of
  piling up entries of the same type.
2019-03-22 18:32:51 +01:00
Nicolas Goaziou a39ee98873 Turn `org-dynamic-block-alist' into a defvar
* lisp/org.el (org-dynamic-block-alist): Make it a defvar.  Update docstring.
2019-03-22 18:32:40 +01:00
Kyle Meyer c2f3f1912e Merge branch 'maint' 2019-03-17 22:56:24 -04:00
Paul Eggert 7c9bfa142f Backport commit 3739d51ef from Emacs
* lisp/org-agenda.el (org-agenda):
* lisp/org-clock.el (org-clock-out, org-clock-display):
* lisp/org.el (org-refile):
Don’t trust arbitrary strings to not contain "%" or "`" in
(message (concat STRING1 STRING2 ...)).

Be safer about "%" in message formats
3739d51ef3b935b30e40ba4534fe362bc685865f
Paul Eggert
Thu Mar 7 09:05:56 2019 -0800
2019-03-17 22:52:48 -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 ce1681b597 Fix `org-offer-links-in-entry'
* lisp/org.el (org-offer-links-in-entry): Fix match groups.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2019-03/msg00192.html>
2019-03-16 18:05:50 +01:00
Nicolas Goaziou bab7dcbee8 Fix link fontification
* lisp/org.el (org-activate-links): Stop at paragraph boundaries.
2019-03-16 13:56:42 +01:00
Nicolas Goaziou 98475b32d8 Move table-related variables and functions into "org-table"
Slightly re-organize file.
2019-03-15 00:15:30 +01:00
Nicolas Goaziou b1429cdfe0 Fix link fontification
* lisp/org.el (org-activate-links): Display description when
  available.

Reported-by: Marco Wahl <marcowahlsoft@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-03/msg00117.html>
2019-03-12 00:05:33 +01: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 6c9d0e86b1 Fix function declarations 2019-03-10 18:00:36 +01:00
Nicolas Goaziou 9cf2040313 Move `org-replace-escapes' into "org-macs.el"
* lisp/org.el (org-replace-escapes): Move function...
* lisp/org-macs.el: ...there.
2019-03-10 18:00:36 +01:00
Nicolas Goaziou ccfea3d8e5 Move `org-fill-template' into "org-macs.el"
* lisp/org.el (org-fill-template): Move function
* lisp/org-macs.el: ...there.
2019-03-10 18:00:36 +01:00
Nicolas Goaziou 499c0a50cc Prefix link-related libraries filenames with "ol"
* lisp/org.el (org-modules): Update provided symbols.
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 30e5b846b4 Merge branch 'maint' 2019-03-09 11:01:05 +01:00
memeplex d313b24991 Avoid extra space when removing state
* lisp/org.el (org-todo): check if org-string-nw-p instead of non nil.
2019-03-09 11:00:25 +01:00
Kyle Meyer cded785a6a Merge branch 'maint' 2019-03-03 22:55:07 -05:00
Paul Eggert a6cead0d21 Backport commit 476066e89 from Emacs
* lisp/org-clock.el (org-clock-out):
* lisp/org.el (org-evaluate-time-range):
Avoid double-rounding of time-related values.  Simplify.
* lisp/org-clock.el (org-resolve-clocks-if-idle):
Use time-since instead of open-coding most of it.
* lisp/org-agenda.el (org-agenda-show-clocking-issues):
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-table.el (org-table-sum):
* lisp/org.el (org-babel-load-file, org-2ft, org-time-stamp)
(org-read-date-analyze, org-time-stamp-to-now):
Simplify.

Note(km): Many of the changes from 476066e89 have been dropped for
compatibility with older Emacsen.

Avoid some double-rounding of Lisp timestamps
476066e89d6f0bb87220da690b8a476bf9655b80
Paul Eggert
Fri Feb 22 18:33:57 2019 -0800
2019-03-03 22:49:42 -05:00
Nicolas Goaziou 344ed4c278 Merge branch 'maint' 2019-02-28 14:39:54 +01:00
Feng Shu 69c211d154 Let radio target works well with Chinese
* lisp/org.el (org-update-radio-target-regexp): Let radio target works well with Chinese.

There is no need to force split words with the help
of space for Chinese, this change let the below
example works well.

<<<天空>>>

我爱天空和大地
    ^^^^
2019-02-28 14:06:17 +01:00
Nicolas Goaziou 819864aebb Merge branch 'maint' 2019-02-27 21:56:36 +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 b139e1531a Merge branch 'maint' 2019-02-25 02:04:29 +01:00
Nicolas Goaziou 95e1f844ac Fix `org-refile' when logging multiple entries
* lisp/org.el (org-log-refile): Improve docstring.
(org-refile): Record information for every headline in the region.

Reported-by: "Eugene Sharygin" <eush77@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00315.html>
2019-02-25 02:02:28 +01:00
Nicolas Goaziou 2097f5488b Merge branch 'maint' 2019-02-22 19:58:25 +01:00
memeplex d6fcfc06ce Fix fast todo selection menu alignment
* lisp/org.el (org-fast-todo-selection): Avoid lines with just a
  closing delimiter.
2019-02-22 19:38:15 +01:00
Nicolas Goaziou 9eddf47059 Merge branch 'maint' 2019-02-22 15:16:25 +01:00
Nicolas Goaziou 93c3d9d281 Fix `org-display-inline-images' with "clickable images"
* lisp/org.el (org-display-inline-images): Even though Org syntax
  doesn't support nested links, display an image when the function is
  called on a link that contains a single file name in its
  description.

Reported-by: "Dietrich Foethke" <foethke@web.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00280.html>
2019-02-22 15:15:20 +01:00
Nicolas Goaziou e9d4eb0147 Merge branch 'maint' 2019-02-18 21:41:37 +01:00
Piet van Oostrum 08cb207b38 Add missing `interactive` spec to `org-show-all'
* lisp/org.el (org-show-all): Add missing `interactive` spec to
  `org-show-all'.

TINYCHANGE
2019-02-18 21:40:57 +01:00
Nicolas Goaziou 7e98c5c4cc Merge branch 'maint' 2019-02-15 22:47:53 +01:00
Nicolas Goaziou 6872088c7a Prevent spurious newline characters when inserting a heading
* lisp/org.el (org-insert-heading): Do not insert spurious newline
  characters.
* testing/lisp/test-org.el (test-org/insert-heading): Update tests.

Reported-by: Leo Vivier <zaephon@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00128.html>
2019-02-15 22:47:28 +01:00
Nicolas Goaziou 38121248c9 Merge branch 'maint' 2019-02-15 00:22:03 +01:00
Nicolas Goaziou f9015b4bbf Fix last commit
* lisp/org-clock.el (org-clock-out-if-current): Autoload function.
* lisp/org.el (org-todo): Do not call `org-clock-out-if-current' if
  `org-clock' is not loaded yet.
2019-02-15 00:20:40 +01:00
Nicolas Goaziou d783422498 Merge branch 'maint' 2019-02-14 15:07:07 +01:00
Nicolas Goaziou 8fc22d464d Fix `org-clock-out-when-done' in a narrowed buffer
* lisp/org-clock.el (org-clock-out-if-current): Ignore narrowing.
* lisp/org.el (org-todo): Call directly previous function instead of
  relying on a hook.

Reported-by: Leo Vivier <leo.vivier@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00132.html>
2019-02-14 15:03:37 +01:00
Nicolas Goaziou 0ceb59c377 Merge branch 'master' of code.orgmode.org:bzg/org-mode 2019-02-14 01:16:16 +01:00
Nicolas Goaziou 6d9022df22 Make LaTeX preview toggle more useful and predictable
* lisp/org.el (org-remove-highlights-with-change):
(org-mode): Update.
(org--format-latex-make-overlay):
(org--list-latex-overlays): Remove functions.
(org--make-preview-overlay):
(org-clear-latex-preview):
(org--latex-preview-region):
(org-latex-preview): New functions.
(org-format-latex): Use new function
* lisp/org-compat.el (org-toggle-latex-fragment):
(org-remove-latex-fragment-image-overlays): Deprecate.
* doc/org-manual.org (Previewing LaTeX fragments): Update
  documentation about `org-latex-preview'.

See <http://lists.gnu.org/archive/html/emacs-orgmode/2019-02/msg00138.html>.
2019-02-14 00:14:25 +01:00
Marco Wahl ba974fecf9 org: Refine open at point for tags to use just the tag at point
* lisp/org.el (org-open-at-point): On a tag open a tags view for just
  the tag at point.  Recent behavior for multiple tags was to open a
  tags view for the complete tag string.
2019-02-13 23:29:26 +01:00
Nicolas Goaziou 3abedb8b64 Bump version keyword 2019-02-13 15:43:29 +01:00
Nicolas Goaziou 613b480db4 Merge branch 'maint' 2019-02-13 13:05:54 +01:00
memeplex 0b148ba706 Fix fast tag selection menu alignment
* lisp/org.el (org-fast-tag-selection): Avoid lines with just
a closing delimiter.  Also correctly align grouped and ungrouped tags.
2019-02-13 13:05:33 +01:00
Kyle Meyer f362df7eb7 Merge branch 'maint' 2019-02-12 19:55:26 -05:00
Kyle Meyer 6a5be09c1d Restore some current-time to nil changes
* lisp/org-colview.el (org-columns-compute-all):
* lisp/org-timer.el (org-timer-start):
(org-timer-pause-or-continue):
(org-timer-seconds):
* lisp/org.el (org-read-date-analyze): Favor nil argument to
explicitly passing current-time result to float-time and decode-time.

Most of these "(current-time) => nil" changes were made in the Emacs
codebase, but we stayed with the original state because we relied on
explicitly overriding current-time in the tests.  As of the last
commit, we no longer need to do this and can use org-test-at-time
instead.
2019-02-12 19:46:03 -05:00
Nicolas Goaziou 9b3ca51fa4 Merge branch 'maint' 2019-02-09 18:53:28 +01:00
Nicolas Goaziou b929c3e5e4 Fix typo in docstring
* lisp/org.el (org-get-tags): Fix typo in docstring.
2019-02-09 18:52:54 +01:00
Nicolas Goaziou 230cc1ee07 Merge branch 'maint' 2019-02-06 19:34:10 +01:00
Nicolas Goaziou 03d7441813 Fix `org-edit-special' on INCLUDE with additional parameters
* lisp/org.el (org-edit-special): Correctly parse filenames with
  quotes and additional parameters.

Reported-by: Joon Ro <joon.ro@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00066.html>
2019-02-06 19:32:30 +01:00
Nicolas Goaziou 0b5ce28f1e Fix :package-version value
* lisp/org.el (org-email-link-description-format):
  Fix :package-version value.
2019-02-05 09:17:51 +01:00
Nicolas Goaziou 96cc9b58c2 Bump Org version 2019-02-03 14:54:58 +01:00
Nicolas Goaziou ce48c6b0d1 Merge branch 'maint' 2019-02-03 14:42:18 +01:00
Nicolas Goaziou 70c90c2cb5 Fix nested VISIBILITY property
* lisp/org.el (org-set-visibility-according-to-property): Fix nested
  VISIBILITY property. Small refactoring.
* testing/lisp/test-org.el (test-org/set-visibility-according-to-property):
  Add test.

Reported-by: Michael Maurer <maurer.michael@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00402.html>
2019-02-03 14:23:44 +01:00
Kyle Meyer 646d4a5fe9 Merge branch 'maint' 2019-01-31 23:04:06 -05:00
Kyle Meyer af7795533a Revert "(current-time) => nil" for Emacs 24 compatibility
* lisp/org-clock.el (org-clock-resolve-clock):
(org-clock-resolve):
(org-resolve-clocks-if-idle):
* lisp/org-element.el (org-element--cache-interrupt-p):
(org-element--cache-sync):
* lisp/org-habit.el (org-habit-insert-consistency-graphs):
* lisp/org-indent.el (org-indent-add-properties):
* lisp/org-timer.el (org-timer-show-remaining-time):
* lisp/org.el (org-babel-load-file):
(org-current-time):
(org-today):
(org-auto-repeat-maybe): Revert nil to (current-time) replacement for
compatibility with Emacs 24.

This reverts many changes introduced by eb10ad936 (Backport commit
c75f505de from Emacs, 2017-10-20).

Reported-by: Samuel Wales <samologist@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00427.html>
2019-01-31 23:03:10 -05:00
Nicolas Goaziou 683df456a4 org-list: Remove fancy description list indentation
* lisp/org-list.el (org-list-description-max-indent): Remove variable.
(org-list-item-body-column): No longer indent specially description
items.
* lisp/org.el (org-indent-line): Prune reference to removed variable
  in docstring.

Special indentation on description items breaks indentation in
sub-items.
2019-01-31 00:26:00 +01:00
Nicolas Goaziou ee29cdc40e Merge branch 'maint' 2019-01-30 22:36:14 +01:00
Nicolas Goaziou a6adc9831d Add new `org-todo-repeat-hook'
* lisp/org.el (org-todo-repeat-hook): New variable.
(org-auto-repeat-maybe): Use it.

See <http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00102.html>.
2019-01-30 22:35:30 +01:00
Nicolas Goaziou 5e47e49832 Revert actionable repeaters in inactive timestamps
* lisp/org.el (org-repeat-re): Repeaters are for active timestamps
  only.
* testing/lisp/test-org.el (test-org/auto-repeat-maybe): Update test.

Reported-by: cesar mena <cesar.mena@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00095.html>
2019-01-30 22:19:28 +01:00
Nicolas Goaziou 5fe9e6cbea Extend pcomplete binding to C-M-i
* lisp/org.el (org-mode-map): Add TAB equivalent to <tab> binding.

Reported-by: Johannes Altmanninger <aclopte@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00373.html>
2019-01-29 10:06:19 +01:00
Marco Wahl ed7ea512c2 org: Fix match of todo items
* lisp/org.el (org-show-todo-tree): Don't match headlines that start
  with a todo kwd as prefix.
2019-01-25 10:32:07 +01:00
Nicolas Goaziou deb5c4f39a Merge branch 'maint' 2019-01-24 15:05:13 +01:00
Nicolas Goaziou 24030ef62b Fix consecutive radio links
* lisp/org.el (org-activate-target-links): Properly match consecutive
  radio links.

Reported-by: Jay Dresser <jay@jaydresser.us>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00327.html>
2019-01-24 15:03:47 +01:00
Yasushi SHOJI 4a076ed545 Allow cloning subtrees while shifting them backward in time
* lisp/org.el (org-clone-subtree-with-time-shift): Accept a negative
value to shift the timestamp backward in time.
* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add test.

Reported-by: Scott Randby <srandby@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00151.html>

Signed-off-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
2019-01-21 18:47:49 +01:00
Kyle Meyer baa98a4a6f babel: Fix incorrect merge resolution from ba321d0e4
* lisp/org.el (org-babel-load-file): Fix type error introduced by
merge ba321d0e4.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<https://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00208.html>
2019-01-14 17:09:03 -05:00
Kyle Meyer ba321d0e44 Merge branch 'maint' 2019-01-13 15:14:37 -05:00
Paul Eggert d64c9a996b Backport commit 662bee7d7 from Emacs
* lisp/ob-eval.el (org-babel--shell-command-on-region):
* lisp/org-attach.el (org-attach-commit):
* lisp/org-macro.el (org-macro-initialize-templates):
* lisp/org.el (org-babel-load-file)
(org-file-newer-than-p):
* lisp/ox-html.el (org-html-format-spec):
* lisp/ox-publish.el (org-publish-find-date)
(org-publish-cache-ctime-of-src):
Prefer (file-attribute-size A) to (nth 7 A), and similarly
for other file attributes accessors.
* lisp/ox-publish.el (org-publish-cache-ctime-of-src):
Prefer float-time to doing time arithmetic by hand.

file-attributes cleanup
662bee7d70ccd3903e123b08c7ec9108a1a2ce0b
Paul Eggert
Sun Sep 23 18:32:59 2018 -0700
2019-01-13 12:43:04 -05:00
Paul Eggert 28d2c81709 Backport commit f18af6cd5 from Emacs
* lisp/org.el:
* lisp/ox-publish.el:
Prefer ash to lsh when either will do.

Audit use of lsh and fix glitches
f18af6cd5cb7dbbf7420ec2d3efed4e202c4f0dd
Paul Eggert
Tue Aug 21 13:44:32 2018 -0700
2019-01-13 12:43:04 -05:00
Glenn Morris f73cc4811b Backport commit 18de2ada2 from Emacs
* lisp/org.el (org-CUA-compatible)
(org-popup-calendar-for-date-prompt):
Move aliases before targets, to silence new compiler warning.

More alias-related tedium
18de2ada243653ece98b18044233e5d29eee5903
Glenn Morris
Fri Apr 20 18:55:04 2018 -0400
2019-01-13 12:43:04 -05:00
Glenn Morris 3d11e4c69b Backport commit 9c3eeba4d from Emacs
* lisp/org-agenda.el (org-agenda-search-view-search-words-only)
(org-agenda-remove-tags-when-in-prefix)
(org-agenda-align-tags-to-column, org-agenda-keymap):
* lisp/org.el (org-special-ctrl-a)
(org-log-state-notes-into-drawer)
(org-agenda-multi-occur-extra-files):
Move aliases before targets, to silence new compiler warning.

The tedious game of whack-a-mole with compiler warnings continues
9c3eeba4db26ddaeead100beea7a96f9fa640918
Glenn Morris
Fri Apr 20 18:34:39 2018 -0400
2019-01-13 12:43:04 -05:00
Glenn Morris 16c8187db1 Backport commit d5f6ff99c from Emacs
* lisp/org.el (image-refresh):
* lisp/ox-odt.el (clear-image-cache, image-size): Declare.

Quieten without-x org compilation
d5f6ff99c2b594919931b277a2d94d3a289ca764
Glenn Morris
Wed Feb 28 16:55:41 2018 -0500
2019-01-13 12:43:04 -05:00
Kyle Meyer 6df3e8880e Partially revert backport of c75f505de
* lisp/org-colview.el (org-columns-compute-all):
* lisp/org-timer.el (org-timer-start):
(org-timer-pause-or-continue):
(org-timer-seconds):
(org-timer-set-timer):
* lisp/org.el (org-read-date-analyze): Restore use of `current-time`
for testing purposes.

In these spots, we call (current-time) so that it can be overriden in
tests.  Add a comment about this in the cases that don't have one.
2019-01-13 12:43:04 -05:00
Paul Eggert eb10ad9360 Backport commit c75f505de from Emacs
* lisp/org-agenda.el (org-agenda-to-appt):
* lisp/org-clock.el (org-clock-resolve-clock)
(org-clock-resolve, org-resolve-clocks-if-idle):
* lisp/org-colview.el (org-columns-edit-value, org-columns)
(org-agenda-columns):
* lisp/org-element.el (org-element--cache-interrupt-p)
(org-element--cache-sync):
* lisp/org-habit.el (org-habit-get-faces)
(org-habit-insert-consistency-graphs):
* lisp/org-indent.el (org-indent-add-properties):
* lisp/org-timer.el ((org-timer-show-remaining-time):
* lisp/org.el (org-babel-load-file, org-current-time)
(org-today, org-auto-repeat-maybe)
(org-small-year-to-year, org-goto-calendar):
* lisp/ox.el (org-export-insert-default-template):
Use nil instead of (current-time) where either will do, as nil is
a bit more efficient and should have less timing error.

Prefer nil to (current-time) when either works
c75f505dea6a560b825384cf3d277690f86840bf
Paul Eggert
Fri Oct 20 19:42:23 2017 -0700

Note(km): The changes that will reverted in the next commit have been
dropped from the ChangeLog entries above.
2019-01-13 12:43:03 -05:00
Kyle Meyer 6972cce38b Merge branch 'maint' 2019-01-13 00:13:46 -05:00
Kyle Meyer 87c4635c88 Fix docstring typo
* lisp/org.el (org-insert-link): Fix docstring typo.
2019-01-12 23:47:36 -05:00
Nicolas Goaziou 871119986a Merge branch 'maint' 2019-01-12 11:50:37 +01:00
Nicolas Goaziou f9596eb472 Fix following timestamp in planning lines
* lisp/org.el (org-open-at-point): Open calendar when called on
  a timestamp in a planning line.

Reported-by: Bob Hepple <bob.hepple@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00158.html>
2019-01-12 11:49:50 +01:00
Kaushal Modi 8a5d8f79a1 Merge branch 'maint' 2019-01-08 11:35:34 -05:00
Kaushal Modi 34e5dcfb06 Fix the order of org-get-tags collected tags from #+filetags
* lisp/org.el (org-get-tags): Now org-get-tags returns tags list with
  tags from #+filetags in the beginning.

* testing/lisp/test-org.el (test-org/get-tags): Add test.

Fixes regression caused by commit
<5e27b2fd32>.

Bug reported in
<https://lists.gnu.org/r/emacs-orgmode/2019-01/msg00052.html>.
2019-01-08 11:29:58 -05:00
Marco Wahl 2862bea69b org: Option for user to force non fast tag selection interface
* lisp/org.el (org-set-tags-command): Disable the fast tag selection
  interface when the command is prefixed by C-u C-u.
2019-01-05 13:16:31 +01:00
Marco Wahl 99f0c53418 Merge branch 'maint' 2019-01-05 11:41:57 +01:00
Marco Wahl e8ad394c74 org: Fix docstring
* lisp/org.el (org-loop-over-headlines-in-active-region): Complete the
  list of concerned functions.
2019-01-05 11:35:26 +01:00
Kaushal Modi b334a59902 Merge branch 'maint' 2019-01-04 08:59:10 -05:00
Kaushal Modi 539091799b Fix C-u M-x org-align-tags not aligning all tags in buffer
* lisp/org.el (org-align-tags): Move point to the beginning of the
  visible buffer first before attempting to look for Org headline
  tags.

* testing/lisp/test-org.el (test-org/tag-align): Add test.

Fixes a regression in
1615261cdc.

Bug reported in
<https://lists.gnu.org/r/emacs-orgmode/2019-01/msg00051.html>.
2019-01-04 08:57:10 -05:00
memeplex 7db8ebc1df Add option to natively fontify LaTeX snippets and environments
* lisp/org.el: add a 'native value to org-highlight-latex-and-related
  that allows to use tex native font locking by means of
  org-src-font-lock-fontify-block.
* etc/ORG-NEWS: add note about new feature.
2019-01-04 14:22:11 +01:00
memeplex 0e26444fe0 Use xcolor for all latex preview converters
* lisp/org.el: remove :use-xcolor option and make dvipng use xcolor
  since usage of CLI fg and bg color args is incompatible with docs
  that themselves use xcolor (e.g. through tikz).
* etc/ORG-NEWS: add incompatible change note.
2019-01-04 14:20:23 +01:00
Kyle Meyer 23ef240aa6 Merge branch 'maint' 2019-01-03 20:43:15 -05:00
Van L 98407c111d Fix two docstring typos
* lisp/org.el (org-read-date-force-compatible-dates): Fix docstring
typos.

TINYCHANGE
2019-01-03 20:43:01 -05:00
stardiviner 34b71a0ca9 Add a dispatcher command for inserting dynamic blocks
* lisp/org.el (org-dynamic-block-insert-dblock,
  org-dynamic-block-alist, org-dynamic-block-functions,
  org-dynamic-block-types, org-dynamic-block-define,
  org-dynamic-block-function): New variables, New functions.

* lisp/org-keys.el (org-dynamic-block-insert-dblock): Add binding for
  the function.
(org-clock-report, org-columns-insert-dblock): Remove function
keybindings. Mark them as obsolete.

* doc/org-manual.org (Dynamic Blocks): : Add manual for dispatch
command `org-dynamic-block-insert-dblock'.

* testing/lisp/test-org-clock.el: New test.
2019-01-02 15:55:51 +01:00
Nicolas Goaziou 43fbf8a540 Fix last commit
* lisp/org.el (org-do-latex-and-related): Silence byte-compiler.
2019-01-01 17:40:38 +01:00
Carlos Pita 80268c0e07 Fix fontification of LaTeX environments
* lisp/org.el (org-fontify-extend-region): New function.
(org-compute-latex-and-related-regexp):
(org-do-latex-and-related): Revert recent changes.
(org-set-font-lock-defaults): Use new function.
2019-01-01 17:31:18 +01:00
Nicolas Goaziou b35bda573a Merge branch 'maint' 2019-01-01 17:17:59 +01:00
Nicolas Goaziou 284799a2e8 Fix `org-insert-link' with nil description
* lisp/org.el (org-insert-link): DESC may be nil; do not use
  `string-match' directly on it.
2019-01-01 17:16:50 +01:00
Bastien 7a22b8f93b Merge branch 'maint' 2019-01-01 11:54:01 +01:00
Bastien f584d37a67 Update copyright year 2019-01-01 11:50:56 +01:00
Nicolas Goaziou 974bfcb0fa Merge branch 'master' into next 2018-12-18 01:07:47 +01:00
Nicolas Goaziou abbe5d3958 Fix a docstring
* lisp/org.el (org-store-link-functions): Fix docstring.
2018-12-18 01:07:21 +01:00
Nicolas Goaziou dd26f03e18 Merge branch 'master' into next 2018-12-16 11:14:16 +01:00
Nicolas Goaziou 6656f11596 Fix typo
* lisp/org.el (org-do-latex-and-related): Fix typo.
2018-12-16 11:13:49 +01:00
Nicolas Goaziou cc594e6fba Merge branch 'master' into next 2018-12-16 11:09:35 +01:00
Nicolas Goaziou af3e2b1856 Fix fontification of LaTeX elements (take two)
* lisp/org.el (org-do-latex-and-related): Fix last commit.
2018-12-16 11:08:00 +01:00
Nicolas Goaziou 5da146626d Merge branch 'master' into next 2018-12-13 21:30:01 +01:00
Nicolas Goaziou a86b14253b Fix fontification of LaTeX environments
* lisp/org.el (org-compute-latex-and-related-regexp):
(org-do-latex-and-related): Fix fontification of LaTeX environments.
2018-12-13 21:28:14 +01:00
Nicolas Goaziou 4ef9228617 Silence byte-compiler 2018-11-30 21:18:29 +01:00
Nicolas Goaziou 499a590034 Merge branch 'master' into next 2018-11-28 00:28:53 +01:00
Nicolas Goaziou e3fdef74b9 Improve docstrings
* lisp/org.el (org-latex-default-packages-alist):
(org-latex-packages-alist): Improve docstring.
* lisp/ox-latex.el (org-latex--remove-packages): Small refactoring.
2018-11-28 00:26:24 +01:00
Nicolas Goaziou 776679ee0a Merge branch 'master' into next 2018-11-27 23:23:09 +01:00
Nicolas Goaziou b16feed40c Normalize blank lines with <C-RET>
* lisp/org.el (org-insert-heading): Make C-RET more predictable.  In
  particular, it should not eat all the blank lines at the end of the
  tree.

Reported-by: David Masterson <dsmasterson@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-11/msg00275.html>
2018-11-27 23:21:06 +01:00
Nicolas Goaziou 19a75de480 Merge branch 'master' into next 2018-11-26 23:56:55 +01:00
Nicolas Goaziou cd60a35fe1 Fix opening custom ID links with percent escaped syntax
* lisp/org.el (org-open-at-point): Un-escape percent escaped path.
* testing/lisp/test-org.el (test-org/custom-id): Add test.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-11/msg00303.html>
2018-11-26 23:56:17 +01:00
Nicolas Goaziou 229ed4b475 Merge branch 'master' into next 2018-11-26 19:53:15 +01:00
Nicolas Goaziou 32a7305dda Fix <RET> on table.el tables
* lisp/org.el (org-return): Prevent wrong type error when on
  a table.el table.
2018-11-26 19:51:51 +01:00
Nicolas Goaziou b5640ea801 Merge branch 'master' into next 2018-11-17 16:34:45 +01:00
Nicolas Goaziou 7bf3c10819 Fix speed regression introduced in change about repeated timestamps
* lisp/org.el (org-auto-repeat-maybe): Fix speed regression introduced
  in "Also obey to repeaters in inactive time stamps".

Reported-by: Marco Wahl <marcowahlsoft@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-11/msg00078.html>
2018-11-17 16:33:04 +01:00
Nicolas Goaziou b8b7d00864 Merge branch 'master' into next 2018-11-11 22:24:21 +01:00
Nicolas Goaziou afcb1d3899 Fix typo
* lisp/org.el (org-get-tags): Fix typo in docstring.
2018-11-11 22:24:00 +01:00
Nicolas Goaziou cd12a9eefe Merge branch 'master' into next 2018-11-10 20:00:31 +01:00
Nicolas Goaziou af81211fdc Also obey to repeaters in inactive time stamps
* lisp/org.el (org-repeat-re): Accept inactive time stamps.
(org-auto-repeat-maybe): Small refactoring.  Find additional repeaters
also in inactive time stamps.
* testing/lisp/test-org.el (test-org/auto-repeat-maybe): Add test.

Reported-by: Leo Gaspard <orgmode@leo.gaspard.io>
<http://lists.gnu.org/r/emacs-orgmode/2018-11/msg00078.html>
2018-11-10 19:59:48 +01:00
Nicolas Goaziou f5c2659bb8 Use `org-strip-quote' when possible
* lisp/org-macs.el (org-unbracket-string):
(org-strip-quotes): Allow nil values.
* lisp/org-lint.el (org-lint-wrong-include-link-parameter):
* lisp/org-macro.el (org-macro--collect-macros):
* lisp/org.el (org--setup-collect-keywords):
(org-edit-special):
* lisp/ox.el (org-export--get-inbuffer-options):
(org-export--list-bound-variables):
(org-export-expand-include-keyword): Use `org-strip-quote' instead of
`org-unbracket-string' whenever possible.
2018-11-10 08:58:31 +01:00
Kyle Meyer a3741d99b8 Merge branch 'master' into next 2018-11-09 11:02:00 -05:00
Kyle Meyer 9ffd5aabc9 Fix mapcar call from 9df82be07
* lisp/org.el (org-tags-expand): Add missing mapcar argument.
2018-11-09 11:01:53 -05:00
Nicolas Goaziou 4a2ef00804 Merge branch 'master' into next 2018-11-08 18:23:03 +01:00
Nicolas Goaziou 9df82be074 Fix tag groups expansion as a regexp
* lisp/org.el (org--tags-expand-group): New function.
(org-tags-expand): Refactor code.  Fix expansion of identical tag
groups in the same match string.  Fix docstring.  Remove unused
argument.
* testing/lisp/test-org.el (test-org/tags-expand): New test.

Reported-by: Omari Norman <omari@smileystation.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00360.html>
2018-11-08 18:20:57 +01:00
Nicolas Goaziou 470bf6e27e Merge branch 'master' into next 2018-11-04 16:44:30 +01:00
Nicolas Goaziou 503a1d4d94 Fix coderefs links in non-source buffers
* lisp/org-src.el (org-src-source-file-name): New variable.
(org-src--edit-element): Set new variable.
* lisp/org.el (org-store-link): Store the source file along with the
  coderef so as to insert link in other documents than the one
  where the code block is located.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00293.html>
2018-11-04 16:43:36 +01:00
Nicolas Goaziou 77b417f01a Merge branch 'master' into next 2018-11-04 15:28:07 +01:00
Nicolas Goaziou 44d5286dbf Fix storing links in non-source edit buffers
* lisp/org-src.el (org-src--source-buffer): Rename to `org-src-source-buffer'.
(org-src-source-type): New function.
(org-edit-src-save): Apply renaming.
* lisp/org.el (org-store-link): When in an edit buffer not editing
  a source block, there is no point in inserting a coderef.
2018-11-04 15:26:04 +01:00
Nicolas Goaziou 91153ff14f Tiny refactoring
* lisp/org.el (org-link-search): Tiny refactoring.
2018-11-04 09:06:28 +01:00
Nicolas Goaziou 3387666750 Merge branch 'master' into next 2018-11-03 21:00:14 +01:00
Nicolas Goaziou 7d30f5f44a Silence byte-compiler 2018-11-03 20:59:42 +01:00
Nicolas Goaziou 19317db78f Merge branch 'master' into next 2018-11-03 17:06:37 +01:00
Nicolas Goaziou eb8041ef82 Fix storing coderef link on when a code ref already exists
* lisp/org.el (org-store-link): Fix storing coderef link on when
  a code ref already exists.
2018-11-03 17:04:01 +01:00
Nicolas Goaziou 363df82b19 Change default value for `org-email-link-description-format'
* lisp/org.el (org-email-link-description-format): Change default
  value.  No longer truncate subject by default.  Add `:safe' keyword.
* doc/org-manual.org (Handling Links): Document change.

Reported-by: "Garreau, Alexandre" <galex-713@galex-713.eu>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00344.html>
2018-11-01 23:00:45 +01:00
Nicolas Goaziou e02d8cd811 Merge branch 'master' into next 2018-11-01 22:27:01 +01:00
Nicolas Goaziou 42eebb3755 Use `cl-signum' instead of `signum'
* lisp/org.el (org-modify-ts-extra): Use `cl-signum' instead of
  `signum'.
2018-11-01 22:26:21 +01:00
Nicolas Goaziou dd1d15dcd8 Merge branch 'master' into next 2018-11-01 18:30:25 +01:00
Nicolas Goaziou 67cea44c9f Add docstring for `org-at-heading-p'
* lisp/org.el (org-at-heading-p): Add docstring.

Reported-by: Will Pierce <pierwill@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-11/msg00006.html>
2018-11-01 18:29:35 +01:00
Nicolas Goaziou 9d6a9e1739 Merge branch 'master' into next 2018-10-14 09:58:55 +02:00
Nicolas Goaziou f12f9b4f28 Fix fontification of links within verbatim markup
* lisp/org.el (org-do-emphasis-faces): Prevent fontification of links
  within verbatim markup.
2018-10-14 09:57:47 +02:00
Nicolas Goaziou 36c7bada28 Merge branch 'master' into next 2018-10-13 16:54:39 +02:00
Michaël Cadilhac d9fdc204cc org.el: Fix typo
* lisp/org.el (org-enforce-todo-checkbox-dependencies): Fix typo.

TINYCHANGE
2018-10-13 16:54:01 +02:00
Nicolas Goaziou 100541b53c Bump version keyword to 9.3 2018-10-06 12:12:13 +02:00
Nicolas Goaziou ffad253307 Merge branch 'master' into next 2018-10-06 09:50:52 +02:00
Nicolas Goaziou 1fbae137da Silence byte-compiler 2018-10-06 09:50:32 +02:00
Nicolas Goaziou 0954d4c258 Merge branch 'master' into next 2018-10-04 22:52:53 +02:00
Nicolas Goaziou 2ada40b796 Fix `org-paste-subtree' when called at the end of a headline
* lisp/org.el (org-paste-subtree): Fix `org-paste-subtree' when called
  at the end of a headline.

Reported-by: Dale Sedivec <dale@codefu.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00050.html>
2018-10-04 22:50:09 +02:00
Nicolas Goaziou bb36c0c8ab Refactor `org-babel-load-file'
* lisp/org.el (org-babel-load-file): Refactor code.
2018-10-03 18:44:34 +02:00
Nicolas Goaziou 144c27e39d org-keys: Extract key bindings into their own library
* lisp/org.el (org-replace-disputed):
(org-use-extra-keys):
(org-disputed-keys):
(org-key):
(org-defkey):
(org-use-speed-commands):
(org-speed-commands-user):
(org-follow-link-hook):
(org-tab-follows-link):
(org-return-follows-link):
(org-return-follows-link):
(org-mouse-1-follows-link):
(org-mouse-map):
(org-read-date-minibuffer-local-map):
(org-remap):
(org-speed-commands-default):
(org-print-speed-command):
(org-speed-command-help):
(org-speed-move-safe):
(org-speed-command-activate):
(org-babel-speed-command-activate):
(org-speed-command-hook): Move to "org-keys.el".
* lisp/org-keys.el: New file.
* lisp/ob-keys.el: Remove file.
2018-10-03 18:44:34 +02:00
Nicolas Goaziou 0266c36645 Do not use `org-refresh-effort-properties' when initializing Org
* lisp/org.el (org-mode): Do not call `org-refresh-effort-properties'.
(org-set-effort): Avoid using `effort' text property.
* lisp/org-timer.el (org-timer-set-timer): Avoid using
  `effort-minutes' text property.

Limit use of `effort' and `effort-minutes' properties to "org-agenda".
2018-10-03 18:44:34 +02:00
Nicolas Goaziou 0dd2985509 `org-fill-paragraph' leaves buffer unmodified when doing nothing
* lisp/org.el (org-fill-paragraph): Leave buffer unmodified when
  nothing was filled.
* lisp/org-compat.el: Add forward compatibility with `buffer-hash'
  function.
2018-10-03 18:44:34 +02:00
Chris Kauffman 09f9507238 Added keybindings for `org-table-move-cell-*' functions
* lisp/org.el (org-shiftup):
(org-shiftdown):
(org-shiftright):
(org-shiftleft): Dispatch `org-table-move-cell-*' commands.
2018-10-03 18:44:34 +02:00
Nicolas Goaziou 77aadd569c Improve a docstring
* lisp/org.el (org-complete-tags-always-offer-all-agenda-tags):
  Improve docstring.

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00027.html>
2018-10-03 12:40:58 +02:00
Marco Wahl d3e286257b org: Fix dangling parens in org-info-find-node 2018-10-03 09:21:58 +02:00
Marco Wahl 4ec502fc98 Merge branch 'master' into contextual-docu 2018-10-02 16:34:58 +02:00
Marco Wahl 3be61dff2f org: Unify a few settings in the org-mode-map 2018-10-02 15:05:59 +02:00
Marco Wahl 9968e66b64 org: Dropped one non-functional keybinding 2018-10-01 23:40:27 +02:00
Marco Wahl b19e7737dd org,org-agenda: New: open info depending on context
* lisp/org.el (org-info-find-node): Function to jump to info depending
  on context.  For an org file the context is the element type at point.
2018-10-01 22:47:33 +02:00
Marco Wahl 3f8b1b0265 org: Enable planning lines for special edit
* lisp/org.el (org-edit-special): Add a case for element type
  'planning.
2018-09-27 13:46:19 +02:00
Marco Wahl 7ae1230816 Merge remote-tracking branch 'origin/master' 2018-09-26 22:22:46 +02:00
Marco Wahl 6e584d06fd org: Show planning type in prompt when editing
* lisp/org.el (org-add-planning-info): Call `org-read-date' with either
  DEADLINE or SCHEDULED as value for the prompt.
2018-09-26 22:20:15 +02:00
Marco Wahl fe72a05ba5 org: Show planning type in prompt when editing
* lisp/org.el (org-add-planning-info): Call `org-read-date' with either
  DEADLINE or SCHEDULED as value for the prompt.
2018-09-26 14:15:34 +02:00
Nicolas Goaziou 17edaf8c14 "src block" -> "source block" in documentation and comments
* etc/ORG-NEWS (Maxima: new headers ~:prologue~ and ~:epilogue~):
(Texinfo exports inline source blocks as ~@code{}~):
(Default lexical evaluation of emacs-lisp source blocks):
* lisp/ob-clojure.el (org-babel-clojure-default-ns):
* lisp/ob-core.el (org-babel-named-src-block-regexp-for-name):
(org-babel-current-src-block-location):
(org-babel-mark-block):
(org-babel-insert-result):
* lisp/ob-emacs-lisp.el (org-babel-default-header-args:emacs-lisp):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/ob-lob.el (org-babel-lob-ingest):
* lisp/ob-ref.el:
* lisp/org-element.el (org-element-object-restrictions):
(org-element-src-block-parser):
(org-element-inline-src-block-parser):
* lisp/org-lint.el:
(org-lint--checkers):
* lisp/org-pcomplete.el (pcomplete/org-mode/block-option/src):
* lisp/org-src.el (org-edit-inline-src-code):
* lisp/org.el (org-ctrl-c-ctrl-c):
(org-in-src-block-p):
(org-fill-element):
* lisp/ox-html.el (org-html--textarea-block):
(org-html-format-code):
* lisp/ox-latex.el (org-latex-minted-options):
(org-latex-custom-lang-environments):
* lisp/ox-md.el:
* lisp/ox-odt.el (org-odt-format-code):
* lisp/ox.el (org-export-collect-listings):
* testing/lisp/test-ob-exp.el (ob-exp/src-block-with-affiliated-keyword):
* testing/lisp/test-ob.el (test-ob/preserve-results-indentation):
  Correct "src block" occurrences when they do not specifically refer
  to the element type `src-block'.
2018-09-20 11:23:49 +02:00
Marco Wahl 13090d114b org: Add special edit on timestamps
* lisp/org.el (org-edit-special): Added a case to call a suitable
  function to edit the timestamp at hand.
2018-09-18 17:59:52 +02:00
Nicolas Goaziou 5fe1650034 Fix `org-copy-visible'
* lisp/org.el (org-copy-visible): Deactivate region before adding
  visible part to kill ring.

See https://lists.gnu.org/archive/html/emacs-devel/2018-09/msg00476.html
2018-09-11 12:06:22 +02:00
Matt Lundin 5e27b2fd32 Ensure that org-get-tags returns all local tags
* lisp/org.el: (org-get-tags) Create a clearer separation between
  local and inherited tags in the function, so that
  org-remove-uninherited tags is only run on inherited tags. This is
  important to avoid destroying existing tags when adding new tags.
* testing/lisp/test-org.el: (test-org/get-tags) Add regression test
2018-08-19 10:28:27 +02:00
Nicolas Goaziou d975b44fd4 Fix `org-kill-line' on tag lines
* lisp/org.el (org-kill-line): Preserve tags when `org-special-ctrl-k'
  is non-nil.
* testing/lisp/test-org.el (test-org/kill-line): New test.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://lists.gnu.org/r/emacs-orgmode/2018-07/msg00122.html>
2018-07-17 22:24:01 +02:00
Nicolas Goaziou d3774fba77 Limit `org-open-at-point'
* lisp/org.el (org-open-at-point): Do not open everything that looks
  like a link, in particular in verbatim or code objects.  However,
  still conveniently open links in comments, node properties and
  keywords.
2018-07-05 13:35:26 +02:00
Nicolas Goaziou 120f871f41 Small refactoring
* lisp/ob-core.el (org-babel-open-src-block-result): Fix docstring,
  refactor code.
* lisp/org.el (org-open-at-point): Refactor so as to not call
  `org-babel-open-src-block-result' unconditionally.
2018-07-05 13:15:30 +02:00
Nicolas Goaziou accf99cbc0 Deprecate `org-effort-durations'
* lisp/org.el (org-effort-duration): Remove unused variable.
* lisp/org-compat.el (org-effort-durations): Make
  `org-effort-duration' an alias for `org-duration-units'.
* lisp/org-clock.el (org-clock-modify-effort-estimate): Fix docstring.
* doc/org-manual.org (Footnotes): Clarify footnote.

The variable is inactive since introduction of "org-duration" library.
2018-06-25 17:13:04 +02:00
Nicolas Goaziou 62dd2cc829 Fix regression in tags alignment
* lisp/org.el (org--align-tags-here): Correctly preserve column.
* testing/lisp/test-org.el (test-org/tag-align): Add test.

The regression was introduced in
593058e4a6.

Reported-by: Bernt Hansen <bernt@norang.ca>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00245.html>
2018-06-22 18:49:11 +02:00
Nicolas Goaziou 593058e4a6 `org-set-tags' modifies buffer only when necessary
* lisp/org.el (org--align-tags-here):
(org-set-tags): Modify buffer only when necessary.

* testing/lisp/test-org.el (test-org/set-tags): Add tests.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00242.html>
2018-06-19 09:40:00 +02:00
Nicolas Goaziou 2e1daf14e0 Update "Version" keyword 2018-06-17 10:25:35 +02:00
Christian Schwarzgruber 7fcceecf5d Improve `org-log-reschedule` and `org-log-redeadline' docstrings
* lisp/org.el (org-log-reschedule):
(org-log-redeadline): Improve docstring.

TINYCHANGE
2018-06-16 21:51:37 +02:00
Nicolas Goaziou 42a2c248eb org-capture: Fix completion for properties in capture buffer
* lisp/org.el (org-read-property-value):
* lisp/org-capture.el (org-capture-fill-template): Sidestep
  `org-set-property'.  Use previous function and `org-entry-put'
  instead.

Reported-by: Eric Danan <eric.danan@u-cergy.fr>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00061.html>
2018-06-16 17:03:22 +02:00
Nicolas Goaziou b3981d6ad0 Fix `org-metaup' and `org-metadown' on regions
* lisp/org.el (org-metaup): Do not leave a character behind when
  transposing regions.
(org-metadown): Fix "Transposed regions overlap" error.

Reported-by: Adam Porter <adam@alphapapa.net>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00184.html>
2018-06-15 18:52:09 +02:00
Nicolas Goaziou 956a5a4cb1 Ignore inlinetasks in `org-before-first-heading-p'
* lisp/org.el (org-before-first-heading-p): Ignore inlinetasks.
2018-06-13 22:20:27 +02:00
Nicolas Goaziou f50f373389 Add facility for commit log messages from Org documents
* lisp/org-compat.el (org-add-log-current-headline): New function.
* lisp/org.el (org-mode): Use new function.
2018-06-13 22:15:56 +02:00
Nicolas Goaziou 3f26c9bd2e `org-get-heading' returns nil instead of erroring out
* lisp/org.el (org-get-heading): Return nil instead of throwing an
  error before first headline.
2018-06-13 22:15:17 +02:00
Nicolas Goaziou f440ff0a6a Fix imenu compatibility with non-contiguous structure
* lisp/org.el (org-mode): Move imenu compatibility to "org-compat.el".
* lisp/org-compat.el (org-imenu-new-marker): Remove function.
(org-imenu-get-tree): Handle non-contiguous structure.

Reported-by: Thibault Polge <thibault@thb.lt>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00088.html>
2018-06-13 01:13:16 +02:00
Nicolas Goaziou 3745c0af9f Fix indentation when wrapping a block around a region
* lisp/org.el (org-insert-structure-template): Indent like the first
  line, not the line the point happens to be on.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00107.html>
2018-06-12 09:03:33 +02:00
Nicolas Goaziou ed7d1dc6d7 Fix quirks in `org-insert-structure-template'
* lisp/org.el (org-insert-structure-template): Fix some issues.
  Refactor code.
* testing/lisp/test-org.el (test-org/insert-structure-template):
  Update tests.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00553.html>
2018-06-02 23:41:56 +02:00
Rasmus 7ac46c52b7 Check format of org-structure-template-alist
* org.el (org--check-org-structure-template-alist): New function
  yielding user-error if using old org-structure-template-alist
  format.
  (org--insert-structure-template-mks):
* org-tempo.el (org-tempo-add-templates): Use new function
2018-05-28 23:44:51 +02:00
Aaron Ecay c32938b7fd Revert "Un-fontlock sub/superscripts when point enters them"
This reverts commit 102832e66f.

See <https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=%2Bmessage-id%3A%3C87y3g43mjy.fsf%40nicolasgoaziou.fr%3E&submit=Search&idxname=emacs-orgmode>
2018-05-27 21:29:57 +01:00
Nicolas Goaziou c698c8e959 Fix tags completion
* lisp/org.el (org-tags-completion-function): Refactor function. Fix
  tag completion.

Reported-by: Alain.Cochard@unistra.fr
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00450.html>
2018-05-27 22:13:00 +02:00
Aaron Ecay 102832e66f Un-fontlock sub/superscripts when point enters them
* lisp/org.el (org-remove-font-lock-display-properties): Rename to
‘org-remove-font-lock-display-properties’.  It is a more
specific/accurate name.
(org-match-substring-with-braces-regexp):
(org-match-substring-regexp): Add a note to docstrings about what the
match groups are.
(org-raise-scripts--post-command-hook): New function, modeled on
‘prettify-symbols--post-command-hook’.
(org-raise-scripts): Use the above.

Inspired by
<https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=%2Bmessage-id%3A%3C518DCC34-E435-42F7-A15E-FAE7727033F8%40scratch.space%3E&submit=Search&idxname=emacs-orgmode>
2018-05-27 17:13:59 +01:00
Aaron Ecay 1117d65622 org.el: remove trailing whitespace 2018-05-27 16:58:39 +01:00
Nicolas Goaziou 2c5a8740ad Remove spurious colon in tags view
* lisp/org.el (org-scan-tags): Remove spurious colon in tags view.
  Small refactoring.

The regression was introduced in
be31a0c459.

Reported-by: Rainer Stengele <rainer.stengele@online.de>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00478.html>
2018-05-26 12:30:46 +02:00
Nicolas Goaziou 1cfd5d04e3 Fix a docstring
* lisp/org.el (org-store-link): Use "link" instead of puzzling
  "org-link".
2018-05-17 16:55:31 +02:00
Nicolas Goaziou 463664bdd0 Merge branch 'maint' 2018-05-16 22:07:33 +02:00
Nicolas Goaziou 2b26644b3a Fix `org-skip-over-state-notes'
* lisp/org.el (org-skip-over-state-notes): Allow empty TODO states.

Reported-by: Michael Brand <michael.ch.brand@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-05/msg00337.html>
2018-05-16 22:06:39 +02:00
Nicolas Goaziou 7143ae0355 Fix typo
* lisp/org.el (org-tag-alist): Fix typo in docstring.
2018-05-14 15:38:05 +02:00