Commit Graph

16638 Commits

Author SHA1 Message Date
Kyle Meyer 173b0cb6d6 org-timer.el: Merge API for the two timers
* lisp/org-timer.el (org-timer-stop): Support countdown timers in addition
to relative timers.

* lisp/org-timer.el (org-timer-cancel-timer): Remove function.

* lisp/org-timer.el (org-timer-pause-or-continue): Support countdown
timers in addition to relative timers.

* testing/lisp/test-org-timer.el: New file.

* doc/org.texi: Merge relative and countdown timer nodes.

Several previous issues are fixed with these changes.

- org-timer-set-timer and org-timer-cancel-timer did not reset
  org-timer-start-time after countdown completed.

- Because org-timer-start did not return org-timer-pause-time to nil,
  the modeline remained stuck at the paused time.

- When org-timer-start was called with a countdown timer, the modeline
  was updated for the new relative timer, but the countdown timer
  remained scheduled.

- When org-timer-pause-or-continue was called with a countdown timer
  running, the modeline was put in a paused state, but the countdown
  timer remained scheduled.

- When org-timer-stop was called with a countdown timer running, the
  timer was removed from the modeline, but the countdown timer remained
  scheduled.

- When org-timer-set-timer was called with a paused relative timer, the
  relative timer was not reset properly (org-timer-pause-time was still
  non-nil) and the modeline remained in the paused state of the relative
  timer, even though the countdown timer was scheduled with
  run-with-timer.

- Running org-timer-set-timer at the beginning of an empty buffer
  resulted in an args-out-of-range error (due to the org-get-at-eol
  call).
2014-12-09 10:13:29 +01:00
Kyle Meyer dc460fcad1 org-timer.el (org-timer): Recognize double prefix
* lisp/org-timer.el (org-timer): Follow the behavior described in the
docstring for a double prefix argument.
2014-12-09 10:09:38 +01:00
Nicolas Goaziou 65cef8dce4 Merge branch 'maint' 2014-12-09 10:09:20 +01:00
Nicolas Goaziou 56c958cf9d org.texi: Remove reference to `org-effort-property'
* doc/org.texi (Effort estimates): Remove `org-effort-property' from
  variables index since it is a defconst, not a defcustom anymore.

See also 20dcd061a5.
2014-12-09 10:07:46 +01:00
Achim Gratz 82599d37e1 test-org-table: Fix spurious failure in older Emacsen
* testing/lisp/test-org-table.el (test-org-table/field-formula-outside-table):
  Older Emaacsen throw an 'error instead of 'user-error.  Catch both
  condition names to avoid spurious test failures when that happens.
2014-12-08 20:41:41 +01:00
Nicolas Goaziou 8985b3de64 Fix multiple property drawers insertion with repeated tasks
* lisp/org.el (org-add-log-setup): A property drawer may be inserted
  where the note is going to be added.  Make sure the note ends after
  the drawer.

Reported-by: Bradley M. Kuhn <bkuhn@ebb.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/93199>
2014-12-08 00:31:50 +01:00
Nicolas Goaziou 16ebbe49e4 Merge branch 'maint' 2014-12-07 23:53:23 +01:00
Nicolas Goaziou 1ec4164615 org.texi: Fix typo
* doc/org.texi (Export settings): Add missing OPTIONS item.

Reported-by: Amitai Hoze <amitai.hoze@gmail.com>
2014-12-07 23:52:24 +01:00
Marc-Oliver Ihm 1b56359a80 New command add, new structure of index table, many fixes and enhancements. 2014-12-07 15:18:11 +01:00
Nicolas Goaziou f212f7cf0d Make Org future-proof
* lisp/org.el (org-small-year-to-year): Do not hardcode 2037 as the
  last future year for Org.  Always foresee the next 30 years.
2014-12-07 00:01:29 +01:00
Nicolas Goaziou fb906e15d7 ox-html: Fix docstring
* lisp/ox-html.el (org-html-protect-char-alist): Fix docstring.

Reported-by: Marcin Borkowski <mbork@wmi.amu.edu.pl>
2014-12-06 22:28:19 +01:00
Nicolas Goaziou c1fceea69e Merge branch 'maint' 2014-12-06 22:11:05 +01:00
Nicolas Goaziou e2e6a39003 org.texi: Small fix
* doc/org.texi (Matching tags and properties): Remove inaccurate
  sentence and footnote.
2014-12-06 21:51:08 +01:00
Nicolas Goaziou 4c172fe5cc org.texi: Small fixes
* doc/org.texi (Matching tags and properties): Fix typo.  Remove
  inaccurate paragraph.
2014-12-06 21:30:59 +01:00
Nicolas Goaziou db078f4764 Fix Sparse trees properties matches
* lisp/org.el (org-cached-entry-get): Matches against properties names
  are case-insensitive.

* testing/lisp/test-org.el (test-org/match-sparse-tree): New test.

Reported-by: Puneeth Chaganti <punchagan@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93171>
2014-12-06 21:20:55 +01:00
Paul Sexton 70b3a76a27 Updated org-drill to latest version. 2014-12-07 07:00:03 +13:00
Nicolas Goaziou c10ae1a1bb Fix 6289d8e
* lisp/org.el (org-set-regexps-and-options): Do not ignore "^:nil"
  options.
(org--setup-collect-keywords): Fix docstring.
2014-12-05 23:26:40 +01:00
Alan Schmitt 40a5b7af99 org.texi: Document `org-html-link-org-files-as-html'
* doc/org.texi: Document `org-html-link-org-files-as-html' in the
"Links in HTML export" section.
2014-12-04 08:09:03 +01:00
Nicolas Goaziou f4900843ba org.texi: Fix typo
* doc/org.texi (Adding export back-ends): Fix typo.
2014-12-03 22:01:27 +01:00
Nicolas Goaziou fe99861781 org.texi: Remove NOBLOCKING from special properties list
* doc/org.texi (Special properties): Remove NOBLOCKING.

Special properties are properties that can get their value from
somewhere else than a properties drawer.  This is not the case of
NOBLOCKING, which is always set through such a drawer.  Technically,
it is more a reserved property than a special one, per manual
definition.
2014-12-03 21:44:03 +01:00
Nicolas Goaziou 6d2a661fcc Do not blank a table cell after expanding a snippet
* lisp/org.el (org-self-insert-command): Do not blank a table cell if
  last command is `yas-expand'.

Thanks to Sébastien Vauban for reporting it.
<http://permalink.gmane.org/gmane.emacs.orgmode/92918>
2014-12-03 21:36:15 +01:00
Nicolas Goaziou 6289d8ecf4 Resurrect ^:{} option
* lisp/org.el (org-set-regexps-and-options,
  org--setup-collect-keywords): Check OPTIONS keywords for information
  about sub/superscript.

Reported-by: Thomas Holst <thomas.holst@de.bosch.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93117>
2014-12-03 18:48:48 +01:00
Nicolas Goaziou e1adb17ba5 Fix custom timestamps during export
* lisp/org.el (org-translate-time): Remove function.
(org-timestamp-translate): Rewrite function so it doesn't use the one
above.

* lisp/ox-ascii.el (org-ascii-clock, org-ascii-planning):
* lisp/ox-html.el (org-html-clock, org-html-planning, org-html-timestamp):
* lisp/ox-latex.el (org-latex-clock, org-latex-planning):
* lisp/ox-texinfo.el (org-texinfo-clock, org-texinfo-planning): Use
  `org-timestamp-translate' instead of `org-translate-time'.

* etc/ORG-NEWS: Document function removal.

Reported-by: Ian Barton <lists@wilkesley.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/93127>
2014-12-03 17:18:16 +01:00
Nicolas Goaziou e4727803be org-element: Interpret diary timestamps
* lisp/org-element.el (org-element-timestamp-interpreter): Interpret
  diary timestamps.
2014-12-03 17:17:00 +01:00
Nicolas Goaziou 83249b668e org-clock: Fix clocking when `org-clock-into-drawer' is a number
* lisp/org-clock.el (org-clock-find-position): Check if
  `org-clock-into-drawer' is a number when inserting the first clock.

Reported-by: Rainer Stengele <rainer.stengele@online.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/93128>
2014-12-03 15:24:40 +01:00
Nicolas Goaziou dcf64c7ee3 org-timer: Fix `org-timer-stop'
* lisp/org-timer.el (org-timer-stop): Do not modify
  `org-timer-current-timer', which is related to countdown timer,
  a different feature.
2014-12-02 11:47:18 +01:00
Nicolas Goaziou bbacea55f5 org-timer: Fix "No running timer" error
* lisp/org-timer.el (org-timer-stop): Do not look after
  `org-timer-current-timer', which is a variable related to countdown
  timer, whereas the function is related to relative timer.

Reported-by: Randy Smith <perlstalker@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93081>
2014-12-02 11:28:15 +01:00
Bastien Guerry 9aa58fa852 org.texi: Document `org-table-blank-field'
* doc/org.texi: Document `org-table-blank-field'.

Thanks to Vicente Vera for suggesting this.
2014-12-01 17:04:36 +01:00
Bastien Guerry 24be2573a9 contrib/lisp/ox-bibtex.el: Fix trailing whitespace 2014-12-01 16:52:47 +01:00
Nicolas Berthier b31a5152c8 contrib/lisp/ox-bibtex.el: Fixup for Emacs < 24.3
* contrib/lisp/ox-bibtex.el (org-bibtex-process-bib-files): Avoid
using `file-name-base', only available since Emacs version 24.3.
2014-12-01 16:52:20 +01:00
Bastien Guerry c4fd9e415a ox-koma-letter.el (org-koma-letter-subject-format): Enhance docstring
* ox-koma-letter.el (org-koma-letter-subject-format): Enhance
docstring.
2014-12-01 16:50:12 +01:00
Paul M. Rodriguez 8618c40ed4 New version of Org-Velocity 2014-12-01 16:27:29 +01:00
Bastien Guerry e435b0eac3 org.texi (TODO dependencies): Document the NOBLOCKING property
* org.texi (TODO dependencies): Document the NOBLOCKING
property.

Thanks to James Harkins for reporting this.
2014-12-01 15:52:30 +01:00
Bastien Guerry 92e823c43d org.el (org-add-planning-info): Remove spurious blank line
* org.el (org-add-planning-info): Remove spurious blank line
left after "unclosing" an entry.
2014-12-01 15:36:40 +01:00
Nicolas Goaziou 25a974a231 ORG-NEWS: Improve properties drawers repair function 2014-11-28 23:07:38 +01:00
Nicolas Goaziou 5945beef05 `org-add-planning-info' need not be interactive
* lisp/org.el (org-add-planning-info): Remove interactive status.  Fix
  docstring.
2014-11-27 00:23:35 +01:00
Nicolas Goaziou 80d13fffe0 Preserve indentation when modifying planning info
* lisp/org.el (org-add-planning-info): Preserve indentation when
  modifying planning info.  Refactor code.

Thanks to Sébastien Vauban for suggesting the idea.
2014-11-27 00:23:34 +01:00
Nicolas Goaziou ae9ac316a5 Erase `org-insert-labeled-timestamps-at-point'
* lisp/org.el (org-insert-labeled-timestamps-at-point): Remove
  variable.
(org-add-planning-info): Remove reference to removed variable.

* lisp/org-agenda.el (org-agenda-schedule, org-agenda-deadline):
  Remove reference to removed variable.

* etc/ORG-NEWS (Skipping): Document removal.

Org syntax assumes planning info line is always right below the
headline.  Setting this variable to anything but nil defeats that and,
as a consequence, produces invalid planning lines.
2014-11-26 23:32:52 +01:00
Marco Wahl 00500afb8c org-eww.el: Fix org-store-link for eww-mode
* contrib/lisp/org-eww.el (org-eww-store-link): Depending on the Emacs
  version use the appropriate interface to store the url of an
  eww-mode buffer.

This patch fixes the org-store-link feature for eww-mode buffers for
Emacs 25.
2014-11-26 10:38:43 +01:00
Nicolas Goaziou bd3bd83092 Merge branch 'maint' 2014-11-25 09:24:02 +01:00
Karl Fogel a712cec60f org.el: Improve accuracy of message
* lisp/org.el (org-remove-file): Reword success message.

Before this change, when `org-remove-file' succeeded in removing a
file from `org-agenda-files', it would display this unduly alarming
message to the user: "Removed file: foo.org".  This made it seem as
though the file itself were removed from the filesystem, rather than
simply being delisted from `org-agenda-files'.

After this change, the message "Removed from Org Agenda list: foo.org"
is displayed instead, so the user will experience only the normal
level of panic involved in using Org Mode, not the increased panic
that results from thinking a file has been removed when it hasn't.

TINYCHANGE
2014-11-25 09:23:36 +01:00
Nicolas Goaziou 9eff31aada `org-edit-special' edits export blocks
* lisp/org.el (org-edit-special): Allow to edit export blocks.
* etc/ORG-NEWS: Document feature.
2014-11-24 00:14:13 +01:00
Nicolas Goaziou bde27ccacc org-src: Fix docstring
* lisp/org-src.el (org-src-ask-before-returning-to-edit-buffer): Fix
  docstring.  Move variable in appropriate section.
2014-11-24 00:07:39 +01:00
Nicolas Goaziou 367827f005 Fix failing test
* lisp/org.el (org-indent-region): Fix failing test.
2014-11-24 00:07:39 +01:00
Nicolas Goaziou 203bf5870f org-src: Unify source editing tools
* lisp/org-src.el (org-src-strip-leading-and-trailing-blanklines,
  org-edit-src-force-single-line, org-edit-src-picture,
  org-edit-src-from-org-mode, org-edit-src-allow-write-back-p,
  org-edit-src-beg-marker, org-edit-src-end-marker,
  org-edit-src-overlay, org-edit-src-block-indentation,
  org-edit-src-saved-temp-window-config, org-edit-src-code-timer):
  Remove variables.
(org-src--allow-write-back-p, org-src--beg-marker,
org-src--block-indentation, org-src--code-timer, org-src--end-marker,
org-src--end-marker, org-src--from-org-mode, org-src--overlay,
org-src--saved-temp-window-config, org-src--type,
org-src--babel-info): New variables.

(org-src--construct-edit-buffer-name, org-src--edit-buffer,
org-src--source-buffer, org-src--get-lang-mode, org-src--coordinates,
org-src--goto-coordinates, org-src--element-contents-area,
org-src--make-source-overlay, org-src--on-element-p,
org-src--contents-for-write-back, org-src--edit-element,
org-edit-table.el, org-edit-export-block): New functions.
(org-edit-src-find-buffer, org-src-construct-edit-buffer-name,
org-src-tangle, org-src-in-org-buffer): Remove functions.

(org-edit-src-code, org-edit-fixed-width-region, org-edit-src-abort,
org-edit-src-save): Use new functions and variables.
(org-edit-src-exit): Use new functions and variables.  Change
signature.

* lisp/org.el (org-edit-special, org-indent-line, org-indent-region):
  Use new functions and variables.

* lisp/ob-core.el (org-babel-do-in-edit-buffer): Remove useless check.
(org-babel-expand-src-block): Apply signature change.

This patches resolves discrepancies between source editing tools and
globally simplifies process (auto-save feature, region
preservation...).  It introduces export block editing.  It also moves
internal variables and functions into an appropriate namespace and
delete some unused functions.
2014-11-24 00:07:39 +01:00
Nicolas Goaziou 9c06f8cce9 org-src: Remove unused functions and variables
* lisp/org-src.el (org-edit-src-region-extra): Remove variable.
(org-edit-src-find-region-and-lang, org-edit-src-get-lang,
org-edit-src-get-label-format, org-edit-src-get-indentation,
org-src-fontify-block, org-src-fontify-buffer): Remove functions.

(org-src-font-lock-fontify-block): Remove reference to removed
function in docstring.

Remove all functions and variables related to parsing, which is now
delegated to org-element.el.  Also reorder a defcustom and
a declaration in the library.
2014-11-22 20:59:08 +01:00
Nicolas Goaziou 3953cb19b4 Merge branch 'maint' 2014-11-22 00:04:51 +01:00
Peter Moresi aa65ac35aa ob-js: Fix passing multiline variables
* lisp/ob-js.el (org-babel-js-var-to-js): Replace newline characters
  with "\n" in strings.

Let's say I have a multi-line string stored in an example block.

I want to store my CSV in an example block.

  ColA,ColB,ColC
  1,2,3
  4,5,6

I have a JavaScript function that accepts a string named 'csv' and passing in 'my-csv-data'.

  console.log(csv);

When I expand the source block I end up with:

var csv="ColA,ColB,ColC
  1,2,3
  4,5,6";
console.log(csv);

This will not execute correctly because JavaScript does not support newlines in strings.

What I want instead is:

  var csv="ColA,ColB,ColC\n  1,2,3\n  4,5,6";
  console.log(csv);

TINYCHANGE
2014-11-22 00:02:00 +01:00
Nicolas Goaziou 40f2b885f6 Open outer link on nested links
* lisp/org.el (org-open-at-point): Open outer link on nested links.

* testing/lisp/test-org.el (test-org/open-at-point/inline-image): New
  test.

Suggested-by: Daniel Bausch <bausch@dvs.tu-darmstadt.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/92796>
2014-11-20 23:35:28 +01:00
rasmus 0e52f02f2c org-entities.el: Add parallel symbol
* org-entities.el (org-entities): Add parallel symbol.

From patch proposal by Brady Trainor.

TINYCHANGE
2014-11-19 14:50:21 +01:00