Commit graph

2858 commits

Author SHA1 Message Date
Achim Gratz 68276fd62d org.el: implement org-property-re using org-re-property
* lisp/org.el (org-re-property): Re-implement using full regex for
  `org-re-property'.  Add optional argument LITERAL to flag when
  PROPERTY should to be regex-quoted.  Move before definition of
  `org-re-property'.  (org-re-property-keyword): Remove, functionality
  is subsumed by `org-re-property'.  (org-property-re): Define using
  `org-re-property'.  (org-entry-get, org-property-values): Adjust
  match number for PROPVAL.  (org-entry-put): Use `org-re-property'
  instead of `org-re-property-keyword'

This completes the refactoring started in 3c933adaf6.
2013-06-23 19:35:09 +02:00
Nicolas Goaziou bd987e3804 org: Replace AUTO with appropriate language when previewing snippets
* lisp/org.el (org-create-formula--latex-header): Replace AUTO with
  appropriate language when previewing snippets.
2013-06-19 19:31:06 +02:00
Nicolas Goaziou 7346dbe79b Merge branch 'maint' 2013-06-14 21:42:42 +02:00
Nicolas Goaziou 4fc03ec1fe ox-latex: Use "ulem" package for both underline and strike through
* lisp/org.el (org-latex-default-packages-alist): Load "ulem" package
  by default.  Use "[normalem]" option to preserve \emph definition.
* lisp/ox-latex.el (org-latex-text-markup-alist): Use "\uline" and
  "\sout" commands from "ulem" package.
2013-06-14 19:46:15 +02:00
Nicolas Goaziou efccedbf65 Merge branch 'maint' 2013-06-09 11:14:28 +02:00
Nicolas Goaziou 84de2396c3 ox-latex: Use \ul (from soul package) instead of \underline
* lisp/org.el (org-latex-default-packages-alist): Document need for
  "soul" package.
* lisp/ox-latex.el (org-latex-text-markup-alist): Use \ul (from "soul"
  package) instead of \underline for underline text.
2013-06-09 11:11:13 +02:00
Achim Gratz 3c933adaf6 org.el: improve org-property-re and use it throughout
* lisp/org.el (org-property-re): Improve definition so that this regex
  can be used in all situations.  Extend docstring with explanation of
  matching groups.
  (org-at-property-p): Implement using `org-element-at-point'.
  (org-entry-properties, org-buffer-property-keys, org-indent-line):
  Use `org-property-re' and adjust match group numbers accordingly.

* lisp/org-element.el (org-element-node-property-parser): Use
  `org-property-re' and adjust match group numbers accordingly.  Move
  `looking-at' out of the let clause to not rely on the unspecified
  evaluation order inside the let.
2013-06-08 21:38:24 +02:00
Eric Schulte 52b91acc59 if we have org-every we should have org-some
* lisp/org.el (org-some): An org-mode version of the cl some function.
2013-06-06 10:19:23 -06:00
Eric Schulte 29e2853870 an Org-mode version of the cl every function
* lisp/org.el (org-every): An Org-mode version of the cl every function.
2013-06-06 10:15:43 -06:00
Grégoire Jadi e84299ea6c org.el (org-reftex-citation): Fix a docstring
* lisp/org.el (org-reftex-citation): Fix contrib package name in the
docstring.

Thanks to ruediger on #org-mode for reporting this.
2013-06-05 17:27:27 +02:00
Nicolas Goaziou 3345817048 Merge branch 'maint' 2013-06-02 10:02:27 +02:00
Nicolas Goaziou 53784ef861 org.el: Fix some docstrings
* lisp/org.el (org-fill-paragraph-separate-nobreak-p,
  org-fill-line-break-nobreak-p,
  org-fill-paragraph-with-timestamp-nobreak-p): Fix docstrings.
2013-06-02 10:01:10 +02:00
Carsten Dominik 24d3fbacaa Turn flyspell off in src blocks.
* lisp/org.el (org-mode-flyspell-verify): Check for src block.

Based on a patch by Trevor Murphy.
2013-06-01 08:34:29 +02:00
Christopher Schmidt 8a3e48bd21 org.el (orgstruct-setup): Bind all intermediate key translations.
* org.el (orgstruct-setup): Bind all intermediate key
translations.
2013-05-26 17:31:49 +02:00
Bastien Guerry 3ce5b3bb22 Merge branch 'maint' 2013-05-16 17:07:32 +02:00
Bastien Guerry 37d526e06e Fix commit b83c03 2013-05-16 17:07:21 +02:00
Bastien Guerry ab3f45cece Merge branch 'maint' 2013-05-16 10:33:42 +02:00
Bastien Guerry b83c0309a7 Fix handling of setup file wrt setting tags
* org.el (org-set-regexps-and-options-for-tags): Return a list
with tag-related variables.
(org-set-regexps-and-options): Append tags from a setup file
to the local tags of the file.
(org-agenda-prepare-buffers): Set tags from a setup file by
calling `org-set-regexps-and-options' when necessary.

Thanks to Anupam Sengupta for reporting this.
2013-05-16 10:33:32 +02:00
Bastien Guerry 8b15ff9d07 Merge branch 'maint' 2013-05-15 16:31:54 +02:00
Bastien Guerry c5abc7e0ba org.el (org-set-regexps-and-options): Fix regexps
* org.el (org-set-regexps-and-options): Fix
`org-deadline-time-hour-regexp' and
`org-scheduled-time-hour-regexp'.

Thanks to Nick Daly for reporting this.
2013-05-15 16:28:30 +02:00
Bastien Guerry 0c31a4fcb6 org-table.el: Rename a variable and a function
* org-table.el (org-table-TBLFM-begin-regexp): Rename from
`org-TBLFM-begin-regexp'.
(org-table-calc-current-TBLFM): Rename from
`org-calc-current-TBLFM'.

* org.el (org-ctrl-c-ctrl-c): Require org-table if needed.
2013-05-15 16:18:37 +02:00
Bastien Guerry ad1e98a23c Merge branch 'maint' 2013-05-14 16:07:38 +02:00
Bastien Guerry 2ae3e91076 org.el (org-refresh-properties): Put the text property on the whole subtree, not just on the headline
* org.el (org-refresh-properties): Put the text property on
the whole subtree, not just on the headline.

Thanks to Ivan Kanis for reporting this and to Miguel Ruiz for confirming
the bug.
2013-05-14 16:07:21 +02:00
Achim Gratz 646f1ac426 org-table: several cleanups
* lisp/org.el (org-table-clean-did-remove-column),
  lisp/org-table.el (org-table-clean-did-remove-column): Move defvar,
  this dynamic variable is only used in org-table.
* lisp/org-table.el (org-table-colgroup-info): Remove unused defvar
  for `org-table-colgroup-info'.
  (org-table-clean-before-export): Let-bind regular expression strings
  and remove unused matching group.  Use
  `org-table-clean-did-remove-column' in cond statement rather than
  branching via if to avoid code duplication.  Remove the code
  associated with the removed `org-table-colgroup-info'.
  (orgtbl-export): Remove unused internal function.
2013-05-12 21:10:19 +02:00
Christopher Schmidt 0ea11e26e4 org.el: Make orgstruct++-mode overwrite local non-org vars again.
* org.el (orgstruct++-mode): Overwrite local non-org vars again.
2013-05-12 16:54:36 +02:00
Carsten Dominik 4e0fad540f Fix point adjustment after beginning/end of line commands
* lisp/org.el (org-beginning-of-line,org-end-of-line): Set
  disable-point-adjustment when the command ends next to invisible
  text.
2013-05-10 08:59:07 +02:00
Carsten Dominik b3a88babf1 Merge branch 'fix-types' 2013-05-09 15:24:43 +02:00
Carsten Dominik a84c01642b Fix customization types of variables
* contrib/lisp/org-wl.el (org-wl-namazu-default-index): Fix custom type.
* lisp/ob-lob.el (org-babel-lob-files): Fix custom type.
* lisp/org-agenda.el (org-agenda-export-html-style):
(org-agenda-ndays):
(org-agenda-inactive-leader):
(org-agenda-day-face-function):
(org-agenda-auto-exclude-function): Fix custom type.
* lisp/org-bibtex.el (org-bibtex-prefix): Fix custom type.
* lisp/org-clock.el (org-clock-heading-function):
(org-show-notification-handler): Fix custom type.
* lisp/org-footnote.el (org-footnote-auto-adjust): Fix custom type.
* lisp/org-protocol.el (org-protocol-default-template-key): Fix custom type.
* lisp/org.el (org-make-link-description-function):
(org-link-translation-function):
(org-link-frame-setup):
(org-refile-target-verify-function):
(org-get-priority-function):
(org-use-fast-tag-selection):
(org-columns-modify-value-for-display-function):
(org-sparse-tree-default-date-type): Fix custom type.
* lisp/ox-html.el (org-html-postamble):
(org-html-postamble-format):
(org-html-preamble-format): Fix custom type.
* lisp/ox-odt.el (org-odt-content-template-file): Fix custom type.
* lisp/ox.el (org-export-with-archived-trees):
(org-export-initial-scope): Fix custom type.

Thanks to Glenn Moris for reporting these.  He used cus-test.el
to find them.
2013-05-09 15:19:02 +02:00
Bastien Guerry eceb2ff7d1 Merge branch 'maint' 2013-05-07 15:11:59 +02:00
Bastien Guerry 0df6bcdf2a org.el (org-get-outline-path): Remove statistical and checkboxes cookies
* org.el (org-get-outline-path): Remove statistical and
checkboxes cookies.

Thanks to Marcel van der Boom for reporting this.
2013-05-07 15:11:47 +02:00
Christopher Schmidt 741bc5c645 org.el: Execute org-insert-heading and org-insert-heading-respect-content in
orgstruct++-mode when the context around point is an item-body.

* org.el (orgstruct-make-binding): Execute org-insert-heading
and org-insert-heading-respect-content when the context around
point is an item-body.
2013-05-06 18:25:00 +02:00
Michael Brand 9998f2c897 Escape double quotes in URL passed to browse-url
Escape double quotes in URL passed to browse-url

* lisp/org.el (org-link-escape-chars-browser): Add char double quote.
* lisp/org.el (org-open-at-point): Make use of the constant
`org-link-escape-chars-browser'.
* testing/lisp/test-org.el
(test-org/org-link-unescape-ascii-extended-char): Fill paragraph.
(test-org/org-link-escape-url-with-escaped-char): Fill paragraph and
typo.
(test-org/org-link-escape-chars-browser): New test.

This is to make work to open the Org link
[[http://some.host.com/search?q="Org mode"]] in a browser.

From 28726bcc7b7c440d70e2d95ea5a61d0cd5f084ea Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
Date: Sun, 5 May 2013 17:02:18 +0200
Subject: [PATCH] Escape double quotes in URL passed to browse-url

* lisp/org.el (org-link-escape-chars-browser): Add char double quote.
* lisp/org.el (org-open-at-point): Make use of the constant
`org-link-escape-chars-browser'.
* testing/lisp/test-org.el
(test-org/org-link-unescape-ascii-extended-char): Fill paragraph.
(test-org/org-link-escape-url-with-escaped-char): Fill paragraph and
typo.
(test-org/org-link-escape-chars-browser): New test.

This is to make work to open the Org link
[[http://some.host.com/search?q="Org mode"]] in a browser.
2013-05-05 18:12:53 +02:00
Grégoire Jadi 168c5584f5 lisp/org.el: Do not inline images when no graphic display is available
* lisp/org.el (org-preview-latex-fragment)
(org-display-inline-images): Detect whether a graphic display is
available before inlining images to prevent an error.

Thanks to Rick Frankel for the report and the solution.

> `org-startup-with-inline-images' is a customizable variable. The
> problem is that if an org file is visited in a non-graphics buffer (or
> batch), `org-display-inline-images' is called an throws an error
> ("Non-X frame used").
>
> This problem also occurs when e.g., `org-babel-after-execute-hook' is
> set to 'org-display-inline-images (which can be mitigated by not
> setting the hook in a non-x frame).
>
> Since the startup variable is a customization, and causes problems if
> not set programatically, IMHO, the best solution would be to wrap the
> `org-display-inline-images' function in a test so that is is a no-op
> on non graphic displays:
2013-05-02 10:08:14 +02:00
Bastien Guerry 188dc72b2d Merge branch 'maint' 2013-04-29 17:24:09 +02:00
Bastien Guerry c18468798f org.el (org-agenda-text-search-extra-files): Fix typos in docstring
* org.el (org-agenda-text-search-extra-files): Fix typos in
docstring.
2013-04-29 17:23:56 +02:00
Nicolas Goaziou cb42a48a30 Speed-up `org-insert-heading'
* lisp/org.el (org-insert-heading): Refactor to use `org-in-item-p'
  only once.
2013-04-26 16:14:29 +02:00
Nicolas Goaziou 74fda6f64d Merge branch 'maint' 2013-04-26 14:29:33 +02:00
Nicolas Goaziou 75c8be1d8b Fix error when filling a table from an affiliated keyword
* lisp/org.el (org-fill-paragraph): Move to table beginning before
  aligning the table when M-q is called from an affiliated keyword.
* testing/lisp/test-org.el: Add test.
2013-04-26 14:27:38 +02:00
Bastien Guerry 9dfccd3f2b Merge branch 'maint' 2013-04-26 08:52:59 +02:00
Bastien Guerry 8d5198d654 org.el (org-insert-heading): Fix case when there the first heading starts at the beginning of the buffer
* org.el (org-insert-heading): Fix case when there the first
heading starts at the beginning of the buffer.

In this case, `org-backward-heading-same-level' will throw an error in
the let form, and the error would fall back on "*" instead of falling
back on the correct number of stars to add.

Thanks to Jisang Yoo and John Hendy who reported this bug.
2013-04-26 08:52:43 +02:00
Bastien Guerry 38051ce481 Merge branch 'maint' 2013-04-24 16:22:21 +02:00
Bastien Guerry 0e4a4c452e org.el: Delete trailing whitespaces 2013-04-24 16:22:13 +02:00
Viktor Rosenfeld 19e1022e26 org.el: Filter agenda by persistent tags
* org.el (org-agenda-prepare-buffers): Add tags defined in
org-tag-persistent-alist to org-tag-alist-for-agenda.

This makes tag hotkeys defined in `org-tag-persistent-alist' appear when
the user invokes `org-agenda-filter-by-tag-refine'.

TINYCHANGE
2013-04-24 16:21:30 +02:00
Bastien Guerry fb6170ec9c Merge branch 'maint' 2013-04-24 15:43:47 +02:00
Bastien Guerry 778c812535 org.el (org-agenda-prepare-buffers): Avoid duplicates in `org-tag-alist-for-agenda' correctly
* org.el (org-agenda-prepare-buffers): Avoid duplicates in
`org-tag-alist-for-agenda' correctly.

Thanks to Viktor Rosenfeld for debugging this.
2013-04-24 15:43:33 +02:00
Bastien Guerry e87dc9df1a Merge branch 'maint' 2013-04-24 11:36:47 +02:00
Bastien Guerry 253b65c091 org.el (org-read-date-minibuffer-local-map): Check if we are at the beginning of the prompt, not if we are after a whitespace
* org.el (org-read-date-minibuffer-local-map): Check if we are
at the beginning of the prompt, not if we are after a whitespace.
Bind C-. to `calendar-goto-today'.
2013-04-24 11:36:22 +02:00
Bastien Guerry 8c1f16d475 Merge branch 'maint' 2013-04-24 10:05:48 +02:00
Bastien Guerry 240d645dbb org.el (org-read-date-minibuffer-local-map): Call `calendar-goto-today' only if there is a space before point in the minibuffer prompt
* org.el (org-read-date-minibuffer-local-map): Call
`calendar-goto-today' only if there is a space before point in
the minibuffer prompt.

Thanks to Michael Brand and others who asked for this regression to be fixed.
2013-04-24 10:05:36 +02:00
Bastien Guerry 862b91e8db org.el (org-insert-heading): Fix bug about wrong conversion of lines with :END: or #+end_ into headlines
* org.el (org-insert-heading): Reveal context when called
interactively.  Fix bug about wrong conversion of lines with
:END: or #+end_ into headlines.
(org-in-drawer-p): New function.
(org-meta-return): Use `org-catch-invisible-edits' and the
`org-in-drawer-p' to check whether we are within a drawer.

Thanks to Muchenxuan Tong and John Hendy who reported these errors.
2013-04-24 09:55:15 +02:00