* lisp/org.el (org-open-at-point): Don't forceably try ot open
attachments.
This commit fixes a bug: when trying to open links in a subtree with
no attachments, `org-open-at-point' would create an ID property with
no apparent reason.
* lisp/org-compat.el (org-file-properties): Prevent error at build
time about creating an alias for a local variable.
* lisp/org.el (org-keyword-properties): Slight change to docstring.
* lisp/org.el (org-fontify-todo-headline): Add new boolean customization to
toggle this behavior.
* lisp/org.el (org-set-font-lock-defaults): Apply face org-headline-todo to
lines starting with keywords in org-not-done-keywords.
* lisp/org-faces (org-headline-todo): New face.
TINYCHANGE
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Enhance regex
for finding the end of blocks (i.e., `beg-of-endline') to detect
headlines (i.e., (rx bol (one-or-more "*") space) so that fontification
matches the behavior of org mode (i.e., that headlines are healines,
even in vertabim).
This change aligns the behavior and the visual appearance of verbatim
blocks that contain headlines. When `font-lock-mode' is enabled this
change makes situations like those in (info "(org) Literal Examples")
literally jump off the page.
Overview of new fontification
Source | fontification before | fontification after |
\#+BEGIN_EXAMPLE | org-block-begin-line | org-block-begin-line |
I look verbatim! | org-block | org-block |
* Org headers in | org-block | org-level-1 |
verbatim blocks | org-block | nil |
** highly accordingly | org-block | org-level-2 |
\#+END_EXAMPLE | org-block-end-line | org-meta-line |
This commit also makes some improvements to the reability of
org-fontify-meta-lines-and-blocks-1.
1. Use the `rx' macro for better readability. Note that the strings
below return with literal tabs when using `rx'. Expansion included for
reference here.
Begin regex.
old: "^\\([ \t]*#\\(\\(\\+[a-zA-Z]+:?\\| \\|$\\)\\(_\\([a-zA-Z]+\\)\\)?\\)[ \t]*\\(\\([^ \t\n]*\\)[ \t]*\\(.*\\)\\)\\)"
new: "^\\([[:blank:]]*#\\(\\(\\+[A-Za-z]+:?\\|[[:space:]]\\|$\\)\\(_\\([A-Za-z]+\\)\\)?\\)[[:blank:]]*\\(\\([^ \n ]*\\)[[:blank:]]*\\(.*\\)\\)\\)"
End regex. Note match-string call is stringified for documentation here.
old: (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*")
new: "\\(?:\\(^\\(?:\\*+[[:space:]]\\|[[:blank:]]*#\\+end(match-string 4)\\>.*\\)\\)\\)"
Caption regex:
old: "\\([ \t]*#\\+caption\\(?:\\[.*\\]\\)?:\\)[ \t]*"
new: "\\([[:blank:]]*#\\+caption\\(?:\\[.*]\\)?:\\)[[:blank:]]*"
2. Refactor fontification of #+end blocks for readability and to reduce
the number of calls to point-max to one per branch.
TINYCHANGE
* lisp/org.el (org-create-formula-image): Ensure user input ends
with a % character to remove trailing whitespace. Also, add %
characters between macros and newlines purely visual.
TINYCHANGE
* lisp/org-agenda.el (org-agenda-filter): Fix unescaped literal ‘+’ in
regexp. Reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00215.html
* lisp/org.el (org-clone-subtree-with-time-shift): Fix a regexp typo
that mishandled strings like ‘\1d’, reported by the same email.
2019-12-05 regexp lint fixes
4c933077157ba409d645f4649c8a3a8e534d53d5
Paul Eggert
Thu Dec 5 19:32:12 2019 -0800
* lisp/org.el (org-mode): Add pcomplete-completions-at-point to capf.
This lets the normal `completion-at-point` and `complete-symbol`
use `pcomplete` for completion.
(org-mode-map): Leave M-TAB bound to the global default since
`pcomplete` is now obsolete.
5bc97ebceb54e0eb2804bef4c1bc32a40d8a2371
Stefan Monnier
Mon Nov 18 17:47:06 2019 -0500
A bug was squashed where newlines after insertion of document property
drawers wasn't handled correctly.
* testing/lisp/test-org.el (test-org/insert-property-drawer):
Add test to verify that the document property drawer is
inserted above keyword lines. Also fix the specification for
document property drawer so it doesn't remove existing blank
rows if inserted at the top of a buffer.
* lisp/org.el (org-insert-property-drawer): Make sure to add
newline after document property drawers.
* lisp/org.el (org-display-inline-images): Introduce error-handling to
ignore image display if the attachment link cannot be expanded for
whatever reason. For example if attachments are relative to the
buffer, but the buffer is temporary and lacks filesystem location.
Add functionality to define property-blocks on document level, in
addition to at headline level.
* doc/org-manual.org:
* etc/ORG-NEWS: Document new functionality.
* lisp/org.el (org-keyword-regexp): Define constant instead of
hardcoding.
(org-file-properties): Renamed, see next line.
(org-keyword-properties): Renamed from above. Due to the fact that
properties can be defined for the whole document using property
drawers this local variable needs a rename to make its name less
ambigous.
(org-refresh-properties, org-refresh-property, org-entry-properties)
(org-refresh-category-properties, org-get-property-block)
(org-entry-get-with-inheritance, org-entry-put)
(org-insert-property-drawer, org-end-of-subtree): Made to work before
first headline.
(org-at-property-block-p): New function to validate if point is at the
start of a property block.
(org-property-global-value): Renamed, see next line.
(org-property-global-or-keyword-value): Renamed from above to match
its functionality better.
(org-back-to-heading-or-point-min): New function to make a document
work as a level 0 node in the outline.
(org-at-keyword-p): Predicate function to answer to if we're currently
at a keyword line or not.
(org-up-heading-or-point-min): New function to make a document work as
a level 0 node in the outline.
* lisp/org-element.el (org-element--current-element): Can now detect
property-blocks before first headline according to it's positional
rules.
* lisp/org-attach.el (org-attach): Make it possible to call the
attachment dispatcher also before the first headline, since document
property drawers make attachments possible for the whole document
now.
* lisp/org-capture.el: Modified only due to rename of function in
org.el.
* lisp/org-compat.el (org-file-properties)
(org-property-global-value): Renamed functions declared obsolete.
* testing/lisp/test-org.el (org/insert-property-drawer)
(org/set-property, org/delete-property, org/delete-property-globally):
Additions of tests to check if they work before first headline.
(org/at-property-p, org/at-property-block-p, org/get-property-block)
(org/entry-get, org/refresh-properties): New tests
* testing/examples/property-inheritance.org: Switch from
property-keywords to a property-drawer in the testfile.
Functionality should be the same, but now using a document drawer
instead of property-keywords.
Reason for switching is that I'd like us to slowly depricate
property-keywords.
* testing/lisp/test-org-element.el:
* contrib/lisp/ox-taskjuggler.el: A comment is modified only due to
rename of function in org.el.
* 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).
* 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
* 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.
* 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).
* 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.
* 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
* 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.
* 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.
* 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.
* 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.
* 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'.
* 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).
* 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.
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
* 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
* 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>
* 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.
* 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.
* 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
* 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
* 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
* 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.
<<<天空>>>
我爱天空和大地
^^^^
* 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>
* 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.
* 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>
* 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.
* 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.
* 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>
* 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>
* 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
* 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.
* 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.
* 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>.
* 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>.
* 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.
* 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.
* 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.
* 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.
* 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>
* 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>
* 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>
* 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>
* 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>
* 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.