* ox-latex.el (org-latex-text-markup-alist): Use \ul{...} for
underlining instead of \uline{...} as requiring the hyperref
package makes \uline{...} unusable on headline.
* org.el (org-latex-default-packages-alist): Add the "soul"
package.
Thanks to Konstantin Kliakhandler for reporting this.
* lisp/org.el (org-open-at-point): Correctly open fuzzy links when
path is hexified.
* testing/lisp/test-org.el (test-org/coderef): New test.
(test-org/fuzzy-links): Add test.
* org.el (org-refresh-properties): Don't add the property to
the whole subtree, only to the part between the beginning of
the headline and the end of the "content", before any other
headline. This fix a bug about properties displayed as
inherited in the agenda, where Org properties are checked
against text properties.
Thanks to Sébastien Vauban for reporting this.
* org-compat.el (org-move-to-column): Always ignore invisible
text in agenda buffer, and when there is both a bracket link
and '(org-link) as a member of `buffer-invisibility-spec'.
Add a docstring.
* org.el (org-align-tags-here): Add docstring and remove
useless arguments when calling `org-move-to-column'.
* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row):
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-todo)
(org-agenda-priority, org-agenda-show-new-time)
(org-agenda-clock-in, org-agenda-clock-out): Remove useless
arguments when calling `org-move-to-column'.
This fixes the issue about S-RET not placing the cursor in the right
table field when M-x org-toggle-link-display RET removed '(org-link)
from `buffer-invisibility-spec' and some other discrepancies (like
S-M-<up> not restoring point correctly when there is a bracket link
before point, or M-x org-clock-display RET not aligning overlays
correctly, etc.
Thanks to Matt Lundin and Michael Brand for tracking issues
about this.
* org.el (org-refile): Rename first argument to arg, as its
use goes beyond is now more general. Only keep bracket links
descriptions in the displayed heading. Enhance docstring.
* org.el (org-entry-get): Only try to combine file properties
with local properties when the property drawer contains such
local property, not when the property drawer exists.
Before the fix, `org-entry-get' behavior was inconsistent,
returning `nil' when looking for a property in a subtree with
no property drawer, and returning the global properties in a
subtree with a property drawer, independantly of whether this
property drawer contained a reference to the property we are checking
against or not.
As a side-effect, inheritance was broken for the case that
Ilya reported in commit 475f2f53, because `org-entry-get' returned
a value (with the global properties of the file) too early.
Thanks to Ilya for raising this bug and to Achim for pointing
out that the previous fix was wrong.
* org.el (org-store-link): Check `dired-mode' through
`derived-mode-p' to allow storing links from derived modes
like `sr-mode'.
Thanks to Thomas Holst for the idea.
* lisp/org.el (org-open-at-point): Unescape optional part in file
links.
This patch allows to handle properly links like:
[[file:somefile.org::*headline%20with%20spaces]]
Thanks to Thomas Holst for reporting it.
* lisp/org.el (org-entry-get-with-inheritance): Temporarily
let-bind `org-file-properties', `org-global-properties' and
`org-global-properties-fixed' to nil before calling `org-entry-get'
on entries up the hierarchy from the queried entry.
Problem was that when org-entry-get-with-inheritance went up the
hierarchy of entries from a given entry, checking whether the property
has been set in any of the entries, it was calling org-entry-get,
which always looks at file-scope and global-scope properties. So if
our property was set file-wide or system-wide, and somewhere up the
hierarchy there was an entry which set some properties _other_ than
the one we're looking up but did not set ours, org-entry-get would
fill in the global property value and report that our property was in
fact set in that entry. The search would stop, and if the property
was actually set further up the hierarchy (which should override
file-wide or system-wide settings), we would never get to that
up-the-hierarchy setting.
Illustration of fixed problem:
#+PROPERTY: myprop aaa
* headline A
:PROPERTIES:
:myprop: bbb
:END:
*** headline B
:PROPERTIES:
:otherprop: ccc
:END:
#+BEGIN_SRC emacs-lisp
(message (org-entry-get-with-inheritance "myprop"))
#+END_SRC
#+RESULTS:
: aaa
Result should be bbb, which it is after the fix.
* org.el (org-store-link): Fall back on an empty string when
no description is available.
This fixes a bug about tangling a source block outside of any
subtree when `org-id-link-to-org-use-id' is `t'.
Thanks to Sean Allred for reporting this.
* org.el (org-refresh-category-properties)
(org-complete-expand-structure-template)
(org-buffer-property-keys, org-context):
* org-mouse.el (org-mouse-context-menu):
* org-list.el (org-list-send-list):
* org-element.el (org-element--list-struct):
* org-archive.el (org-all-archive-files): Allow spaces before
any option keyword.
* org.el (org-fontify-meta-lines-and-blocks-1): Fix
fontification of all option keywords.
Thanks to Alan Schmitt for raising the problem with fontification.
* lisp/org-archive.el (org-get-local-archive-location): Ignore
identation for ARCHIVE keywords.
* lisp/org-colview.el (org-columns-store-format): Ignore indentation
for COLUMNS keywords.
* lisp/org.el (org-mode): Keywords can start at any column.
(org-reftex-citation): Ignore indentation for BIBLIOGRAPHY keywords.
(org-make-options-regexp): Ignore indentation for all keywords.
* org.el (org-delete-property): Don't suggest to delete the
CATEGORY property when the category is not explicitely set in
the property drawer. Also enforce matching when completing.
Thanks to Oleh for providing a preliminary patch for this.
* org.el (org-insert-heading): Fix regression: with two
universal prefixes, insert heading at the end of the subtree.
(org-insert-todo-heading): Bugfix: only enforce the first TODO
state when arg is '(4).
* lisp/org-capture.el (org-capture-goto-last-stored): Use
`org-bookmark-names-plist'.
* lisp/org.el (org-refile-goto-last-stored): Use
`org-bookmark-names-plist'.
* lisp/org.el (org-open-at-point): Open "docview"-type links
correctly, i.e., without adding "file+" first.
(org-open-file-with-system, org-open-file-with-emacs): Change
signature. Deprecate functions.
* lisp/org-docview.el (org-docview-open): Open file even when no file
number is specified.
This change removes "file+emacs" and "file+sys" types from
`org-link-protocols', since they are not hard-coded in
`org-open-at-point'.
* org.el (org-emphasis-alist): Use `org-verbatim' for =text=
and `org-code' for ~text~.
* org.texi (Emphasis and monospace): Document the use of
=verbatim= and ~code~ to be consistent with
`org-element-text-markup-successor'.
Thanks to Yasushi for reporting this.
* lisp/org.el (org-open-at-point): White spaces after an object are
usually ignored by the function. Though, when point is right after
the object, still activate it.
* testing/lisp/test-org.el (test-org/custom-id): Fix test.
* lisp/org.el (org-open-at-point): On an unsupported object nested
within another object, try to open the parent object.
This should correctly open the following link, with point on the
verbatim object:
[[http://orgmode.org][=verbatim=]]
* lisp/org.el (org-open-at-point): Do not do anything when point is on
white spaces after an object.
* testing/lisp/test-org.el (test-org/custom-id): Modify test.
* lisp/org.el (org-open-at-point): Allow options when using
applications in links with options.
(org-open-file-with-system, org-open-file-with-emacs): Change
signature to be compatible with `org-open-file'
* lisp/org.el (org-open-at-point): Rewrite function using Element
parser.
(org-link-types): Add "help" type.
* testing/lisp/test-org-open-at-point.el: Remove file. Two tests are
not supported anymore (namely bracket-link-before and
plain-link-before) and the other tests are wrong (mixing id and
custom-id links).
* testing/examples/open-at-point.org: Remove file.
* testing/lisp/test-org.el (test-org/custom-id): Add test.
Unlike to the previous implementation, this one will only open links
under point or just before point, not links on the same line but
before point.
* lisp/org.el (org-link-escape-chars): Extend docstring.
(org-link-escape-chars-browser): Mention in docstring that it will
become a candidate for removal.
(org-link-escape-browser): Mention in docstring that it will become a
candidate for removal.
(org-open-at-point): Move `url-encode-url' and comments into
`org-link-escape-browser'.
* lisp/ox-html.el (org-html-link): Make use of
`org-link-escape-browser' like `org-open-at-point'.
* testing/lisp/test-org.el (test-org/org-link-escape-chars-browser):
Mention in docstring that it will become a candidate for removal.
* lisp/org.el (org-toggle-fixed-width): New function.
* testing/lisp/test-org.el (test-org/toggle-fixed-with): New test.
This replaces the old implementation removed in commit
6a00c96541.
* lisp/org.el (org-hide-macro-markers): new option
(org-fontify-macros): new function
(org-set-font-lock-defaults): call `org-fontify-macros'
* doc/org.texi: Document user option `org-hide-macro-markers'
TINYCHANGE
* org.el (org-provide-todo-statistics): Allow to set to a list
of two lists, one with TODO keywords, the other one with DONE
keywords.
(org-update-parent-todo-statistics): Correctly handle
`org-provide-todo-statistics' when it is set as a list of two
lists, for TODO and DONE keywords.
Thanks to Fletcher Charest for reporting this and requesting
this feature.
* org.el (org-insert-all-links): New parameters `pre' and
`post' to specify a string to preprend and append.
(org-insert-last-stored-link): New command.
(org-mode-map): Bind the new command to `C-c M-l'.
Thanks to Sébastien Vauban for requesting this and to Nick
Dokos for testing and fixing the patch.
* org.el (org-outline-overlay-data): Set the insertion-type of end
bound marker of the function to t (means marker advances when you
insert text at it)
This is to conserve outline visibility property when changes are made
at the end bound of the data.
For example: try `org-babel-execute-subtree' on a folded outline:
The new result will be shown after the folded part of the outline
whereas the outline body should not be visible.
TINYCHANGE
* org.el (org-demote): Ignore invisible text when aligning
tags.
(org-set-tags): When JUST-ALIGN is 'ignore-column, ignore
invisible text when restoring the cursor to the correct
column.
This fixes a bug about demoting hidden headlines.
If org-move-to-column temporarily ignore visibility
specs, this will prevent org-demote to work correctly
in hidden regions.
Thanks to Susan Cragin for reporting this bug.
* lisp/org.el (org-toggle-item): Do not call `org-list-struct' twice
and fix checkboxes after modifying one of them.
This patch is relative to 213c2a6aa0.
* lisp/org.el (org-match-substring-regexp): Simplify syntax when not
using braces. Also make the variable a defconst.
(org-match-substring-with-braces-regexp): Make the variable a defconst
and remove a useless group in regexp.
* lisp/org-element.el (org-element-subscript-parser,
org-element-superscript-parser): Adapt to group changes.
* lisp/org.el (org-get-previous-line-level): Do not call
`org-current-level' twice unless necessary. Also, avoid using
`line-number-at-pos' when the information needed is to know if point
is in the first line of the visible part of the buffer.
* org.el (org-refile-get-location): Check for a refile
position when the position is not nil, otherwise allow to
create the parent node if the user requests it.
Thanks to Li Zhuo for reporting this bug and for providing
a preliminary patch.
* org.el (org-shiftcontrolup, org-shiftcontroldown): When
`org-support-shift-select' is not `nil', let-bind it to nil
if point is on a clock log. Otherwise throw an error.
* org.el (org-do-emphasis-faces): Handle false positives by
restarting the re-search one char after the beginning of the
match, not one char before its ending.
Before this fix, consider this buffer
** Headline
- *Bold* non-bold
- *Bold* non-bold
The first false positive is "** Headline\n - *Bold*"
Starting the search again from the last "*" will skip
the "*Bold*" string. Starting again at "* Headline" will
find it.
* lisp/org.el (org-set-font-lock-defaults): use a shy regex for
identifying macros to fontify
Before this change, the xxx in the following text would be erroneously
fontified with the macro face:
{{{macro1()}}} xxx {{{macro2()}}}
* org.el (org-self-insert-command)
(orgtbl-self-insert-command): Change the value of the
`delete-selection' property to allow other commands like
`electric-pair-will-use-region' to be run before deletion.
Thanks to Harald Hanche-Olsen for reporting this.
* org.el (org-babel-do-in-edit-buffer): Declare.
(org-babel-load-file, org-insert-comment)
(org-comment-or-uncomment-region): Don't require 'ob-core.
(org-mode-map): Remap `comment-dwim' to `org-comment-dwim'.
(org-comment-dwim): New command.
* ob-core.el (org-babel-do-in-edit-buffer): Make an autoload.
See http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00154.html
for a discussion about this bug.
* lisp/org.el (org-ctrl-c-ctrl-c): When point is on an unsupported
object, look for something to do at a higher level instead of
bailing out.
For example, C-c C-c should toggle checkbox in the following example
even though X point is technically on a subscript.
- [ ] a_Xb
* lisp/org.el (org-mode-restart): Check for derived-mode-p instead of
"org-mode" exactly. This covers a situation normal-mode already
instantiates a derived mode (e.g. via file local variables).
* lisp/org.el (org-mode-restart): Call normal-mode,
instead of org-mode. This will set the mode but it
will also set file local variables properly.
Reported by Tom Dye: C-c C-c on e.g an #+OPTIONS line
would lose file local variable settings.
The original fix (commit 5ea0228) was incorrect: if the
local variable was a mode setting, then we ended up in an
"infinite" recursion. Problem found, reported and a reproducer
provided by York Zhao.
* lisp/org.el (org-mode-flyspell-verify): Rewrite function using
Org parser. As a consequence, Org is more cautious about areas
where checks are allowed.
(org-fontify-meta-lines-and-blocks-1, org-activate-footnote-links): Be
subtler when removing flyspell overlays.
(org-unfontify-region): Remove reference to unused `org-no-flyspell'
property.
(org-fontify-drawers): New function.
(org-set-font-lock-defaults): Use new function to fontify drawers.
* contrib/lisp/org-wikinodes.el (org-wikinodes-activate-links): Remove
reference to unused `org-no-flyspell' property.
* lisp/org.el (org-entry-get): Widen buffer in order to retrieve
properties, as `org-entry-properties' and
`org-entry-get-with-inheritance' already do.
* lisp/org.el (org-entry-get): Widen buffer in order to retrieve
a property, as both `org-entry-properties' and
`org-entry-get-with-inheritance' already do.
* lisp/org.el (org-mode): Call `hack-local-variables'
at the end of `org-mode' to set file local variables.
Cribbed from `normal-mode'.
Reported by Tom Dye: C-c C-c on e.g an #+OPTIONS line
would lose file local variable settings.
* lisp/org.el (org-clock-string, org-closed-string)
(org-deadline-string, org-scheduled-string)
(org-archive-tag, org-comment-string, org-quote-string)
(org-effort-property, org-latex-regexps): Turn variables into
constants.
* testing/lisp/test-org-element.el: Update tests.
* testing/lisp/test-ox.el: Update tests.
Also collect all syntax related constants in the same part of the
file.
* lisp/ob-C.el, lisp/ob-clojure.e: Require 'cl at compile-time.
* lisp/ob-tangle.el: Do not require 'cl at compile time.
* lisp/org-agenda.el: Declare function `org-columns-remove-overlays´.
* lisp/org.el: Declare functions `org-clocktable-shift´,
`org-clock-update-time-maybe´, `org-clock-remove-overlays´,
`org-babel-tangle-file´, `org-table-blank-field´,
`org-table-insert-row´, `org-add-archive-files´, `org-table-begin´,
`org-table-end´. Move defsubst `org-uniquify´ before its many uses.
* lisp/ox.el: Move defsubst `org-export-get-parent´ before its many
uses.
* org-macs.el (org-autoload): Delete.
* org-docview.el ("docview"): Fix declarations and require
doc-view directly.
* org-id.el (org-id-copy)
(org-id-get-with-outline-path-completion)
(org-id-get-with-outline-drilling, org-id-new):
* org-colview.el:
(org-colview-initial-truncate-line-value)
(org-columns-open-link, org-string-to-number):
* org-clock.el:
(org-clock-put-overlay, org-count-quarter, org-clock-loaded):
* org-archive.el (org-get-local-archive-location):
* org-agenda.el (org-agenda-todo-custom-ignore-p):
Autoload.
Those functions were autoloaded from within calls to `org-autoload'
in org.el, we now autoload them from where they live.