* org.el (org-check-before-invisible-edit): Don't just cycle,
show the subtree, as cycling may leave the current heading
folded.
Thanks to Paul Stansell for reporting this.
* lisp/org-element.el (org-element-cache-refresh): New function.
* lisp/org.el (org-update-radio-target-regexp): Make it standalone.
Also refresh fontification only when necessary.
(org-all-targets, org-make-target-link-regexp): Remove functions.
* testing/lisp/test-org.el (test-org/update-radio-target-regexp): New
test
(test-org/all-targets): Remove test.
We need to manually reset cache on radio links as re-fontification
doesn't trigger a buffer change, and, as a consequence, a cache reset.
* org.el (org-trim): Rewrite and make a defsubst.
* org-bibtex.el (org-bibtex-get): Use `org-trim' instead of
`org-babel-trim'.
* ob-core.el (org-babel-trim): Delete and alias to `org-trim'.
(org-babel-chomp): Delete and alias to `org-trim-trailing'.
(org-trim-trailing): New defsubst.
(org-babel-examplize-region): Fix version.
* lisp/org.el (org-link-mailto-program): Remove variable.
(org-open-at-point): Delegate "mailto" links handling to `browse-url'
and `browse-url-mailto-function'.
This patch allows to use regular URI syntax and deprecates old Org
specific syntax: mailto:user@domain::Title.
http://permalink.gmane.org/gmane.emacs.orgmode/85007
* org.el (org-update-dblock): Use `save-excursion' instead of
`save-window-excursion' so that blocks can edit other windows and
change the window layout.
Thanks to Martin for reporting this.
* org-clock.el (org-clocktable-write-default): New parameter
":sort" to sort a column by a sorting type. E.g., a value of
:sort (1 . ?a) will sort the first column alphabetically. The
sorting line is the third one, table-wise, which is usually
the first line that contains user data.
* org.texi (The clock table): Document the new :sort
parameter.
* org.el (org-do-sort): Recognize [H]H:MM strings as time
values and allow sort-by-time to process them.
* org-table.el (org-table-sort-lines): Mention that sorting by
time also recognize [H]H:MM time values.
* lisp/org.el (org-make-target-link-regexp): Change regexp so
alphanumeric characters cannot be found next to a radio link.
(org-activate-target-links): Apply changes to radio link regexp.
* lisp/org-element.el (org-element--object-lex,
org-element-link-parser): Apply changes to radio link regexp.
* testing/lisp/test-org-element.el (test-org-element/link-parser):
Update test.
Patch suggested by Daniel Clemente.
http://permalink.gmane.org/gmane.emacs.orgmode/84461
* lisp/org-agenda.el (org-refile): Flip logic to allow instead of
prohibit the use of `org-refile' with the goto flat from non
org-mode buffers.
In commit 49da67d the condition was changed from only
`(unless goto ...)` to `(unless (and goto (listp arg)) ...)`
where the `and` condition is only true for non-empty lists, so that
calling `(org-refile t)` complains about not being inside an org-mode
buffer.
With this patch org-refile can be used (again) from anywhere when
passed the goto flag to jump to the chosen task.
TINYCHANGE
* lisp/org.el (org-make-link-regexps): Allow optional double slashes
after type. Small refactoring.
* testing/lisp/test-org-element.el (test-org-element/link-parser):
Update test.
This patch allows to write both [[file:/file.org]] and [[file:///file.org]].
See bug#16751.
* lisp/org.el (org-set-font-lock-defaults): Fix headline fontification
when keywords are stacked.
(org-toggle-comment): Properly toggle COMMENT keyword when a regular
keyword is already present.
(org-todo, org-agenda-prepare-buffers): Correctly match a commented
heading.
* lisp/org-colview.el (org-columns-capture-view): Correctly match
a commented heading.
* testing/lisp/test-org.el (test-org/toggle-comment): New test.
* lisp/org.el (org-radio-target-regexp): Radio targets cannot begin or
end with whitespace.
(org-target-regexp): Update syntax according to previous rule.
(org-any-target-regexp): Fix fontification bug.
* testing/lisp/test-org-element.el (test-org-element/radio-target-parser):
Add test.
Variables are turned into defconst to emphasize the fact that they are
not subject to change.
Thanks to Daniel Clemente for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84461
* lisp/org.el (org-make-target-link-regexp): Allow radio links after
an apostrophe and mid-word. Small refactoring.
* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add
test.
See http://permalink.gmane.org/gmane.emacs.orgmode/84108.
* lisp/org.el (org-in-commented-heading-p): New function.
* lisp/ob-tangle.el (org-babel-under-commented-heading-p): Remove
function.
(org-babel-tangle-collect-blocks): Use new function.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Use new function.
* testing/lisp/test-org.el (test-org/in-commented-heading-p): New
test.
* lisp/org-element.el (org-element-all-successors,
org-element-object-restrictions): Prioritize `link' over other
successors in order to find radio links starting with another syntax
object (e.g., an entity). Also allow text markup within radio
targets.
(org-element-link-parser): Add contents to radio targets.
* lisp/org.el (org-make-target-link-regexp): Fix regexp so it can
match targets starting with an Org object (e.g., an entity).
(org-ctrl-c-ctrl-c): Fix function when applied on an object contained
within a radio target.
* testing/lisp/test-org-element.el (test-org-element/radio-target-parser): Add test.
* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add test.
* lisp/org.el (org-mode): Change "\" and "~" characters syntax from
`punctuation' to `symbol' so they are on par with other characters used
in Org syntax (e.g., "/", "*"...).
This change is needed to correctly find radio links starting with an
entity:
<<<\alpha-test>>> \alpha-test
* 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