Commit Graph

3263 Commits

Author SHA1 Message Date
Bastien Guerry 675e8b2b86 org.el (org-insert-heading): Fix code typo
* org.el (org-insert-heading): Fix code typo.

Thanks to Thorsten Jolitz for reporting this and to Nicolas Richard
for his comments.
2014-04-16 18:28:26 +02:00
Bastien Guerry 132da2db35 Let sort-by-time handle [H]H:MM strings and add a :sort parameter for clocktables
* 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.
2014-04-16 18:23:47 +02:00
Bastien Guerry 6ff38b1f6d org.el (org-create-dblock): Tiny docstring fix
* org.el (org-create-dblock): Tiny docstring fix.
2014-04-16 17:49:19 +02:00
Bastien Guerry d1600af7b6 org.el (org-cycle): Try `org-try-cdlatex-tab' before trying to edit/move as in a table
* org.el (org-cycle): Try `org-try-cdlatex-tab' before trying
to edit/move as in a table.

Thanks to Konstantin Kliakhandler for reporting this.
2014-04-16 17:25:08 +02:00
Nicolas Goaziou c4f7880429 Fix fontification of radio links
* lisp/org.el (org-set-font-lock-defaults): Fix fontification of radio
  links.

Thanks to Daniel Clemente for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84927
2014-04-15 20:01:16 +02:00
Bastien Guerry e24f336cd3 Merge branch 'master' of orgmode.org:org-mode 2014-04-11 21:33:08 +02:00
Nicolas Goaziou 7c82e6ac19 No alphanumeric characters around radio links
* 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
2014-04-11 21:30:15 +02:00
Bastien Guerry eb0b98d91f Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-04-11 12:22:48 +02:00
Markus Hauck faa1703b8f org.el (org-refile): Allow org-refile goto from everywhere
* 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
2014-04-11 11:59:43 +02:00
Sacha Chua d6a38604e6 org.el (org-refresh-properties): Don't throw an error when reaching the end of the buffer
* org.el (org-refresh-properties): Don't throw an error when
reaching the end of the buffer.
2014-04-11 11:28:45 +02:00
Nicolas Goaziou 37e3c112dd Merge branch 'maint' 2014-04-10 23:01:20 +02:00
Nicolas Goaziou 3589f64e42 Make Org links compatible with URI syntax
* 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.
2014-04-10 22:57:05 +02:00
Nicolas Goaziou fea23d3da2 Fix COMMENT keyword when stacked with a regular keyword
* 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.
2014-04-10 22:51:16 +02:00
Nicolas Goaziou a36dde7c68 Merge branch 'maint' 2014-04-05 09:51:36 +02:00
Nicolas Goaziou 7de492a0c4 Update docstrings
* lisp/org.el (org-latex-packages-alist,
  org-latex-default-packages-alist): Update docstrings.
2014-04-05 09:50:20 +02:00
Nicolas Goaziou 23e62f7527 Radio targets cannot beging or end with whitespace
* 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
2014-04-02 14:54:37 +02:00
Nicolas Goaziou 938e1ef3bf Fix `org-in-commented-heading-p'
* lisp/org.el (org-in-commented-heading-p): Fix recursive call.

http://permalink.gmane.org/gmane.emacs.orgmode/84294
2014-03-27 16:13:58 +01:00
Nicolas Goaziou 1c1936fbb1 Allow radio links after an apostrophe and mid-word
* 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.
2014-03-25 10:21:26 +01:00
Nicolas Goaziou 6d1d61f667 Rename `org-babel-under-commented-heading-p'
* 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.
2014-03-24 13:29:42 -04:00
Nicolas Goaziou 230d09aeb0 Merge branch 'maint' 2014-03-24 14:20:23 +01:00
Nicolas Goaziou 8212776cfc Fix radio target parsing
* 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.
2014-03-24 14:13:24 +01:00
Nicolas Goaziou 955d9d8a78 Change "\" and "~" syntax to symbol
* 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
2014-03-24 14:13:24 +01:00
Nicolas Goaziou 9665f83f7b Merge branch 'maint' 2014-03-22 15:16:44 +01:00
Nicolas Goaziou 95eeefa9bc Revert "LaTeX: Use \ul (from the "soul" package) instead of \uline"
This reverts commit b399ff0cba.
2014-03-22 15:15:35 +01:00
Bastien Guerry 368aa1078f Merge branch 'maint' 2014-03-22 00:28:30 +01:00
Bastien Guerry b399ff0cba LaTeX: Use \ul (from the "soul" package) instead of \uline
* 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.
2014-03-22 00:27:34 +01:00
Nicolas Goaziou d6d1f25429 Fix `org-open-at-point'
* 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.
2014-03-21 14:51:34 +01:00
Bastien Guerry 83a55c6f5b Merge branch 'maint' 2014-03-21 12:51:16 +01:00
Bastien Guerry 5a195423d3 org.el (org-refresh-properties): Bugfix
* 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.
2014-03-21 12:51:04 +01:00
Bastien Guerry 613333d665 Merge branch 'maint' 2014-03-20 15:07:11 +01:00
Bastien Guerry a3ec854cab Fix bugs wrt invisibility handline.
* 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.
2014-03-20 15:04:49 +01:00
Bastien Guerry 932b41e973 org.el (org-refile): Only keep bracket links descriptions in the displayed heading
* 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.
2014-03-19 16:22:46 +01:00
Bastien Guerry 5590531007 Merge branch 'maint' 2014-03-19 16:13:43 +01:00
Bastien Guerry 49da67d351 org.el (org-refile): Fix C-u 3 C-c C-w
* org.el (org-refile): Fix calling with a numeric prefix
argument of 3 to refile and keep.
2014-03-19 16:13:33 +01:00
Bastien Guerry 2cd15b9c7c org.el (org-refile): Minor docstring enhancement
* org.el (org-refile): Minor docstring enhancement.
2014-03-19 15:47:20 +01:00
Bastien Guerry 88d151b05b Merge branch 'maint' 2014-03-19 09:31:23 +01:00
Nikolai Weibull 2d09804e19 org.el: Only set org-hide foreground if one is available
* org.el (org-mode): Add guard around set-face-foreground.

TINYCHANGE
2014-03-19 09:31:11 +01:00
Bastien Guerry 040ec48a0d Merge branch 'maint' 2014-03-18 16:25:55 +01:00
Bastien Guerry 922135a4a6 org.el (org-entry-get-with-inheritance): Remove wrong quote
* org.el (org-entry-get-with-inheritance): Remove wrong quote.
2014-03-18 16:25:12 +01:00
Bastien Guerry cdb16718c0 Merge branch 'maint' 2014-03-18 14:50:42 +01:00
Bastien Guerry 42ee862d33 org.el (org-entry-get): Fix inheritance problem
* 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.
2014-03-18 14:47:09 +01:00
Bastien Guerry 6e0e76308c Merge branch 'maint' 2014-03-17 21:22:20 +01:00
Bastien Guerry 3074d081e7 Revert "Properties: Fix property-getting with inheritance"
This reverts commit 475f2f5388.
2014-03-17 21:22:04 +01:00
Bastien Guerry da13eea415 Merge branch 'maint' 2014-03-17 02:19:37 +01:00
Bastien Guerry 28a9e35ddb org.el (org-do-emphasis-faces): Explicitly prevent nested emphasis
* org.el (org-do-emphasis-faces): Explicitly prevent nested
emphasis.

Thanks to Sébastien Vauban for reporting this.
2014-03-17 02:19:27 +01:00
Bastien Guerry 5f2dced185 org.el (org-store-link): Allow to create links from sr-mode
* 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.
2014-03-17 01:56:59 +01:00
Bastien Guerry 5289825cb2 Merge branch 'maint' 2014-03-17 01:42:42 +01:00
Bastien Guerry afffe03dcf org.el (org-insert-heading): Don't remove whitespaces following an empty headline
* org.el (org-insert-heading): Don't remove whitespaces
following an empty headline.

Thanks to Brady Trainor for reporting this.
2014-03-17 01:41:42 +01:00
Nicolas Goaziou ee8d564479 Properly unescape optional part in file links
* 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.
2014-03-15 16:04:38 +01:00
Bastien Guerry e75d2031bc Merge branch 'maint' 2014-03-14 12:07:06 +01:00
Ilya Shlyakhter 475f2f5388 Properties: Fix property-getting with inheritance
* 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.
2014-03-14 12:02:11 +01:00
Oleh Krehel c1d5a0ae05 org.el (org-delete-property): Fix bug
* lisp/org.el (org-delete-property): `org-entry-delete' takes 2 args
  but was called with 3.
2014-03-13 21:51:50 +01:00
Bastien Guerry cec03f07b9 Merge branch 'maint' 2014-03-13 16:28:01 +01:00
Bastien Guerry 0cf58595d7 org.el (org-store-link): Fix bugs
* org.el (org-store-link): Ensure desc is not nil before
matching a regexp against it.
2014-03-13 16:27:51 +01:00
Nicolas Richard 700d58230b org.el (org-version): Obey all arguments in non-interactive uses
* org.el (org-version): Obey all arguments in non-interactive uses.
2014-03-13 16:00:45 +01:00
Bastien Guerry f4b0fb3dee Merge branch 'maint' 2014-03-13 15:50:35 +01:00
Bastien Guerry 7f65ba52ee org.el (org-store-link): Bugfix
* 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.
2014-03-13 15:50:16 +01:00
Bastien Guerry 25f47777ef Complete commit 07158e
* 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.
2014-03-13 11:28:07 +01:00
Nicolas Goaziou 07158efa53 Ignore indentation for all keywords
* 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.
2014-03-12 21:30:13 +01:00
Bastien Guerry 4d835d719d Merge branch 'maint'
Conflicts:
	lisp/org.el
2014-03-12 19:14:03 +01:00
Bastien Guerry b28ebdf3f1 org.el (org-delete-property): Don't suggest to delete the CATEGORY property
* 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.
2014-03-12 18:41:01 +01:00
Bastien Guerry 250abf061b Bugfixes wrt inserting headings.
* 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).
2014-03-12 17:51:18 +01:00
Bastien Guerry bff69f97f3 org.el (org-contextualize-validate-key): Bugfix
* org.el (org-contextualize-validate-key): Fix bug: perform
the check even when (buffer-file-name) returns `nil'.
2014-03-12 11:57:38 +01:00
Oleh Krehel 367780d133 Enforce `org-bookmark-names-plist'
* 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'.
2014-03-07 14:09:16 +01:00
Bastien Guerry 080f1dd5af Merge branch 'maint' 2014-03-05 15:47:55 +01:00
Nicolas Goaziou 51718d9674 Fix last commit
* lisp/org.el (org-link-types): Hardcode "file+emacs" and "file+sys".
2014-03-05 14:59:12 +01:00
Nicolas Goaziou 2891ef7f87 Fix `org-open-at-point' on "docview"-type links
* 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'.
2014-03-05 11:39:48 +01:00
Bastien Guerry adbb2f7c9f Fix doc and code inconsistency: now use =verbatim= and ~code~.
* 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.
2014-03-04 10:49:49 +01:00
Nicolas Goaziou 567ec8791a Unescape links before opening them
* lisp/org.el (org-open-at-point): Unescape links before opening
  them.  This bug was introduced in
  fc9ce86cfc.
2014-03-03 15:55:26 +01:00
Bastien Guerry 7097566dfb org.el (org-link-prettify): Docstring cleanup
* org.el (org-link-prettify): Docstring cleanup.
2014-03-03 13:31:24 +01:00
Nicolas Goaziou d75fa9febc `org-open-at-point' right after an object still open it
* 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.
2014-03-02 10:32:51 +01:00
Nicolas Goaziou 3917776995 Fix `org-open-at-point' in comments
* lisp/org.el (org-open-at-point): Return an error in comments, as
  there are no link to be found.
2014-03-01 22:38:46 +01:00
Bastien Guerry ce8081f7c1 Merge branch 'maint' 2014-03-01 21:48:11 +01:00
Bastien Guerry dd810b609b org.el (org-open-link-marker): Fix typo in docstring
* org.el (org-open-link-marker): Fix typo in docstring.
2014-03-01 21:47:30 +01:00
Nicolas Goaziou 971dc41ce8 Tiny fixes
* lisp/org.el (org-open-at-point): Tiny fixes.
2014-02-28 21:33:18 +01:00
Nicolas Goaziou c2f4803cbd Small docstring update
* lisp/org.el (org-open-at-point): Update documentation.
2014-02-28 18:07:38 +01:00
Nicolas Goaziou 27fd4d2141 Fix `org-open-at-point' on tags
* lisp/org.el (org-open-at-point): Fix behaviour on tags.  Small
  refactoring.
2014-02-28 18:07:38 +01:00
Nicolas Goaziou bd9e0ad63d Fix `org-open-at-point' on nested objects
* 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=]]
2014-02-27 20:54:46 +01:00
Nicolas Goaziou 5dd8058c0c Change `org-open-at-point' behaviour in footnote definitions
* lisp/org.el (org-open-at-point): In a footnote definition, return to
  footnote reference only when point is on the footnote label.
2014-02-27 18:38:49 +01:00
Nicolas Goaziou 8b2d3645ac Ignore `org-open-at-point' when point is on white spaces
* 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.
2014-02-27 18:38:39 +01:00
Nicolas Goaziou dddebc26c8 Revert "Fix `org-open-at-point' on planning lines"
This reverts commit 66f3ba38c2.
2014-02-25 20:56:52 +01:00
Nicolas Goaziou 66f3ba38c2 Fix `org-open-at-point' on planning lines
* lisp/org.el (org-open-at-point): Open timestamps on planning
  lines.  This is a regression introduced in fc9ce8.
2014-02-25 17:49:22 +01:00
Nicolas Goaziou ea27bf72f9 Open [[file+emacs:file::options]] links
* 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'
2014-02-23 15:12:27 +01:00
Nicolas Goaziou fc9ce86cfc Rewrite `org-open-at-point' using Elements
* 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.
2014-02-23 14:26:18 +01:00
Michael Brand 54e3009d73 Fix escaping of more links in HTML export
* 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.
2014-02-19 20:49:21 +01:00
Sebastien Vauban 2e52b5dfe4 Improve message when file to include is missing
* org.el (org-file-contents): Improve message when linked file does not exist.
2014-02-18 23:06:14 +01:00
Nicolas Goaziou 88731be902 Allow to turn on fixed-width marker on comment lines
* lisp/org.el (org-toggle-fixed-width): Allow to turn on fixed-width
  marker on comment lines.
2014-02-07 09:45:17 +01:00
Nicolas Goaziou b8665a0190 New function to toggle fixe-width areas
* 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.
2014-02-06 18:55:14 +01:00
Bastien Guerry 27a978577f Merge branch 'maint' 2014-02-06 12:37:50 +01:00
Bastien Guerry 016a394de7 Fix 44acd0004
Thanks to Paul Stansell for reporting this.
2014-02-06 12:37:35 +01:00
Bastien Guerry f7b11e5d9e Merge branch 'maint' 2014-02-06 00:27:47 +01:00
Bastien Guerry f4f3f140ac Partially reapply fe3379bda6
* org.el (org-agenda-prepare-buffers): Use `save-excursion'
instead of `save-window-excursion'.

Thanks to Florian Beck for reporting this.
2014-02-06 00:27:33 +01:00
Bastien Guerry d7bbf362da Revert "org.el (org-agenda-prepare-buffers): Restore the point position"
This reverts commit fe3379bda6.
2014-02-06 00:25:16 +01:00
Bastien Guerry 13b5123da1 Merge branch 'maint'
Conflicts:
	contrib/lisp/ox-koma-letter.el
2014-02-05 16:16:36 +01:00
Bastien Guerry a6f81047a4 org.el (org-file-contents): Return an empty string instead of the message
* org.el (org-file-contents): Return an empty string instead
of the message.
2014-02-05 16:15:55 +01:00
Florian Beck 01e8103f8f Font-lock: allow hiding of brackets surrounding macros
* 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
2014-02-05 11:13:39 +01:00
Bastien Guerry aa19233d80 Merge branch 'maint' 2014-02-05 10:57:01 +01:00
Bastien Guerry a08bff4138 org.el (org-open-at-point): Fix bug when opening a plain link followed by a bracket link
* org.el (org-open-at-point): Fix bug when opening a plain
link followed by a bracket link.

Thanks to John Kitchin for reporting this.
2014-02-05 10:56:50 +01:00
Nicolas Richard 5f0ca0ee92 Renaming of ob-sh to ob-shell: various fixes
* lisp/org.el (org-babel-load-languages):
* testing/org-test.el:
* testing/README: change 'sh' to 'shell'

* testing/lisp/test-ob-sh.el: re-rename test file (fixes 80754a8)
2014-02-02 00:08:56 -07:00
Bastien Guerry 4df24f5fc8 Merge branch 'maint' 2014-02-01 01:09:00 +01:00