0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 17:10:43 +00:00
Commit graph

7790 commits

Author SHA1 Message Date
Bastien Guerry de6201b19c org.el (org-insert-link): Fix bug when inserting links to headlines containing the ">" character
* org.el (org-insert-link): Fix bug when inserting links to
headlines containing the ">" character.

Thanks to William Léchelle for reporting this.
2012-12-28 18:37:07 +01:00
Eric Schulte f47a7176b8 import whole bibtex files into Org-mode
* lisp/org-bibtex.el (org-bibtex-read-buffer): Reads all bibtex entries
  in a buffer.
  (org-bibtex-read-file): Read all bibtex entries in a file.
  (org-bibtex-import-from-file): Import all bibtex entries from a file
  into the current buffer.
2012-12-26 08:40:44 -07:00
Bastien Guerry 99c8732bf8 Merge branch 'maint' 2012-12-25 03:29:29 +01:00
Bastien Guerry 6671e80453 org-crypt.el (org-at-encrypted-entry-p): Fix search boundary
* org-crypt.el (org-at-encrypted-entry-p): Fix search
boundary.

Thanks to Samuel Wales for reporting this bug.
2012-12-25 03:29:17 +01:00
Abdó Roig-Maranges a04ccc40b2 org-agenda.el: New option `org-agenda-search-view-max-outline-level'
* org-agenda.el (org-agenda-search-view-max-outline-level):
New option to define the max level for the entries shown by
the search view.  A value of 1 means to show the top parent
of the entries.
2012-12-24 14:49:04 +01:00
Bastien Guerry ca4219abc9 org.el: New command org-set-property-and-value' bound to C-c C-x P'
* org.el (org-last-set-property-value): New variable.
(org-read-property-name): Fix dangling parentheses.
(org-set-property-and-value): New command to manually set
both the property and the value.  A prefix arg will use the
last property-value pair set without prompting the user.
(org-set-property): Set `org-last-set-property-value'.
(org-mode-map): Bind the new command to `C-c C-x P'.

This is useful when you need to set the same property-value
pair for several entries.
2012-12-24 14:44:21 +01:00
Bastien Guerry e6d8ed51b8 Merge branch 'maint' 2012-12-24 14:01:51 +01:00
Bastien Guerry 1b4e396b6b Merge branch 'maint-fixes' into maint 2012-12-24 14:01:25 +01:00
Achim Gratz b63275350f Backwards compatibility: don't defalias special forms
* lisp/org-compat.el (org-condition-case-unless-debug): Do not use
  defalias for special forms, the Emacs 22 byte-compiler does not
  recognize them correctly when compiling macros.  Use a macro instead
  and rely on macro expansion.  That however makes the decision at
  compile time, which should be acceptable in this case since it only
  affects debugging.
2012-12-24 14:01:14 +01:00
Bastien Guerry 58999598ed New compatibility function `org-delete-directory'
* org-compat.el (org-delete-directory): New compatibility
function for Emacs 22, where `delete-directory' does not
support recursive deletion.

* org-odt.el (org-odt-cleanup-xml-buffers): Use the new
compatibility function.

Thanks to Achim and Jambunathan for suggesting this.
2012-12-24 13:51:48 +01:00
Bastien Guerry 4549f0c99c org.el: (org-mode): Use face-background' instead of org-find-invisible-foreground'
* org.el (org-find-invisible-foreground): Delete.
(org-mode): Use `face-background' instead of
`org-find-invisible-foreground'.

Thanks to Achim for suggesting this.
2012-12-24 13:46:36 +01:00
Bastien Guerry f01ce85026 Merge branch 'maint' 2012-12-24 01:25:38 +01:00
Bastien Guerry 40cb44e795 Fix regression: allow editing HTML and LaTeX source blocks again
* org.el (org-table-map-tables): Fix allowed blocks.
(org-edit-special): Fix regression: allow editing HTML and
LaTeX source blocks again.

* org-src.el (org-edit-src-code): Ditto.

Thanks to Nicolas Richard and Bernt Hansen for reporting bugs
in this area.
2012-12-24 01:25:33 +01:00
Bastien Guerry f0b35a6379 Merge branch 'master-fixes' 2012-12-24 01:15:57 +01:00
Bastien Guerry 4adf17f811 Merge branch 'maint' 2012-12-24 00:08:20 +01:00
Bastien Guerry 73d506a8dc org.el (org-nonsticky-props): Add `htmlize-link'
* org.el (org-nonsticky-props): Add `htmlize-link'.

Thanks to Samuel Wales for reporting a bug related to this.
2012-12-24 00:08:02 +01:00
Bastien Guerry 317a96a471 org.el (org-nonsticky-props): Add `htmlize-link'
* org.el (org-nonsticky-props): Add `htmlize-link'.

Thanks to Samuel Wales for reporting a bug related to this.
2012-12-23 21:17:43 +01:00
Bastien Guerry 5fa52d9a93 org.el: Add new startup keywords
* org.el (org-startup-options): New startup keywords.
(org-log-into-drawer): Update docstring to explain how to set this
variable through the startup keyword "logdrawer" and "nologdrawer".
(org-log-states-order-reversed): Document the new startup keywords
"logstatesreversed" and "nologstatesreversed".

* org.texi (In-buffer settings): Document new startup keywords.
Thanks to John J Foerch for this idea.
2012-12-23 18:51:24 +01:00
Bastien Guerry 88555aab22 Merge branch 'maint' 2012-12-23 17:54:47 +01:00
Bastien Guerry 98a5f3df32 Don't allow special edit in verbatim blocks.
* org.el (org-edit-special): Don't edit in verbatim blocks.

* org-src.el (org-edit-src-code): Ditto.
2012-12-23 17:54:42 +01:00
Bastien Guerry ae7516b0e1 Sync `org-babel-temp-file' definition with maint 2012-12-23 17:47:20 +01:00
Bastien Guerry 953b920c9b Merge branch 'maint' 2012-12-23 17:31:57 +01:00
Bastien Guerry f0a64ab3b5 org-table.el: Use `org-delete-backward-char' which doesn't modify match data anymore
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Use `org-delete-backward-char'
instead of `backward-delete-char'.

* org.el (org-delete-backward-char, org-delete-char): Save
match data.
2012-12-23 17:31:41 +01:00
Bastien Guerry c2e662cf79 Revert "Save match data in org-delete-backward-char' and org-delete-char'"
This reverts commit c800836d7c.
2012-12-23 17:26:45 +01:00
Bastien Guerry 8c53cc820e Merge branch 'master-fixes' 2012-12-23 17:20:55 +01:00
Bastien Guerry 9f1f0535be Merge branch 'maint' 2012-12-23 17:20:51 +01:00
Bastien Guerry 54731c965d Merge branch 'maint-fixes' into maint 2012-12-23 17:20:38 +01:00
Bastien Guerry a118ae4e1c org-src.el (org-edit-src-code): Fix another bug about editing special blocks "example" and "verbatim"
* org-src.el (org-edit-src-code): Fix another bug about
editing special blocks "example" and "verbatim".
2012-12-23 17:20:27 +01:00
Bastien Guerry 9f4ecf79b1 org.el (org-edit-special): Fix bug about editing special blocks "example" and "verbatim"
* org.el (org-structure-template-alist): Add verbatim.
(org-edit-special): Fix bug about editing special blocks
"example" and "verbatim".
2012-12-23 17:18:47 +01:00
Bastien Guerry 3684f84aee Merge branch 'maint' 2012-12-23 12:46:49 +01:00
Jambunathan K 293a14d13f Update OpenDocument schema files to v1.2 OASIS standard
* etc/schema/od-schema-v1.2-os.rnc: OASIS standard
* etc/schema/od-manifest-schema-v1.2-os.rnc: OASIS standard
* etc/schema/schemas.xml: Fix uri to rnc files.
* lisp/org-odt.el (org-export-odt-schema-dir): Modified to
accommodate change in rnc file names.
* contrib/lisp/org-e-odt.el (org-e-odt-schema-dir): Modified
to accommodate change in rnc file names.
2012-12-23 12:44:42 +01:00
Jambunathan K 7ab4464ea4 org-odt.el: Fix Emacs Bug#13254
* lisp/org-odt.el (org-export-as-odt-batch): Init
`org-odt-zip-dir'.  Fix Emacs Bug#13254.
2012-12-23 12:42:43 +01:00
Jambunathan K b495c92239 org-odt.el: Correctly format link to headlines that have description
* lisp/org-odt.el (org-odt-format-org-link): Add check for
presence of description in headline links.

Fix
http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00841.html
2012-12-23 12:42:43 +01:00
Bastien Guerry c800836d7c Save match data in org-delete-backward-char' and org-delete-char'
* org.el (org-delete-backward-char, org-delete-char): Save
match data (`delete-backward-char' and `delete-char' don't.)
(org-enable-table-editor, org-insert-heading)
(org-remove-timestamp-with-keyword, org-self-insert-command):
Use `delete-backward-char' instead of `backward-delete-char'.

* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Ditto.

* org-latex.el (org-export-latex-subcontent): Ditto.

* org-clock.el (org-clocktable-write-default): Ditto.

* org-ascii.el (org-export-ascii-preprocess): Ditto.

Thanks to Vegard Vesterheim for raising this issue and proposing a patch,
and to Carsten for pointing at the root of the problem.
2012-12-23 12:30:40 +01:00
Bastien Guerry 2861bfc712 org.el (org-mode-map): Use org-remap' instead of binding M-t'
* org.el (org-mode-map): Use `org-remap' instead of binding
`M-t' to `org-transpose-words' directly.
2012-12-23 12:15:24 +01:00
Bastien Guerry e815ab5f8e Merge branch 'master-fixes' 2012-12-23 00:34:49 +01:00
Bastien Guerry b6eede54b2 Merge branch 'maint' 2012-12-23 00:34:42 +01:00
Bastien Guerry a0fd83976a Fix compiler warnings 2012-12-23 00:32:40 +01:00
Bastien Guerry 0f7500704e org.el: Introduce a tiny syntax table for a new function `org-transpose-words'
* org.el (org-syntax-table): New variable.
(org-transpose-words): New command, simply wrapping the new
syntax table around `transpose-words'.
(org-mode-map): Bind `org-transpose-words' to `M-t'.

Thanks to Eric Abrahamsen for this idea.
2012-12-23 00:31:14 +01:00
Bastien Guerry 416357c82c org.el (org-store-link): Use keyword at point as the search string
* org.el (org-store-link): Use keyword at point as the search
string.

Thanks to Thomas Dye for reporting this.
2012-12-22 23:20:47 +01:00
Bastien Guerry a0be28eeb6 org.el (org-make-org-heading-search-string): Rewrite using org-element.el
* org.el (org-make-org-heading-search-string): Rewrite using
org-element.el.  Not an interactive function anymore.
2012-12-22 23:06:08 +01:00
Bastien Guerry f015ae5b8b org.el (org-todo): Ignore the comment string when changing a TODO state
* org.el (org-todo): Ignore the comment string when changing
the TODO state of a headline.

Thanks to Samuel Wales for reporting this.
2012-12-22 20:16:17 +01:00
Bastien Guerry dd0c6a4440 Use delq nil' instead of delete nil' in a few functions
* org.el (org-store-link): Use `delq nil' instead of `delete nil'.

* org-pcomplete.el (pcomplete/org-mode/drawer): Ditto.

* org-mobile.el (org-mobile-files-alist): Ditto.
2012-12-22 19:45:26 +01:00
Bastien Guerry 1db82b269a org.el: Don't add curly braces to bracket links within internal links
* org.el (org-store-link): When creating a link to a heading
with a bracket link, don't escape this link with curly braces
as the escaped link is not active anyway; use the description
instead.  If the headline only consists of a bracket link, add
a star to the description so that the user knows this is an
internal link.

Thanks to Dave Abrahams for triggering this.
2012-12-22 19:39:03 +01:00
Bastien Guerry 12fd14b858 org-w3m.el (org-w3m-store-link): New function
* org-w3m.el (org-w3m-store-link): New function.
2012-12-22 19:19:26 +01:00
Bastien Guerry cb05900402 org.el (org-store-link): Remove handling w3m links from this function
* org.el (org-store-link): Update the error message when no
method is available for storing a link.  Use `user-error' for
this.  Remove handling w3m links from this function.
2012-12-22 19:18:33 +01:00
Bastien Guerry 8a78d1790e org.el (org-insert-heading, org-insert-todo-heading): C-u C-u inserts at the end of the parent subtree
* org.el (org-insert-heading, org-insert-todo-heading): A
double prefix arg force the insertion of the subtree at the
end of the parent subtree.

Thanks to Esben Stien for asking this.
2012-12-22 18:47:27 +01:00
Bastien Guerry 8fddddcbc8 org.el (org-store-link): A double prefix argument now skips module store-link functions
* org.el (org-store-link): A double prefix argument now skips
module store-link functions to only use Org's core functions.
Also, when several modular store-link functions match, ask for
which one to use.

Thanks to Jonas Bernoulli for this idea.
2012-12-22 17:13:43 +01:00
Sebastien Vauban ce4e0846b2 When pasting a copied subtree, respect the whitelines before and after
* org.el (org-copy-subtree, org-paste-subtree): Fix whitespace
handling when copying/pasting a subtree.
2012-12-22 16:22:12 +01:00
Bastien Guerry 43f7659664 org.el: Don't populate the *Messages* with messages from some functions.
* org.el (org-cycle, org-cycle-internal-global)
(org-cycle-internal-local, org-display-outline-path): Let-bind
`message-log-max' to nil so that messages don't populate the
*Messages*.

Thanks to Michael Heerdegen for raising this and to Christopher Schmidt
and Michael Brand for suggesting a fix.
2012-12-22 16:06:47 +01:00
Bastien Guerry 830e231ef1 Merge branch 'maint'
Conflicts:
	lisp/ob.el
	testing/lisp/test-org-src.el
2012-12-21 09:46:49 +01:00
Bastien Guerry 9333426c12 Re-apply commit 27bcf9a together with a workaround for `process-file'.
Thanks to Michael Albinus for hunting this bug and for providing
this workaround.
2012-12-21 09:45:53 +01:00
Bastien Guerry fa17bf12d5 Merge branch 'maint'
Conflicts:
	lisp/ob.el
2012-12-21 09:33:19 +01:00
Bastien Guerry 30922bd7e9 org.el (org-edit-special): Fix docstring.
* org.el (org-edit-special): Fix docstring.
(org-in-src-block-p): Small enhancement.
2012-12-21 09:32:38 +01:00
Bastien Guerry 483aa1312d Revert "Backport revno 111277 from Emacs trunk."
This reverts commit 27bcf9a70b.
2012-12-21 08:50:26 +01:00
Bastien Guerry 5827bb299c Revert "Backport revno 111277 from Emacs trunk."
This reverts commit 27bcf9a70b.

Conflicts:
	lisp/ob.el
2012-12-21 08:49:33 +01:00
Bastien Guerry 7a6ceacd2d Merge branch 'maint' 2012-12-20 19:01:36 +01:00
Bastien Guerry f8aab87141 Fix compiler warning. 2012-12-20 19:01:17 +01:00
Bastien Guerry 24dea073bc Merge branch 'maint'
Conflicts:
	testing/lisp/test-ob-exp.el
2012-12-20 18:56:27 +01:00
Bastien Guerry 44558f0bbd Unify the list of args for org-export-as-* functions.
* org-publish.el (org-publish-org-to): Call `org-export-as-*'
functions with the correct list of arguments.

* org-html.el (org-export-as-html): Delete obsolete arg
`hidden'.
(org-export-as-html-and-open, org-export-as-html-batch)
(org-export-region-as-html): Don't use obsolete arg.

* org-ascii.el (org-export-as-ascii): Delete obsolete arg
`hidden'.
(org-export-as-ascii-to-buffer): Don't use obsolete arg.
2012-12-20 18:54:33 +01:00
Bastien Guerry a14d2673a7 Merge branch 'maint'
Conflicts:
	lisp/org.el
2012-12-20 16:37:35 +01:00
Bastien Guerry 8165be3aa5 org.el: Prevent link activation in source code blocks
* org.el (org-in-fixed-width-region-p): Save match data.
(org-in-src-block-p): Use case-folding for searching the block
boundaries.
(org-activate-plain-links, org-activate-angle-links)
(org-activate-bracket-links): Prevent link activation in
source code blocks.

Thanks to Sébastien Vauban for reporting a related issue.
2012-12-20 16:34:27 +01:00
Bastien Guerry 8cee987f79 Merge branch 'maint' 2012-12-20 16:16:09 +01:00
Bastien Guerry e89994a75c Revert "org.el (org-set-font-lock-defaults): Don't activate links in source code blocks and fixed-width regions"
This reverts commit f983cf1729.
2012-12-20 16:15:54 +01:00
Bastien Guerry feacde6c71 Merge branch 'maint' 2012-12-20 16:07:52 +01:00
Bastien Guerry de84aadf8f org-odt.el: Fix Emacs bug #13197.
* org-odt.el (org-odt-cleanup-xml-buffers): Fix Emacs
Bug#13197 by setting the correct buffer before marking it
unmodified to silently kill him.

Thanks to Drew Adams for reporting this and to Jambunathan for
offering to fix it.
2012-12-20 16:06:25 +01:00
Bastien Guerry e5539d4d58 Merge branch 'maint'
Conflicts:
	lisp/ob.el
	lisp/org.el
2012-12-20 15:54:52 +01:00
Michael Albinus 27bcf9a70b Backport revno 111277 from Emacs trunk.
* ob.el (org-babel-temp-file): Fix setting of
`temporary-file-directory' on remote hosts.

* ob-eval.el (org-babel-shell-command-on-region): Use
`process-file' instead of `call-process-region'.  The latter one
does not work on remote hosts.
2012-12-20 15:49:19 +01:00
Bastien Guerry f983cf1729 org.el (org-set-font-lock-defaults): Don't activate links in source code blocks and fixed-width regions
* org.el (org-set-font-lock-defaults): Don't activate links in
source code blocks and fixed-width regions.

Thanks to Sébastien Vauban for reporting an error related to this.
2012-12-20 15:42:53 +01:00
Bastien Guerry ab5e372926 org-agenda.el (org-agenda-finalize): Fix links activation
* org-agenda.el (org-agenda-finalize): Fix links activation.
2012-12-20 15:34:10 +01:00
Bastien Guerry 5de94e46e4 Merge branch 'maint' 2012-12-20 13:16:47 +01:00
Dmitry Antipov bfb9f9d10f Use (point-marker) instead of (move-marker (make-marker) (point))
* org-agenda.el (org-agenda-get-restriction-and-command): Use `point-marker'.
* org-capture.el (org-capture-place-template): Likewise.
* org-colview-xemacs.el (org-dblock-write:columnview): Likewise.
* org-colview.el (org-dblock-write:columnview): Likewise.
* org-mobile.el (org-mobile-locate-entry): Likewise.
* org-table.el (org-table-convert-region): Likewise.
* org.el (org-update-statistics-cookies): Likewise.
* contrib/lisp/org-invoice.el (org-dblock-write:invoice): Likewise.
2012-12-20 13:16:41 +01:00
Achim Gratz 12d53240e9 Merge branch 'maint' 2012-12-20 13:00:04 +01:00
Achim Gratz b508943d32 org-compat: new macro org-no-popups
* lisp/org-compat.el (org-no-popups): New wrapper macro which
  let-binds the correct variables to suppress popup windows depending
  on the Emacs version in use.  This is a compile-time decision when
  byte-compiling.

* lisp/org.el (org-get-location, org-switch-to-buffer-other-window):
  Use the wrapper `org-no-popups´ to let-bind the correct variables
  for suppression of popup windows.
2012-12-20 12:57:52 +01:00
Bastien Guerry 096c5644f7 Merge branch 'maint' 2012-12-20 11:13:39 +01:00
Bastien Guerry dfa3c74e34 Fix commit 14ffe2. 2012-12-20 11:13:30 +01:00
Bastien Guerry 9be19e32d1 Merge branch 'maint' 2012-12-20 09:39:48 +01:00
Bastien Guerry 14ffe22b8f org.el (org-open-at-point): Handle non-links correctly.
* org.el (org-open-at-point): Throw the correct error on
non-links.  Use `user-error' instead of `error'.

This fixes a bug introduced in ad35e2.

Thanks to Samuel Loury for spotting this and for submitting a patch.
2012-12-20 09:39:35 +01:00
Bastien Guerry beeb9168dd org-table.el: Handle localized time-stamps in formulas evaluation
* org-table.el (org-table-eval-formula): Handle localized
time-stamps by internally converting them to english during
formulas evaluation.

Thanks to Viktor Rosenfeld for suggesting this.
2012-12-20 01:36:05 +01:00
Bastien Guerry 15426c6fd0 Merge branch 'maint' 2012-12-20 01:20:21 +01:00
Bastien Guerry fd9b262d94 Fix more compiler warnings.
* org.el (org-clock-timestamps-up): Fix declarations.

* ob-core.el (org-split-string): Declare function.
2012-12-20 01:20:17 +01:00
Bastien Guerry 963ede0a9d Fix some compiler warnings.
* org.el (org-in-fixed-width-region-p): Define before use.

* org-src.el (org-in-src-block-p): Declare function.
2012-12-20 01:16:01 +01:00
Nicolas Goaziou 90de5ee463 ob-core: Fix the #+END_ directive from the :wrap param
* lisp/ob.el: Only use the :wrap argument up to the first space when creating
  the #+END_ directive.

Using an option like ":wrap SRC fundamental" was generating and end marker of
"#+END_SRC fundamental", which caused the new exporter to fail to handle to
block properly.

Patch from Michael Gauland.
2012-12-19 21:16:57 +01:00
Bastien Guerry b63128a312 Merge branch 'maint' 2012-12-19 17:44:08 +01:00
Bastien Guerry 23e2346c4c org-compat.el: Fix bug: don't use eval-when-compile' when aliasing user-error'.
* org-compat.el: Fix bug: don't use `eval-when-compile' when
aliasing `user-error'.

Thanks to Bernt Hansen for reporting this bug.
2012-12-19 17:43:57 +01:00
Achim Gratz c74c62606d Merge branch 'maint' 2012-12-19 15:34:40 +01:00
Achim Gratz b9ea74a195 Backwards compatibility for `user-error´
* lisp/org-compat.el (user-error): Defalias to `error´ for Emacsen
  that don't have it.
2012-12-19 15:33:29 +01:00
Achim Gratz bdc95549dd Backwards compatibility: use compatibility macro
* lisp/org-agenda.el (org-agenda-write): Use
  org-called-interactively-p instead of called-interactively-p.
2012-12-19 15:30:23 +01:00
Achim Gratz ea5e54f93d Merge branch 'maint' 2012-12-19 11:05:17 +01:00
Achim Gratz 9a71174348 Backwards compatibility: check for possibly undefined variables in org-find-invisible-foreground
* lisp/org.el (org-find-invisible-foreground): Do not use the value of
  variables `default-frame-alist´, `initial-frame-alist´ and
  `window-system-default-frame-alist´ when their symbol is not bound.

This avoids an error with Emacs 22, which does not define
`window-system-default-frame-alist´, that prevents the test suite from
even starting, the other variables are treated the same as a defensive
measure.
2012-12-19 11:04:22 +01:00
Bastien Guerry db28a7a0ab Merge branch 'maint' of orgmode.org:org-mode into maint 2012-12-19 00:23:59 +01:00
Bastien Guerry 77a6acff0b Merge branch 'master' of orgmode.org:org-mode 2012-12-19 00:23:46 +01:00
Bastien Guerry 57e0814ac0 Merge branch 'maint' 2012-12-19 00:23:39 +01:00
Bastien Guerry 1c57cd5a7d org-agenda.el (org-agenda-skip): Only check if point is inside a code block, not at a code block.
* org-agenda.el (org-agenda-skip): Only check if point is
inside a code block, not at a code block.

Thanks to Eric Fraga for reporting this problem.
2012-12-19 00:23:30 +01:00
Nicolas Goaziou bc4351ce0d org-element: Fix parsing of links expanded from an abbreviation
* lisp/org-element.el (org-element-object-variables): New variable.
(org-element-parse-secondary-string): Copy some buffer-local variables
to the temporary buffer created to parse the string so links can still
be properly expanded.
(org-element-link-parser): Link expansion and translation are applied
transparently for the parser.
2012-12-18 21:59:05 +01:00
Nicolas Goaziou 76cf2538bb Merge branch 'maint' 2012-12-18 19:33:47 +01:00
Nicolas Goaziou 7739e8b5f7 Small refactoring
* lisp/org.el (org-fill-paragraph): Small refactoring.
2012-12-18 19:32:50 +01:00
Ingo Lohmar 0f3264f690 org-agenda.el: Use `org-todo-keyword-faces' to highlight selected TODO keywords.
* org-agenda.el
(org-agenda-propertize-selected-todo-keywords): New function
to highlight the current agenda todo keywords depending on
`org-todo-keyword-faces'.
(org-todo-list): Use the new function.

TINYCHANGE
2012-12-18 18:47:49 +01:00
Bastien Guerry 0db5f28dd4 org-html.el and org-e-html.el: Add CSS classes to list tags.
* org-html.el (org-html-export-list-line): Add CSS classes to
these list HTML tags: <ul> <dl> and <ol>.

* contrib/lisp/org-e-html.el (org-e-html-begin-plain-list): Add
CSS classes to these list HTML tags: <ul> <dl> and <ol>.
2012-12-18 18:38:20 +01:00
Bastien Guerry bbb451a7b6 Merge branch 'maint' 2012-12-18 15:09:54 +01:00
Bastien Guerry 374efdd63e org.el (org-in-fixed-width-region-p): Rewrite using org-element.el.
* org.el (org-in-fixed-width-region-p): Rewrite using
org-element.el.

Thanks to Nicolas Goaziou for suggesting this.
2012-12-18 15:09:40 +01:00
Bastien Guerry 4996e5bd8e Merge branch 'maint' 2012-12-18 15:04:43 +01:00
Bastien Guerry 9d4dd69b30 org.el (org-fill-paragraph): Fill correctly in source code block.
* org.el (org-fill-paragraph): Fill correctly in source code
block.

Thanks to Sébastien Vauban for reporting this.
2012-12-18 12:49:49 +01:00
Bastien Guerry 1af0b39c01 Allow C-S-<up/down> to sync update clock timestamps by several units.
* org-clock.el (org-clock-timestamps-up)
(org-clock-timestamps-down, org-clock-timestamps-change): Add
an optional argument N to change timestamps by several units.

* org.el (org-shiftcontrolup, org-shiftcontroldown): Ditto.

Thanks to Rainer Stengele for this idea.
2012-12-18 12:16:20 +01:00
Achim Gratz 709bf92950 Backwards compatibility for `user-error´
* lisp/org-compat.el (user-error): Defalias to `error´ for Emacsen
  that don't have it.
2012-12-17 19:08:12 +01:00
Nicolas Goaziou 442b2ad15d Merge branch 'maint'
Conflicts:
	lisp/org-element.el
2012-12-16 00:49:22 +01:00
Nicolas Goaziou 20839ced71 org-element: Fix parsing of a list in a block in a list
* lisp/org-element.el (org-element--parse-elements,
  org-element-at-point): Fix parsing of a list in a block in a list.
* testing/lisp/test-org-element.el: Add test.
2012-12-16 00:45:17 +01:00
Eric Schulte 458824493d Revert "tangled files should not be writable"
This reverts commit 5e3b8259c7.
2012-12-15 15:14:01 -07:00
Bastien Guerry db51b80d2b Merge branch 'maint' 2012-12-14 10:34:49 +01:00
Bastien Guerry df099175e7 org.el (org-edit-special): Fix bug about editing special environments.
* org.el (org-in-fixed-width-region-p): New function.
(org-edit-special): Fix bug: make sure to DTRT in every
special environment.  Also use the new function to check
against fixed-width environment.

Thanks to Bernt Hansen for reporting a bug in this area.
2012-12-14 10:30:16 +01:00
Bastien Guerry 81d5ebce8d org-src.el (org-edit-src-code): Check if we are in a source code block with `org-in-src-block-p'.
* org-src.el (org-edit-src-code): Check if we are in a source
code block with `org-in-src-block-p'.  Slightly reformat the
docstring.
2012-12-14 10:10:40 +01:00
Bastien Guerry a7afe7df1a org.el (org-in-src-block-p): Return t when on #+BEGIN|END_SRC lines.
* org.el (org-in-src-block-p): Return t when point is at the
#+BEGIN_SRC/#+END_SRC lines unless the new optional parameter
'inside is set to t.
2012-12-14 10:02:25 +01:00
Bastien Guerry 2c164be668 Merge branch 'maint' 2012-12-13 23:47:17 +01:00
Michael Gauland 4524a02b39 Edit source: fix 'end' initialisation
* org-src.el: Create a marker to pass to copy-marker.

This fixes a 'wrong type argument' error when running
org-edit-src-code (observed on Emacs 23.2.1).

The problem was that copy-marker expects a marker, and it was given
nil. This change gives it a marker that doesn't point anywhere, but
still lets us set the insertion type of the end marker.

TINYCHANGE
2012-12-13 23:47:07 +01:00
Bastien Guerry 22e4a4ecb9 Revert "org-src.el (org-edit-src-code): Fix bug on Emacs <24.1."
This reverts commit 7a770c10c1.
2012-12-13 23:45:55 +01:00
Bastien Guerry 26d24900e1 Merge branch 'maint' 2012-12-13 17:37:04 +01:00
Bastien Guerry 0584dffefe ob-exp.el (obe-marker): Delete useless var.
* ob-exp.el (obe-marker): Delete useless var.
2012-12-13 17:36:52 +01:00
Bastien Guerry 22ee29b5ef Merge branch 'maint' 2012-12-13 17:04:48 +01:00
Bastien Guerry 7a770c10c1 org-src.el (org-edit-src-code): Fix bug on Emacs <24.1.
* org-src.el (org-edit-src-code): Fix bug triggered by the
sexp (copy-marker nil) on Emacs <24.1.

Thanks to Bernt Hansen for reporting this.
2012-12-13 17:04:38 +01:00
Bastien Guerry 8c04fb72cb org-exp.el (org-export-copy-to-kill-ring): Add a new choice 'if-interactive and use it as the default.
* org-exp.el (org-export-copy-to-kill-ring): Add a new choice
'if-interactive and use it as the default.
(org-export-push-to-kill-ring): Use the new choice.
2012-12-13 00:38:46 +01:00
Nicolas Goaziou 6e37a4d114 org-element: Fix line break parsing
* lisp/org-element.el (org-element-line-break-parser): Line break
  includes the newline character following the backslashes.
(org-element-line-break-interpreter): Apply changes to line break
parsing.
2012-12-12 22:47:12 +01:00
Eric Schulte 2c34715ae6 option to byte-compile elisp loaded from Org files
* lisp/ob-tangle.el (org-babel-load-file): When called with a prefix
  argument the tangled emacs-lisp file will be byte compiled.
2012-12-12 10:48:57 -07:00
Eric Schulte 5e3b8259c7 tangled files should not be writable
Hopefully this will help keep people from editing tangled source files
  by accident.

* lisp/ob-tangle.el (org-babel-tangle): Tangled files should not be
  writable.
2012-12-12 10:48:57 -07:00
Eric Schulte ff0081847c requiring ob now pulls in all of Babel 2012-12-12 10:48:56 -07:00
Eric Schulte 0694965865 renaming lisp/ob.el to lisp/ob-core.el 2012-12-12 10:48:56 -07:00
Achim Gratz ba59eebb12 ob-python: specify defcustom parameters
* lisp/ob-python.el (org-babel-python-hline-to,
  org-babel-python-None-to): Specify customize group as 'org-babel and
  widget type as 'string.
2012-12-12 10:48:56 -07:00
Achim Gratz 01bf706f7f org-babel: fix bug introduced in commit 78cdf149
* lisp/ob.el (org-babel-result-cond): Macro expansion needs to unquote
  formal parameter `result-params´.
2012-12-12 10:48:56 -07:00
Bastien Guerry cf9838febd org.el: Display the blocking heading when a TODO state change is blocked.
* org.el (org-block-entry-blocking): New variable.
(org-todo): Use it.  Also use `user-error' when a TODO state
change is blocked.
(org-block-todo-from-children-or-siblings-or-parent): Display
`org-block-entry-blocking' in the user-error message.

Thanks to Mirko Vukovic for triggering this change.
2012-12-12 15:59:27 +01:00
Bastien Guerry 1bfea39fd4 Support C-1' prefix for org-agenda-capture' and `org-capture'.
* org.el (org-get-cursor-date): New optional argument
WITH-TIME to add the time of the day.

* org-capture.el (org-capture): When capturing from the agenda
and with a non-nil value for `org-capture-use-agenda-date', a
`C-1' prefix will set the capture time to the HH:MM of the
current line or the current HH:MM.

* org-agenda.el (org-agenda-capture): New optional argument
WITH-TIME: when set to 1, the capture time will be set to the
HH:MM time of the current line, or the current HH:MM time.

From an agenda buffer, C-1 k (i.e. org-agenda-capture) and
C-1 M-x org-capture RET will use the time of the day of the
current line, or the current time of the day.  The date is
not changed by using this prefix.

Thanks to Rene for triggering this change.
2012-12-12 15:21:10 +01:00
Bastien Guerry 275f07c16a Merge branch 'maint' 2012-12-12 13:53:37 +01:00
Bastien Guerry 488eea6d25 org-latex.el: Escape raw path when exporting links to files.
* org-latex.el (org-export-latex-links): Escape raw path when
exporting links to files.

Thanks to John Smith for reporting this.
2012-12-12 10:57:34 +01:00
Bastien Guerry 47ea16660e Merge branch 'maint' 2012-12-12 10:14:59 +01:00
Bastien Guerry 570ecb4e31 org-src.el: Fix bug: the S-TAB key should not trigger a native TAB command.
* org-src.el (org-src-native-tab-command-maybe): Fix bug: the
S-TAB key should not trigger a native TAB command.
2012-12-12 09:09:04 +01:00
Bastien Guerry 20b3d550e0 org.el: Allow to open any link within footnotes definition, not only bracket links.
* org.el (org-open-at-point): Allow to open any link within
footnotes definition, not only bracket links.
2012-12-12 08:42:55 +01:00
Bastien Guerry 5508053d63 Merge branch 'maint' 2012-12-11 18:14:00 +01:00
Bastien Guerry 7f0e7cb9b9 org.el (org-sort-entries): Bugfix: keep track of the clock marker when sorting entries.
* org.el (org-sort-entries): Bugfix: keep track of the clock
marker when sorting entries.  Enhance the docstring.
2012-12-11 18:13:41 +01:00
Bastien Guerry 0c68a27ac9 org-clock.el (org-clock-out): Use `user-error'.
* org-clock.el (org-clock-out): Use `user-error' when the user
tries to clock out while there is no running clock.
2012-12-11 18:11:24 +01:00
Bastien Guerry c3a0dc11a3 org-table.el: Ensure table coordinates are correctly displayed when sorting.
* org-table.el (org-table-sort-lines): Ensure coordinates are
correctly displayed when sorting.

* org.el (org-do-sort): Enhance prompt.
2012-12-11 17:29:38 +01:00
Bastien Guerry 980e52282d org-agenda.el (org-agenda-finalize): Fix order of link activation.
* org-agenda.el (org-agenda-finalize): Fix order of link
activation.
2012-12-11 17:20:33 +01:00
Bastien Guerry 08e411109e org-agenda.el (org-agenda-finalize): Activate plain links.
* org-agenda.el (org-agenda-finalize): Activate plain links.
2012-12-11 17:08:00 +01:00
Bastien Guerry 57a13ab9d9 org-timer.el (org-timer-stop): Add message.
* org-timer.el (org-timer-stop): Add message.
2012-12-11 16:56:00 +01:00
Bastien Guerry 5d673e890a org-agenda.el (org-agenda-schedule, org-agenda-deadline): Fix redundant messages.
* org-agenda.el (org-agenda-schedule, org-agenda-deadline):
Fix redundant messages.
2012-12-11 16:53:44 +01:00
Bastien Guerry 1a41eeae1d org-agenda.el (org-agenda-finalize): Fix clock highlighting.
* org-agenda.el (org-agenda-finalize): Fix clock highlighting.

Thanks to Rares Pop who reported this.
2012-12-11 16:44:03 +01:00
nrichard (geodiff-mac3) 2f9ddaf699 ob: Fix org-babel-edit-distance for insertion/deletion
* lisp/ob.el (org-babel-edit-distance): When insertion or deletion are
  needed, make sure the distance is incremented.  In addition, the now
  obsolete mmin function was removed.
2012-12-07 12:41:53 -07:00
Nicolas Goaziou 31052f1c91 Fix radio targets detection
* lisp/org.el (org-all-targets): Fix radio targets detection when
  object is directly followed by a non-whitespace character.

* testing/lisp/test-org.el: Add test.
2012-12-04 23:50:26 +01:00
Bastien Guerry 6c82226406 org.el (org-latex-preview-ltxpng-directory): Fix docstring formatting.
* org.el (org-latex-preview-ltxpng-directory): Fix docstring
formatting.
2012-12-04 15:56:38 +01:00
Ivan Vilata i Balaguer 513507ee74 Allow relative times in clocktable tstart and tend options
* lisp/org-clock.el (org-clock-get-table-data): Pass tstart and tend
time strings through `org-matcher-time' to allow relative times besides
absolute ones, convert result to encoded time.
* doc/org.texi (The clock table): Document acceptance of relative times
in tstart and tend, link to syntax description and provide example.

Inspired in the original relative times proposal by Ilya Shlyakhter,
this is less invasive and it doesn't modify core functions, thus it
avoids the original's infinite recursion when hitting normal dates in
other locations.

TINYCHANGE
2012-11-30 16:07:13 +01:00
Le Wang 8d22b11978 org-src: Fix org-edit-src-code for empty blocks and block with just an empty line
* lisp/org-src.el (org-edit-src-code): Use marker with insertion type
t to track end and remove hack requiring delete from beg to (1- end).
2012-11-30 14:19:27 +01:00
Le Wang 206257aa7e org-src: Fix org-edit-src-code for empty blocks and block with just an empty line
* lisp/org-src.el (org-edit-src-code): Use marker with insertion type
t to track end and remove hack requiring delete from beg to (1- end).
2012-11-30 14:11:27 +01:00
Nicolas Goaziou 8783b89311 ob: Rename *org-babel-use-quick-and-dirty-noweb-expansion*
* lisp/ob.el (org-babel-use-quick-and-dirty-noweb-expansion): Renamed
  from *org-babel-use-quick-and-dirty-noweb-expansion*.
(org-babel-expand-noweb-references): Use new variable name.

This patch brings back the variable in the expected namespace.
2012-11-30 13:58:31 +01:00