Commit graph

3600 commits

Author SHA1 Message Date
Nicolas Goaziou 747fefe2b0 Update keywords for defcustom `org-latex-default-packages-alist'
* lisp/org.el (org-latex-default-packages-alist): Update keywords to
  reflect changes to default value in
  5e03133c47.
2015-07-03 21:20:53 +02:00
Nicolas Goaziou 188bae903f Fix property inheritance with extended values
* lisp/org.el (org-property--local-values): New function.
(org-entry-get): Use new function.  Ignore global values when there is
no inheritance.
(org-entry-get-with-inheritance): Fix extended values, which do not
stop anymore inheritance search.

* testing/lisp/test-org.el (test-org/entry-get): Add tests.
2015-07-03 15:34:47 +02:00
Rasmus 5e03133c47 Remove float from org-latex-default-packages-alist 2015-07-03 13:42:21 +01:00
Nicolas Goaziou 304f84530b Use inactive timestamps when re-scheduling or re-deadlining
* lisp/org.el (org-log-note-headings): Improve docstring.
(org-store-log-note): When re-scheduling or re-deadlining, convert old
or new timestamp to an inactive one so as to not clutter the agenda.

Reported-by:  Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/93498>
2015-06-29 22:19:38 +02:00
Nicolas Goaziou 1cc8cdc49e Be more strict when matching an Org table
* lisp/org.el (org-at-table-p): Do not allow "+" character at the
  beginning of a table row.
2015-06-28 23:32:38 +02:00
Nicolas Goaziou 157591db7c Fix `org-decrease-number-at-point'
* lisp/org.el (org-decrease-number-at-point): Handle the case when INC
  is nil.
2015-06-28 21:09:59 +02:00
Nicolas Goaziou f03d96572e Silence byte-compiler 2015-06-28 16:50:08 +02:00
Nicolas Goaziou 03eb88661b Use parser for `org-at-table-p' and al.
* lisp/org-table.el (org-table-begin):
(org-table-end): Refactor using parser.

* lisp/org.el (org-at-table-p):
(org-at-table.el-p): Refactor using parser.

(org-meta-return): Use `org-at-table-p'.

(org-at-table-hline-p):
(org-table-recognize-table.el): Small refactoring.
2015-06-28 14:51:31 +02:00
Kyle Meyer 5f3d8037a5 org-add-planning-info: Improve deletion handling
* lisp/org.el (org-add-planning-info): Reset point before each
  planning entry search.  Clean up extra spaces.

* testing/lisp/test-org.el (test-org/add-planning-info): Add tests.

- Reposition save-excursion call to reset point every dolist
  iteration.  Otherwise, the order of the entries to be removed
  matters, and a call like

      (org-add-planning-info nil nil 'scheduled 'deadline)

  on

      DEADLINE: <2015-06-26 Fri> SCHEDULED: <2015-06-26 Fri>

  will fail to remove the deadline entry.

- Delete leading white space even when at the beginning of the line so
  that, when org-adapt-indentation is nil, a space is not inserted
  when removing the leading planning info entry.

  This prevents headings with repeating entries like

      SCHEDULED: <2015-06-26 Fri +1w>

  from being closed and recycled with an extra space in front of
  SCHEDULED.

- Add leading white space to the planning info entry regexp to prevent
  leftover white space when removing entries other than the first
  entry.
2015-06-28 09:03:46 +02:00
Kyle Meyer 329683861c org-clone-subtree-with-time-shift: Accept 0 clones
* lisp/org.el (org-clone-subtree-with-time-shift): Allow argument
  specifying number of clones to be 0.

* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add
  tests.

This makes it possible to clone a subtree with a repeating timestamp
so that the repeater is removed from the original subtree and a single
shifted, repeating clone is created.  If the original subtree does not
have a repeating timestamp, no clones will be made.
2015-06-22 21:49:52 +02:00
Nicolas Goaziou 739853d128 Tiny speed-up for `org-entry-properties'
* lisp/org.el (org-entry-properties): Tiny speed-up.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.
2015-06-22 10:01:51 +02:00
Nicolas Goaziou 2c27e85f11 Sanitize link encoding
* lisp/org.el (org-store-link): Improve docstring.
(org-make-link-string): Escape internal links only when absolutely
necessary.
(org-link-escape-chars): Add percent character.
(org-link-escape-chars-browser): Make space character more visible.
(org-link-escape): Refactor code.
(org-display-inline-images): Properly unescape path before creating
the link.
(org-extract-attributes): Remove function.

* lisp/ox.el (org-export-resolve-fuzzy-link): Decode path before
  resolving link.

* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Add
  test.
2015-06-16 23:24:38 +02:00
Nicolas Goaziou aea374680c Small refactoring
* lisp/org.el (org-link-unescape): Refactor code.
2015-06-16 16:53:46 +02:00
Nicolas Goaziou 50ba0a5ed6 Fix 1a73641770
* lisp/org.el (org-icompleting-read): Let `completing-read' or
  equivalent sort out type of completion.
(org-olpath-completing-read): Revert partially
1a73641770.
2015-06-07 00:38:58 +02:00
Nicolas Goaziou 9fd317b1b0 Fix logging in indirect buffers
* lisp/org.el (org-store-log-note): Ensure insertion point is
  available in the narrowed part of the current buffer.

Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98152>
2015-06-06 09:08:46 +02:00
Nicolas Goaziou b42642f244 Ensure special properties ignore inheritance
* lisp/org.el (org-entry-get): Ensure special properties ignore user's
  inheritance rules.
2015-06-02 16:34:33 +02:00
Nicolas Goaziou 7b333c7249 Fix typo
* lisp/org.el (org-check-before-date):
(org-check-after-date):
(org-check-dates-range): Fix typo.

Reported-by: Michael Strey <mstrey@strey.biz>
<http://permalink.gmane.org/gmane.emacs.orgmode/98094>
2015-06-02 15:39:50 +02:00
Nicolas Goaziou 1a73641770 Fix `org-olpath-completing-read'
* lisp/org.el (org-olpath-completing-read): Feed
  `org-icompleting-read' with COLLECTION argument too.
2015-06-01 18:20:46 +02:00
Nicolas Goaziou 458bde5243 Revert "Silence byte-compiler"
This reverts commit 722b5e724e.
2015-06-01 09:32:32 +02:00
Nicolas Goaziou 722b5e724e Silence byte-compiler
* lisp/org.el (format-spec): Silence byte-compiler when using "make
  single".
2015-06-01 09:24:42 +02:00
Nicolas Goaziou 31f8911495 Tiny fix
* lisp/org.el (org-create-formula-image): Atoms shouldn't be quoted
  when used as `case' keys.
2015-06-01 09:21:47 +02:00
Nicolas Goaziou 9e1591cbd0 Fix storing link in edit buffer
* lisp/org.el (org-store-link): When creating a link from an edit
  buffer, re-use label on current line, if any.  Give up if call is
  non-interactive, as it would otherwise ask for user's input.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97902>
2015-05-31 01:54:49 +02:00
Nicolas Goaziou a0c1e490b3 Silence byte-compiler
* lisp/org-footnote.el:
* lisp/org-list.el:
* lisp/org-macro.el:
* lisp/org-src.el:
* lisp/org.el: Silence byte-compiler.
2015-05-30 14:28:35 +02:00
Nicolas Goaziou d00dcd09ca org: Fix typo
* lisp/org.el (org-not-done-heading-regexp): Fix a typo and make
  variable buffer-local, as expected.

Reported-by: Alexander Borkowski <alex-b@opus-b.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97996>
2015-05-30 00:06:54 +02:00
Rasmus 4b2536d750 org.el: Add documentation for grffile
* org.el (org-latex-default-packages-alist): Add documentation for
  grffile.
2015-05-29 12:43:52 +02:00
Rasmus 56c5382684 org.el: Add grffile to default latex packages
* org.el (org-latex-default-packages-alist): Add grffile for files
  with spaces and periods.

Reported-by: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97846>
2015-05-29 11:54:46 +02:00
Nicolas Goaziou a714c3a118 Fix visibility with `org-cycle-separator-lines' at -1
* lisp/org.el (org-cycle-show-empty-lines): Fix visibility cycling
  with `org-cycle-separator-lines' set to -1.

Reported-by: Michael Crouch <creidieki@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97879>
2015-05-26 16:29:08 +02:00
Rasmus 8ddb844d27 org.el: Fix bug in af6fdf3071
* org.el (org-return): Fix bug when headline title is empty.
2015-05-21 00:45:24 +02:00
Rasmus 248266e560 org.el: New function org-delete-indentation
* org.el (org-delete-indentation): New function.
  (org-mode-map): Bind org-delete-indentation to M-^.
* test-org.el (test-org-delete-indentation): Test org-delete-indentation.
* ORG-NEWS: Add entry on org-delete-indentation.
2015-05-21 00:28:41 +02:00
Rasmus af6fdf3071 org.el: RET breaks headline text
* org.el (org-return): RET breaks headline text.
* test-org.el (test-org/return): Test org-return on headline text.
* ORG-NEWS: Add entry on new org-return behavior.
2015-05-21 00:21:34 +02:00
Marco Wahl 6ba251d473 Fix two typos
* lisp/org.el: Fix in documentation of variable
  org-outline-path-complete-in-steps.
2015-05-20 11:16:14 +02:00
Nicolas Goaziou de8302c65a Fix `org-next-block'
* lisp/org.el (org-next-block): Preserve match data, as specified in
  the docstring.

Reported-by: Andreas Leha <andreas.leha@med.uni-goettingen.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97707>
2015-05-19 23:12:17 +02:00
Nicolas Goaziou 0e7062678e Improve docstrings
* lisp/org.el (org-metaleft):
(org-metaright): Improve docstrings.

Suggested-by: Alain Cochard <Alain.Cochard@unistra.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/97509>
2015-05-13 12:35:24 +02:00
Titus von der Malsburg 6779f8f424 Fix detection of latex fragments
* org-element.el (org-element-latex-fragment-parser):
* org.el (org-latex-regexps): Fix the detection of latex
  fragments.  Uses syntax tables to detect whitespaces and punctuation
  marks following the final $ sign.

In order to qualify as a math delimiter, the final $ sign of a LaTeX
fragment has to be followed by a whitespace or punctuation mark but the
regexp used in the previous code matched only a small number of
punctuation marks and therefore missed some latex fragments.
2015-05-09 09:36:53 +02:00
Nicolas Goaziou b27e630bab org-capture: Fix "org-find-olp: Wrong type argument: stringp, nil"
* lisp/org-capture.el (org-capture-expand-file): Empyt string defaults
  to `org-default-notes-file'.
* lisp/org.el (org-default-notes-file): Do not fallback on
`remember-data-file' since "org-capture.el" is not based off
"remember.el" anymore.

Reported-by: Florian Lindner <mailinglists@xgm.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/97448>
2015-05-08 11:32:35 +02:00
Nicolas Goaziou 6ac8db9dba Fix TBLFM line handling
* lisp/org-table.el (org-table-TBLFM-begin-regexp): Take into
  consideration that table lines are not required to end with "|".
(org-table-calc-current-TBLFM): Properly clean markers at the end of
the process.
(org-table-TBLFM-begin): Small refactoring.
* lisp/org.el (org-at-TBLFM-p): Prevent false positives.

Suggested-by: Oleg Sivokon <olegsivokon@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97461>
2015-05-08 10:46:07 +02:00
Nicolas Goaziou 4980a9dbb8 Fix indentation in empty items
* lisp/org.el (org--get-expected-indentation): Fix indentation on
  in empty items.
* testing/lisp/test-org.el (test-org/indent-line): Add test.

Reported-by: Leo Ufimtsev <lufimtse@redhat.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97454>
2015-05-08 10:08:11 +02:00
Nicolas Goaziou 0b7721322a Fix `org-next-block'
* lisp/org.el (org-next-block): Use Element API.

* testing/lisp/test-org.el (test-org/next-block):
(test-org/previous-block): New tests.
2015-05-01 14:03:26 +02:00
Luke Amdor 14f5b13218 org.el: Fix use of org-open-at-point with shell and midnight cleaning
* lisp/org.el (org-open-at-point): Make sure org shell output buffer
  is a string of buffer name before appending to
  `clean-buffer-list-kill-buffer-names' for cleaning later.

TINYCHANGE
2015-04-29 23:37:18 +02:00
Konubinix 6f0cf14383 Fix `org-refresh-category-properties'
* lisp/org.el (org-refresh-category-properties): Prevent the `put-text-property'
  to change the point in order to take into account the CATEGORY
  property in subtrees also.

* testing/lisp/test-org.el (test-org/entry-properties): Add test.
2015-04-28 09:40:03 +02:00
Nicolas Goaziou ca2b398396 org-src: Allow editing footnote definitions
* lisp/org-src.el (org-src--element-contents-area): Make a special
  case for footnote definitions.
(org-edit-footnote-reference): New function.
* lisp/org.el (org-edit-special): Use new function.
2015-04-26 11:44:35 +02:00
Charles Berry c1f515840d org-cycle: Cycle visibility when point is at the end of a folded headline
* lisp/org.el: (org-cycle): Ignore invisible newlines and cycle
  visibility when point is visibly on a headline.

Requested by: Nikolaus Rath <Nikolaus@rath.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/97125>
2015-04-25 11:23:59 -07:00
Kyle Meyer 63a3153842 org.el: Remove org-timer-cancel-timer binding
* lisp/org.el (org-mode-map): Remove binding for deleted command
  org-timer-cancel-timer.

The command org-timer-cancel-timer was removed in 173b0cb6d6.
2015-04-24 21:43:07 +02:00
Rasmus 2bdc661fde org.el: Handle nil org-latex-to-mathml-jar-file
* org.el (org-create-math-formula): Handle nil
  org-latex-to-mathml-jar-file.
2015-04-23 12:39:52 +02:00
Nicolas Goaziou ce4e647c21 Tiny refactoring
* lisp/org.el (org-iread-file-name): Refactor.

`read-file-name' already applies `read-file-name-function' when
available.
2015-04-22 14:30:59 +02:00
Nicolas Goaziou e040ad58a1 Rename `org-export--registered-backends'
* lisp/ox.el (org-export-registered-backends): Renamed from
  `org-export--registered-backends'.
(org-export-get-backend):
(org-export-register-backend):
(org-export-insert-default-template):
(org-export--dispatch-ui):

* lisp/org.el (org-export-registered-backends):
(org-export-backends):
(org-get-export-keywords):

* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/options):

* testing/lisp/test-ox.el (test-org-export/define-backend):
(test-org-export/define-derived-backend):
(test-org-export/derived-backend-p):
(test-org-export/get-all-transcoders):
(test-org-export/get-all-options):
(test-org-export/get-all-filters):
(test-org-export/with-backend): Apply renaming.

Since the variable is copiously used outside of "ox.el", there's no
reason to mark it as internal.
2015-04-22 10:27:24 +02:00
Nicolas Goaziou 9290395405 Silence byte-compiler
* lisp/ob-shell.el (org-babel-sh-evaluate):
* lisp/org-clock.el (org-x11idle-exists-p): Do not use last
  `call-process-shell-command' arg.

* lisp/org-mouse.el (org-mouse-show-context-menu): Ignore
  `redisplay-dont-pause'.

* lisp/org.el (org-icompleting-read): Fix typo.  Small refactoring.
2015-04-22 09:51:52 +02:00
Rasmus 797023b84c org.el: Fix 7ec8ced
* org.el (org-icompleting-read): Correct bug introduced previously.
2015-04-20 14:18:34 +02:00
Rasmus d8494b5668 org.el: Respect read-file-name-function
* org (org-iread-file-name): Respect read-file-name-function.
2015-04-16 19:41:26 +02:00
Rasmus b80ed6124f org.el: Refactor org-file-complete-link
* org.el (org-file-complete-link): Refactor.
2015-04-16 19:41:13 +02:00