Commit graph

4749 commits

Author SHA1 Message Date
Eric Schulte cfcf493c29 ob: If escaped return value doesn't parse cleanly, then return it literally.
* lisp/ob.el (org-babel-script-escape): If script escaped value
  doesn't parse cleanly, then return it literally.
2011-02-27 14:29:01 -07:00
Eric Schulte 563994842d ob-exp: better caching on export
- calling org-babel-process-params on the parameters before the hash
    is calculated
  - calculating the hash before the noweb references are expanded

* lisp/ob-exp.el (org-babel-exp-src-block): When block will eventually
  be evaluated, pre-calculate the hash before noweb expansion, and
  expand the parameters before hash calculation.
  (org-babel-exp-do-export): Pass pre-calculated hash through to
  `org-babel-exp-results'.
  (org-babel-exp-results): Compare pre-calculated hash to results hash.
2011-02-27 11:01:56 -07:00
Eric Schulte dd31a84af6 ob: canonical presentation of header arguments when hashing
* lisp/ob.el (org-babel-sha1-hash): Sort list values to header
  arguments, and sort the words in strings.
2011-02-27 09:40:35 -07:00
Eric Schulte 76137b16fa ob-ref: don't treat 'hline rows as lists when indexing
* lisp/ob-ref.el (org-babel-ref-index-list): Special handling of hline
  rows.
2011-02-27 09:05:15 -07:00
Julien Danjou eced270fbf org-macs: store evaluated version of pom
* lisp/org-macs.el (org-with-point-at): Store evaluated version of pom. This
fixes a potential bug when using (org-with-point-at (func) …), where (func)
would be evaluated multiple times, therefore might return different results
if a marker was returned and different each time.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-27 13:44:57 +01:00
Nicolas Goaziou c2443d48e9 fix a bug in org-open-at-point
My bad, wrong manipulation. Here is the patch.

To reproduce the error, you can type the following in a fresh Org
#+begin_src org
target some text <<<target>>> another text target
#+end_src

Using C-c C-o on any of the two links will return an error.
Regards,

>From f7738f3e9239fc4fddccc7850dad7a0936087a58 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sat, 19 Feb 2011 09:37:48 +0100
Subject: [PATCH] Fix bug with link to radio target at beginning or end of buffer

* lisp/org.el (org-open-at-point): if a link to a radio target is the
  first, (resp. the last), element of a buffer, function cannot find
  the property change required to get its boundaries, and
  `buffer-substring' is called with an invalid nil argument.
2011-02-26 18:14:38 +01:00
Bastien Guerry 0c7d8e615a org-latex.el (org-export-latex-make-header): latexify \thanks string. 2011-02-26 17:31:07 +01:00
Bastien Guerry be7490ae9e Merge branch 'master' of orgmode.org:org-mode 2011-02-26 17:17:03 +01:00
Bastien Guerry 1d404f8f96 * org-table.el (org-table-copy-down): fix docstring. 2011-02-26 17:16:41 +01:00
Eric Schulte 3ea00f215a new babel latex feature :imagemagick -- By Andreas Leha
It enables the output of graphics in a lot of formats using
  imagemagick.

* lisp/ob-latex.el (org-babel-execute:latex): Add imagemagick options,
  and for file types other than png and pdf it uses imagemagick to
  convert a compiled pdf file to the desired file type.
  (convert-pdf): Convert a pdf file to a new file type using
  imagemagick.
2011-02-26 09:15:47 -07:00
Puneeth Chaganti aa946f224d Bugfix with interactive prompt in templates expansion.
* org-capture.el (org-capture-fill-template): fix bug with
the display of interactive prompt in templates expansion.
2011-02-26 16:53:51 +01:00
Reiner Steib 3c19ab2092 * org-clock.el (org-clock-display): docstring fiw.
* org-clock.el (org-clock-display): tell to use
`org-clock-remove-overlays' to remove the display.
2011-02-26 16:29:59 +01:00
Eric Schulte 4ce05a79a0 comment blocks: explicitly append a newline to the body
* lisp/org-exp-blocks.el (org-export-blocks-format-comment):
  Explicitly append a newline to the body.
2011-02-25 17:05:20 -07:00
Nicolas Goaziou 7b211c86e7 org-list: fix insertion of item with indent-tabs-mode is non-nil
* lisp/org-list.el (org-list-insert-item): when computing size of item
  being inserted, function has to take into account that indentation
  may not only be made of spaces.
2011-02-25 20:48:27 +01:00
Nicolas Goaziou 97de64cfc3 org-clock: take full adjacent list when wraping clocks into a drawer
* lisp/org-clock.el (org-clock-find-position): if a list was adjacent
  to some clocks and a drawer was going to be created, only the first
  element of the list would make it into the drawer.
2011-02-25 18:50:29 +01:00
Nicolas Goaziou 7745ad28c3 org-list: fix checkbox toggling
* lisp/org-list.el (org-toggle-checkbox): fix bug where top item in
  list was omitted when checking boxes.

Patch from Nick Dokos.
2011-02-25 18:16:24 +01:00
Dan Davison b23d35de06 ob: R: Be more silent.
* lisp/ob-R.el: Don't print result to echo area after evaluation
2011-02-23 09:43:01 -08:00
Bastien Guerry d45739f62f * org-capture.el (org-capture-refile): Fix typo in docstring. 2011-02-23 16:47:37 +01:00
Nicolas Goaziou f4db739a67 Keep byte-compiler happy 2011-02-23 15:03:27 +01:00
Eric Schulte 4bbe31118f ob-calc: recursively resolve variables in nested parenthesis
* lisp/ob-calc.el (org-babel-execute:calc): Call out to new function
  for variables resolution.
  (ob-calc-maybe-resolve-var): Resolve (possibly recursively)
  variables in calc expressions.
2011-02-22 21:34:43 -07:00
Eric Schulte 6b02a28822 ob-C: unified naming of "c++" functions/variables to "C++"
Thanks to Martyn Jago for this patch

* lisp/ob-C.el (org-babel-tangle-lang-exts): Replace "c++" with "C++".
  (org-babel-C++-compiler): Replace "c++" with "C++".
  (org-babel-execute:cpp): Replace "c" with "C++".
  (org-babel-execute:C++): Replace "c" with "C++".
  (org-babel-expand-body:C++): Replace "c" with "C++".
  (org-babel-C-execute): Replace "c" with "C++".
2011-02-22 21:20:26 -07:00
Eric Schulte 426d4182b3 ob: more adjustments for new list handling
* lisp/ob-ref.el (org-babel-ref-at-ref-p): Only try to read results as
  a list if at the *beginning* of a list item.
* lisp/ob.el (org-babel-read-result): Only try to read results as a
  list if at the *beginning* of a list item.
2011-02-22 21:12:13 -07:00
Nicolas Goaziou 6489346093 Make byte-compiler happy 2011-02-22 20:55:41 +01:00
Nicolas Goaziou 90ad814703 org-list: indentation has precedence over visibility cycling
* lisp/org-list (org-cycle-item-indentation): do not break an
  indentation cycle because visibility cycling is requested. This
  happens when an item becomes a parent, due to indentation change.
  Not considered empty anymore, the function cannot change its
  indentation again.
2011-02-22 18:57:57 +01:00
Nicolas Goaziou 9dc1ac5660 org-list: refactor code 2011-02-22 18:46:33 +01:00
Bastien Guerry 93a8fc9849 Fix bug in org-clock-report.
* org-clock.el (org-clocktable-write-default): Bugfix: falls
back on `org-export-default-language' when no :lang parameter
is set.

Also fix various typo in comments.
2011-02-22 16:24:15 +01:00
Carsten Dominik 4ab9990b54 Simplify the function `org-capture-expand-file' 2011-02-22 14:00:24 +01:00
Carsten Dominik a821f4e922 Fix typo in code 2011-02-22 13:38:28 +01:00
Carsten Dominik c654620d73 Allow file names in capture templates to be functions, forms, or variables
* lisp/org-capture.el (org-capture-expand-file): New function.
(org-capture-target-buffer):
(org-capture-set-target-location): Use `org-capture-expand-file'.

* doc/org.texi (Template elements): Document that files can be given
as function, form, or variable.
2011-02-22 10:10:22 +01:00
Eric Schulte 1e35a5ea37 ob: updates related to list changes
* lisp/ob.el (org-babel-read-list): Reading the value of a list has
  been updated to reflect the new structure of org-mode lists in
  elisp.
  (org-babel-insert-result): Writing code block results to lists has
  been updated to reflect the new list structure.
  (org-babel-result-end): Remove a previous change to end-of-list
  marker detection
2011-02-21 12:40:49 -07:00
Nicolas Goaziou 99aa57fb20 org-list: cycling indentation must not add white spaces at eol
* lisp/org-list.el (org-cycle-item-indentation): each time the
  function moves item back to child position, a white space is added
  to the line.
2011-02-20 17:38:26 +01:00
Eric Schulte 39192b78d2 ob: allow elisp code in results header arguments
* lisp/ob.el (org-babel-process-params): Allow elisp code in
  specification of results header arguments.
2011-02-20 02:16:43 -07:00
Bastien Guerry 77c278c932 Fix small typos in docstrings. 2011-02-19 12:52:26 +01:00
Bastien Guerry 164367fbbe Merge branch 'master' of orgmode.org:org-mode 2011-02-19 12:13:56 +01:00
Bastien Guerry 3655dcbd37 New command `org-agenda-append-agenda' to append agendas.
* org-agenda.el (org-agenda-append-agenda): New command.
(org-agenda-mode-map): New keybinding to this new command.
2011-02-19 12:13:42 +01:00
Nicolas Goaziou 729564ae74 Send list only with cursor at top item
* lisp/org.el (org-ctrl-c-ctrl-c): call `org-list-send-list' only when
  cursor it at very first item of the list, as specified in the
  manual. Also refactored the list part of the function a bit.
2011-02-19 11:27:53 +01:00
Nicolas Goaziou 2366083b82 Remove org-entry-get from ignore-errors macro 2011-02-19 10:51:38 +01:00
Bastien Guerry c6dbde1bab Fix bug when redoing a block agenda command.
* org-agenda.el (org-agenda): Set the 'last-args property to
nil when calling `org-agenda'.  Don't kill the local variable
`org-agenda-current-span'.
(org-run-agenda-series): Use the new property 'last-args.
(org-agenda-change-time-span): Use the dynamically set
`org-agenda-overriding-arguments' variable when non-nil.

Thanks to Matt Lundin and Michael Brand for reporting this.
2011-02-18 15:15:54 +01:00
Eric Schulte 10d76f720a ob: adjust to changes in list format
* lisp/ob.el (org-babel-result-end): Adjust marker of list end to
  changes in the list format.
2011-02-18 06:13:29 -07:00
Nicolas Goaziou fde7e150bb org-list: docstrings changes 2011-02-18 13:43:49 +01:00
Nicolas Goaziou 19ea827cd7 org-list: unwrap org-entry-get from ignore-errors
* lisp/org-list.el (org-toggle-checkbox, org-update-checkbox-count):
  no need to wrap org-entry-get in ignore-errors since commit
  7dd425cc5d
2011-02-18 13:43:49 +01:00
Nicolas Goaziou 713262edc1 Preserve hierarchy when converting items to headlines and the other way
* lisp/org.el (org-toggle-item, org-toggle-heading): make sure every
  sub-item in a list is changed into a sub-heading and sub-headings
  are translated into sub-items. Also ignore inline tasks in the
  process.

org-toggle-item on headlines preserves hierarchy
2011-02-18 13:43:49 +01:00
Nicolas Goaziou de3d3652bb org-html: use non breaking space for empty checkboxes 2011-02-18 13:43:48 +01:00
Nicolas Goaziou 1ac0ac16ac org-html: remove unused local variable 2011-02-18 13:43:48 +01:00
Nicolas Goaziou 3d34dd47dd org-html: remove unneeded newline characters in list export 2011-02-18 13:43:48 +01:00
Nicolas Goaziou 4fd61d8021 org-html: unchecked boxes should not appear checked without CSS 2011-02-18 13:43:48 +01:00
Nicolas Goaziou feb1a17083 org-exp: set correct text properties when replacing special blocks
* lisp/org-exp.el (org-export-select-backend-specific-text): add
  `original-indentation' property when replacing #+begin_backend and
  #+backend blocks with their content. This is needed for lists, as
  they must know if the block belonged to them.
2011-02-18 13:43:46 +01:00
Nicolas Goaziou f6bbdaf7cc org-list: minor fix in regexp 2011-02-18 12:45:13 +01:00
Nicolas Goaziou b43ad47ad1 Insert a newline character before <\li> when exporting lists
* lisp/org-html.el (org-html-export-list-line): insert a newline
  character before ending an item, as anchor could be on a line
  going to be deleted, like a drawer ending string.
* lisp/org-list.el (org-list-to-html): same.
2011-02-18 12:45:13 +01:00
Nicolas Goaziou 2de0a87f7d org-list: apply removal of org-invisible-p 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 5adafe0c8d Changes to filling in items
* lisp/org.el (org-set-autofill-regexps): use `org-item-re' in
  `paragraph-start' to recognize alphabetical lists.
(org-fill-paragraph): enforce a pre-computed fill-prefix before
  calling fill-paragraph when point in in an item. Also prevent
  paragraphs getting merged into an adjacent list upon filling.
(org-adaptive-fill-function): make sure to determine real fill-prefix
  for auto-fill.
(org-auto-fill-function): use a pre-computed fill-prefix before
  calling do-auto-fill.
* lisp/org-list.el (org-list-item-body-column): new function
2011-02-18 12:45:12 +01:00
Nicolas Goaziou b7f6a916b3 Fix toggling and cycling visibility for items and inline tasks
* lisp/org-inlinetask.el (org-inlinetask-at-task-p,
org-inlinetask-toggle-visibility): new functions.
* lisp/org-list.el (org-list-set-item-visibility): new function.
* lisp/org.el (org-cycle, org-cycle-internal-local): separate lists
  and inline tasks from headlines.
(org-outline-level): do not consider lists as headlines.
  Cycling visibility is using different tools.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 69cc51fa43 C-c C-c also repairs ill-formed lists
* lisp/org-list.el (org-list-struct): mark items less indented than
  top item of the list, so that they will be modified.
(org-list-struct-apply-struct): compare struct's indentation with
  line's indentation instead of old-struct's. This is needed because
  `org-list-struct' automatically fixes indentation so changes might not
  be seen otherwise.
* lisp/org.el (org-ctrl-c-ctrl-c): small refactoring.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou e5a61ab260 org-list: update cookies in special contexts
* lisp/org-list.el (org-update-checkbox-count): when a part of the
  buffer is processed to count checkboxes, lists are read from top to
  bottom, but inside lists (in drawers, blocks, or inline tasks) are
  skipped. Thus, cookies cannot be updated. This patch enforces
  reading of such lists if counter is itself in a special context.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou f7ebd6bcf0 org-list: ignore inline tasks when shifting an item, and fix indentation
* lisp/org-list.el (org-list-struct-apply-struct): inline tasks along
  with their content must stay at column 0 even if the item is gaining
  indentation. Moreover, fix indentation of text in an inline task,
  now it can be in such a task within a list.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 349196def4 org-list: forgot a default case in org-list-struct 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 7ce76a7acc org-list: refactor org-list-struct 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0148fac717 org-list: make org-at-item-p less permissive
* lisp/org-list.el (org-at-item-p): also verify context is valid.
  Otherwise it would recognize valid items where org-in-item-p
  wouldn't.
(org-in-item-p, org-list-struct-apply-struct): use shorter version of
org-at-item-p.
(org-cycle-list-bullet): fix typo.
(org-list-parse-list): avoid calling org-at-item-p two times by using
an appropriate regexp
* lisp/org.el (org-indent-line-function): use an appropriate regexp
  instead of calling org-at-item-p two times.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0bec47e9ab org-list: keep byte-compiler happy 2011-02-18 12:45:12 +01:00
Nicolas Goaziou 3017425c48 org-list: fix org-in-item-p when point is just after an ending regexp
* lisp/org-list.el (org-in-item-p): When point was just after
  org-list-end-re, check wouldn't be done for starting line. So, if
  the first line was an item, it wouln't be noticed and function would
  return nil. Simplify and comment code.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou f7dbea5989 Fix small bug in org-toggle-item
* lisp/org.el (org-toggle-item): when used on normal text, ensure
  every line in region is included in the new item, regardless of its
  original indentation.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 0850948dea org-list: small bug fix in org-list-struct-apply-struct
* lisp/org-list.el (org-list-struct-apply-struct): if end of list was
  at eol, for example, with list inside a block, the last list
  wouldn't be shifted. Thus, the patch ensures no blank lines is
  skipped.
2011-02-18 12:45:12 +01:00
Nicolas Goaziou 304e8f1cd2 Change behavior of org-toggle-item when used with normal text.
* lisp/org.el (org-toggle-item): Now accepts a prefix argument. When
  used without argument on normal text, it will make the whole region
  one item. With an argument, it defaults to old behavior: change each
  line in region into an item.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou 89c066a10c Newline-and-indent respects list structure
* lisp/org.el (org-return): when called from inside an item with the
  indent flag, function should keep text moved inside the item. This
  allows to use C-j to separate lines in an item: cursor won't go back
  to column 0.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou dcf23c416f org-list: ignore lines with org-example property when creating structure
* lisp/org-list.el (org-list-struct): when a line has org-example
  property, skip the entire block. This is needed during export, for
  example when src blocks in org markup contain lists, and are
  returned verbatim because org isn't in the list of interpreted
  languages.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou d309256aff org-list: fix corner cases in org-in-item-p
* lisp/org-list.el (org-in-item-p): handle special cases when function
  is called with cursor amidst `org-list-end-re' or at an inline task.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou 12de47aa5a org-list: code cleanup 2011-02-18 12:45:11 +01:00
Nicolas Goaziou bd68169b4b org-list: reorder file, rename functions, improve comments
* lisp/ob.el (org-babel-result-end): apply renaming.
* lisp/org-exp.el (org-export-mark-list-properties): apply renaming.
* lisp/org-list.el (org-list-prevs-alist): renamed from
  org-list-struct-prev-alist.
(org-list-parents-alist): renamed from org-list-struct-parent-alist.
(org-list-write-struct): renamed from org-list-struct-fix-struct.
(org-list-parse-list, org-sort-list, org-list-indent-item-generic,
org-toggle-checkbox, org-update-checkbox-count, org-cycle-list-bullet,
org-list-repair, org-insert-item, org-move-item-up, org-move-item-up,
org-move-item-down, org-next-item, org-previous-item,
org-end-of-item-list, org-beginning-of-item-list, org-apply-on-list):
apply renaming.
(org-get-bullet): removed function, as it is not needed anymore.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou a02d2ad13e org-list: separate tasks needed to insert a new item more clearly
* lisp/org-list.el (org-list-insert-item-generic): change arguments.
  The function now accepts structure and previous items alist. This
  allow to insert an item programmatically more easily.
(org-insert-item): Apply changes to org-list-insert-item-generic. The
  function now takes care about repairing structure and updating
  checkboxes.
* lisp/org-timer.el (org-timer-item): Apply changes to
  org-list-insert-item-generic. The function now takes care about
  repairing structure.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou e7ca7c98dd org-list: modifications to org-list-to-generic
* lisp/org-list.el (org-list-make-subtree): function now uses
  org-list-parse-list mechanism.
(org-list-make-subtrees): removed function.
(org-list-to-generic): added a parameter and every parameter can be a
  sexp returning a string, for finer control.
(org-list-to-html, org-list-to-latex, org-list-to-texinfo): slight
  modifications to apply changes to org-list-to-generic.
(org-list-to-subtree): new function.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou 4efa974264 Fix for `org-beginning-of-line' at an item
* lisp/org.el (org-beginning-of-line): apply changes to
  `org-item-beginning-re' to correct sub-expression reference.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou 3e274d0290 org-list: small refactoring and comments improvements 2011-02-18 12:45:11 +01:00
Nicolas Goaziou 4636453e93 Do not enforce type of ordered lists upon exporting
* lisp/org-docbook.el (org-export-docbook-list-line): even with
  alphabetical lists, Org shouldn't enforce a particular list type to
  exporters. This is a job for style files.
* lisp/org-html.el (org-html-export-list-line): ib idem.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou 212828c556 org-list: correctly handle counters in `org-list-parse-list'
* lisp/org-list.el (org-at-item-counter-p): new function.
(org-list-parse-list): handle counters and list depth.
(org-list-to-generic): a special string is used when an item has a
counter.
(org-list-to-latex): use new special string for counters. This fixes
the counter bug in LaTeX export, as the enumi counter was the only one
modified.
* lisp/org-latex.el (org-export-latex-lists): use new
`org-list-parse-list' output.
2011-02-18 12:45:11 +01:00
Nicolas Goaziou cddea8c542 org-list: new accessor returning type of list
* lisp/org-list.el (org-list-get-list-type): new function.
(org-list-parse-list): use new function.
* lisp/org-html.el (org-html-export-list-line): use new function.
* lisp/org-docbook.el (org-export-docbook-list-line): use new function.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 781228183a org-list: implement alphabetical lists
* lisp/org-list.el (org-alphabetical-lists): new variable
(org-item-re, org-list-full-item, org-cycle-list-bullet,
org-list-struct-fix-bul, org-list-inc-bullet-maybe): reflect
introduction of the new variable.
(org-item-beginning-re): changed into a function, so any modification
of `org-alphabetical-lists' will not require reloading Org.
(org-at-item-p, org-toggle-checkbox, org-update-checkbox-count,
org-list-parse-list, org-list-send-list): reflect changes to
`org-item-beginning-re'.
(org-list-use-alpha-bul-p): new function.
* lisp/org.el (org-check-for-hidden): reflect changes to
`org-item-beginning-re'.
* lisp/org-capture.el (org-capture-place-item): reflect changes to
`org-item-beginning-re'.
* lisp/org-docbook.el (org-export-docbook-list-line): handle new type
of items.
* lisp/org-exp.el (org-export-mark-list-end,
org-export-mark-list-properties): reflect changes to
`org-item-beginning-re'.
* lisp/org-html.el (org-html-export-list-line): handle new type of
items.
* lisp/org-latex.el (org-export-latex-lists): handle new type of items
and reflect changes to `org-item-beginning-re'.
* lisp/org-ascii.el (org-export-ascii-preprocess): handle new counters.

Modified from a patch by Nathaniel Flath.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou e5293ba347 org-list: checkbox count code cleanup 2011-02-18 12:45:10 +01:00
Nicolas Goaziou 2c79244687 Change function org-list-end-re into a variable
* lisp/org-list.el (org-list-end-re): removed function and made it a
  variable. There's no need for the overhead of calling the function
  every at every line in a list. User will have to reload Org if he
  change value of either `org-list-end-regexp' or
  `org-empty-line-terminates-plain-lists'.
(org-in-item-p,org-list-struct,org-list-parse-list): apply change.
* lisp/org-exp.el (org-export-mark-list-end,
  org-export-mark-list-properties): apply change
* lisp/org-latex.el (org-export-latex-lists): apply change. Also
  prevent items with org-example property to be considered as real
  items.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 215d3fa030 Improve usage of `org-in-item-p'
When the function needs to know if cursor is in a plain list and move
to item beginning if it is the case, a fast way is to ignore errors on
(goto-char (org-in-item-p)).
2011-02-18 12:45:10 +01:00
Nicolas Goaziou d7a799cc86 org-inlinetask: fix export of inline tasks within lists
* lisp/org-inlinetask.el (org-inlinetask-export-templates): slightly
  modify templates so environment boundaries don't interfere with
  content of task. Unprotect content of task so it might benefit from
  further transformations. Set original-indentation property to a high
  value to ensure that task is always in the last item of the list.
  Also, apply templates later in export process.
* lisp/org-list.el (org-list-struct): fix inline task skipping.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 79553c4764 org-list: fixes for incorrect number of arguments 2011-02-18 12:45:10 +01:00
Nicolas Goaziou eeea385b0b org-latex: during export process, only unprotected items are valid
* lisp/org-latex.el (org-export-latex-lists): Search for unprotected
  items only, and redefine `org-at-item'. This change is required when
  verbatim lists are inserted during export, usually by Babel.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou b219690f05 ob: compute correct end position when results are a list
* lisp/ob.el (org-babel-result-end): end position is end of current
  sublist instead of bottom point, as results might be inserted in a
  list themselves.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou c82805fc57 org-list: small fixes for org-list-struct 2011-02-18 12:45:10 +01:00
Nicolas Goaziou fc6c418726 org-list: remove code preventing insertion of an item in a block
* lisp/org-list.el (org-list-automatic-rules): removed insert rule.
(org-list-insert-item-generic): removed code preventing user to insert
another item in a block within a list. It is because new list context
make it impossible to see if a point in a block is also in a list.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 23e5d5720e org-exp: split list processing in two parts to better handle org-babel
* lisp/org-exp.el (org-export-preprocess-string): mark list endings
  before babel blocks preprocessing starts, so blank lines that may be
  inserted do not break list's structure. Then, mark list with special
  properties required by exporters. Thus output from babel can easily
  be included in lists.
(org-export-mark-list-end): new function
(org-export-mark-list-properties): new function
(org-export-mark-lists): removed function. It was split into the two
  preceding functions.
2011-02-18 12:45:10 +01:00
Nicolas Goaziou 39d85b5e39 org-list: small optimization for cookies updating
* lisp/org-list.el (org-update-checkbox-count): do not recompute every
  list before next heading when there are more than one cookie in an
  headline. Moreover, ignore the case where cookie is inserted neither
  at an heading nor at an item.
2011-02-18 12:45:09 +01:00
Nicolas Goaziou 2621fe0461 Do not remove empty list items in HTML and DocBook export 2011-02-18 12:45:09 +01:00
Nicolas Goaziou c32e39786d org-list: small corrections to sort list
* lisp/org-list.el (org-sort-list): fix number of arguments to
  `org-list-repair', plus make end-record go to end of item before any
  blank line to keep them from being swallowed in the sorting.
2011-02-18 12:45:09 +01:00
Nicolas Goaziou 884d983188 org-list: fix code typo 2011-02-18 12:45:09 +01:00
Nicolas Goaziou b37761715e Added variable to configure where lists should be interpreted
* lisp/org-list.el (org-list-forbidden-blocks): variable renamed from
  org-list-blocks.
(org-list-export-context): new variable

* list/org-exp.el (org-export-mark-lists): use new variable.

* list/org-latex.el (org-export-latex-lists): use new variable
2011-02-18 12:45:09 +01:00
Nicolas Goaziou 212a7ddced org-list: small fix in insert function 2011-02-18 12:45:09 +01:00
Nicolas Goaziou da6a10b02d Modified behavior in searches specific to lists
* lisp/org-list.el (org-list-search-generic): renamed form
  org-search-unenclosed-generic to reflect now behavior. Now, match
  can only be in a valid context for lists, as determined by
  `org-list-context'.
(org-list-search-backward): renamed from
org-search-backward-unenclosed.
(org-list-search-forward): renamed from org-search-forward-unenclosed.
(org-toggle-checkbox,org-update-checkbox-count): use new functions.
(org-sort-list): using default regexp search functions as context is
not required in this case.

* lisp/org-ascii.el (org-export-ascii-preprocess): use new function

* lisp/org-capture.el (org-capture-place-item): use new function
2011-02-18 12:45:09 +01:00
Nicolas Goaziou 8aa95608e5 org-list: small refactoring 2011-02-18 12:45:09 +01:00
Nicolas Goaziou 504b497b7f org-list: handle case when moving top item without its subtree 2011-02-18 12:45:09 +01:00
Nicolas Goaziou f66e9cbfd5 org-list: fix insert-item with added data to structure 2011-02-18 12:45:09 +01:00
Nicolas Goaziou 69e02a73de Modified export engines for lists
* lisp/org-exp.el (org-export-mark-lists): new function, replacing
  org-export-mark-list-ending. It adds information as text properties
  to every list, before changes done by exporter destruct them.

* lisp/org-html.el (org-export-as-html): delegate list handling to
  external function org-html-export-list-line.
(org-html-export-list-line): new function.

* lisp/org-latex.el (org-export-latex-lists): small modification.
2011-02-18 12:45:09 +01:00
Nicolas Goaziou bf1776b494 org-list: added new accessors
* lisp/org-list.el (org-list-get-first-item): new alias for
  org-list-get-list-begin
(org-list-get-last-item): new function
(org-list-get-list-end): use org-list-get-last-item
2011-02-18 12:45:09 +01:00
Nicolas Goaziou 0f589a33b2 org-list: added description tag as data in structures 2011-02-18 12:45:09 +01:00
Nicolas Goaziou 6c81e8cc05 Move org-get-string-indentation out of org-list.el
* lisp/org.el (org-get-string-indentation): moved in generally useful
  functions section, as it wasn't specific to plain lists and that no
  code was using it in org-list.el.
2011-02-18 12:45:09 +01:00
Nicolas Goaziou fa1ed96d00 org-list: code comments and doc-strings improvements 2011-02-18 12:45:08 +01:00
Nicolas Goaziou 2adbcfffe1 Remove uses of deprecated top-point and bottom-point functions
* lisp/org.el (org-skip-over-state-notes,org-store-log-note): use new
  accessors.

* list/ob.el (org-babel-result-end): use new accessors.

* list/org-exp.el (org-export-mark-list-ending): use new accessors.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou 148deffd4e org-list: move error messages in interactive indent/outdent functions
* list/org-list.el (org-list-indent-item-generic): remove error
  messages happening before process. This belongs to interactive
  functions.
(org-indent-item,org-indent-item-tree,
   org-outdent-item,org-outdent-item-tree): ensure point or region is
   correct before computing list structure. Return an error message
   otherwise.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou 9230df2e0d org-list: rewrite of org-apply-on-list
* lisp/org-list.el (org-apply-on-list): use new structures. Function
  is now applied in reverse order so modifications do not change
  positions of items in buffer.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou e2c1ec92a4 org-list: new parsing of lists
* org-list.el (org-list-parse-list): rewrite of function to allow text
  following a sub-list in the same item. See docstring for an example
  of output.
(org-list-to-generic): use new parsing function.
(org-list-to-latex,org-list-to-html): minor change for clearer export.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou 14df1d59d4 org-list: various fixes to accessors
* org-list.el (org-list-has-child-p): renamed from org-list-get-child.
  Returning first child is only useful as a predicate, as we're
  allowing an item to have more than one sub-list.
(org-list-indent-item-generic): use `org-list-has-child-p' instead of
  org-list-get-child.
(org-in-item-p): also return item beginning when list starts at
  context beginning.
(org-list-get-parent): use of `org-list-struct-parent-alist' helper
  function is not optional anymore.
(org-list-get-all-items): shorten code with the help of cl.el.
(org-list-get-children): now returns all children of item, even if
  they do not belong to the same list. Renamed from
  org-list-get-all-children.
(org-list-get-list-begin): function wasn't return value when item was
  already the first item of the list at point.
(org-list-get-list-end): function wasn't return value when item was
  already the last item of the list at point.
(org-list-struct-fix-box,org-update-checkbox-count): now uses
  `org-list-get-children'.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou c12ce921d7 Checkboxes do not change indentation in lists
* org.el (org-indent-line-function): Indentation of item's body starts
  just after the bullet, not after a checkbox. Moreover, As
  `org-in-item-p' also returns item beginning position when point is
  in a list, do not compute it a second time.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou e223357743 Lighten process when C-c C-c is called at a list item
* org.el (org-ctrl-c-ctrl-c): when called at a list item, replace
  usage `org-repair-list', forcing another reading of the list, with
  only needed subroutines.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou ddcd5d480f org-list: rewrite of insert-item code.
* org-list.el (org-list-separating-blank-lines-number): use new
  accessors.
(org-list-insert-item-generic): use list structures to insert a new
  item.
(org-list-exchange-items): refactor and comment code. Now return new
  struct instead of modifying it, as list sorting would sometimes eat
  first item.
(org-move-item-down,org-move-item-up): reflect changes to
  `org-list-exchange-items'.
(org-insert-item): as `org-in-item-p' also computes item beginning
  when applicable, reuse the result.

* org-timer.el (org-timer-item): as `org-in-item-p' also computes item
  beginning when applicable, reuse the result.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou e865ce445a org-list: interactive navigation functions use accessors
* lisp/org-list.el (org-list-in-item-p): unify methods for this predicate.
(org-list-in-item-p-with-indent): removed function
(org-list-ending-between): removed function
(org-list-maybe-skip-block): removed function
(org-list-in-item-p-with-regexp): removed function
(org-list-top-point-with-regexp): removed function
(org-list-top-point-with-indent): removed function
(org-list-bottom-point-with-indent): removed function
(org-list-bottom-point-with-regexp): removed function
(org-list-get-item-same-level): removed function
(org-list-top-point): removed function
(org-list-bottom-point): removed function
(org-get-item-beginning): renamed to org-list-get-item-begin to be
consistent with naming policy of non-interactive functions.
(org-get-beginning-of-list): removed function
(org-beginning-of-item-list): use new accessors
(org-get-end-of-list): removed function
(org-end-of-list): use new accessors
(org-get-end-of-item): removed function
(org-end-of-item): use new accessors
(org-get-previous-item): removed function
(org-previous-item): use new accessors
(org-get-next-item): removed function
(org-next-item): use new accessors
(org-end-of-item-before-blank): renamed to
(org-list-get-item-end-before-blank): Use new accessors.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou b2c369725a org-list: keep byte-compiler happy 2011-02-18 12:45:08 +01:00
Nicolas Goaziou af8da7965c org-list: interactive tools use new structures
* org-list.el (org-list-repair): removed optional argument
  FORCE-BULLET. The job of this interactive function is to completely
  fix a list at point. Changing bullets is a separate task. Also
  removed others optional arguments TOP and BOTTOM to follow the new
  structures.
(org-list-indent-item-generic): remove need for TOP and BOTTOM. STRUCT
is a new required argument. This avoids computing a list structure
many times when function is called more than once in a row, for
example in org-cycle-item-indentation. Use new accessors. Now, also
call `org-update-checkbox-count-maybe'.
(org-outdent-item,org-indent-item,org-outdent-item-tree,org-indent-item-tree):
remove need for TOP and BOTTOM.
(org-list-insert-item-generic): reflect changes to `org-list-repair'.
(org-list-exchange-items): use new accessors. Now modify struct to
avoid re-reading it later.
(org-move-item-down): reflect changes to `org-list-repair'. Use new
accessors.
(org-move-item-up): reflect changes to `org-list-repair'. Use new
accessors.
(org-cycle-list-bullet): use new structures. Also use a shortcut to
`org-list-struct-fix-struct' in order to avoid unnecessary fixes, like
`org-list-struct-fix-box'
(org-sort-list): use of new structures. Renamed an internal function
for a little more clarity.
(org-cycle-item-indentation): remove dependency on org-list-repair.
Use new accessors.
(org-list-get-child): correct bug when asking for the child of the
last item
(org-list-exchange-items): use new accessors.
2011-02-18 12:45:08 +01:00
Nicolas Goaziou d48a6cf50d org-list: new way to get structure of a list and new accessors
* lisp/org-list.el (org-list-blocks): new variable
(org-list-context): new function
(org-list-full-item-re): new variable
(org-list-struct-assoc-at-point): use new varible
(org-list-struct): rewrite of function. Now, list data is collected by
looking at the list line after line. It reads the whole list each time
because reading only a subtree was not enough for some operations,
like fixing checkboxes. It also removes the need to get
`org-list-top-point' and `org-list-bottom-point' first. An added data
is the position of item ending. This aims to be able to have list
followed by text inside an item.
(org-list-struct-assoc-end): new function
(org-list-struct-parent-alist): new function
(org-list-get-parent): new function
(org-list-get-child): new function
(org-list-get-next-item): new function
(org-list-get-prev-item): new function
(org-list-get-subtree): use helper function `org-list-struct-prev-alist'.
(org-list-get-all-items): new function
(org-list-get-all-children): new function
(org-list-get-top-point): new function
(org-list-get-bottom-point): new function
(org-list-get-counter): new function
(org-list-get-item-end): new function
(org-list-struct-fix-bul): rewrite for cleaner code. Make use of new
accessors.
(org-list-struct-fix-ind): make use of new accessors.
(org-list-struct-fix-box): new function
(org-list-struct-fix-checkboxes): removed function
(org-list-struct-outdent): use new accessors. Use the fact that there
is no longer a virtual item at beginning of structure.
(org-list-struct-indent): use helper functions
`org-list-struct-prev-alist' and `org-list-struct-parent-alist'. Also
use new accessors.
(org-list-struct-fix-struct): comment function. Call directly
`org-list-struct-apply-struct', without removing unchanged items
first.
(org-list-struct-apply-struct): comment function. Rewrite using new
accessors. Use new variable `org-list-full-item-re'.
(org-list-shift-item-indentation): removed function, now included in
`org-list-struct-apply-struct' because it is too specific.

Conflicts:

	lisp/org-list.el
org-list: new way to get structure of a list and new accessors

* lisp/org-list.el (org-list-blocks): new variable
(org-list-context): new function
(org-list-full-item-re): new variable
(org-list-struct-assoc-at-point): use new varible
(org-list-struct): rewrite of function. Now, list data is collected by
looking at the list line after line. It reads the whole list each time
because reading only a subtree was not enough for some operations,
like fixing checkboxes. It also removes the need to get
`org-list-top-point' and `org-list-bottom-point' first. An added data
is the position of item ending. This aims to be able to have list
followed by text inside an item.
(org-list-struct-assoc-end): new function
(org-list-struct-parent-alist): new function
(org-list-get-parent): new function
(org-list-get-child): new function
(org-list-get-next-item): new function
(org-list-get-prev-item): new function
(org-list-get-subtree): use helper function `org-list-struct-prev-alist'.
(org-list-get-all-items): new function
(org-list-get-all-children): new function
(org-list-get-counter): new function
(org-list-get-item-end): new function
(org-list-struct-fix-bul): rewrite for cleaner code. Make use of new
accessors.
(org-list-struct-fix-ind): make use of new accessors.
(org-list-struct-fix-box): new function
(org-list-struct-fix-checkboxes): removed function
(org-list-struct-outdent): use new accessors. Use the fact that there
is no longer a virtual item at beginning of structure.
(org-list-struct-indent): use helper functions
`org-list-struct-prev-alist' and `org-list-struct-parent-alist'. Also
use new accessors.
(org-list-struct-fix-struct): comment function. Call directly
`org-list-struct-apply-struct', without removing unchanged items
first.
(org-list-struct-apply-struct): comment function. Rewrite using new
accessors. Use new variable `org-list-full-item-re'.
(org-list-shift-item-indentation): removed function, now included in
`org-list-struct-apply-struct' because it is too specific.

Conflicts:

	lisp/org-list.el
2011-02-18 12:45:07 +01:00
Nicolas Goaziou 1829aa79b5 org-list: use list structure to update checkboxes and cookies
* lisp/org-list.el (org-toggle-checkbox): use structures to fix
  checkboxes of a list
(org-update-checkbox-count): use structures to update cookies
2011-02-18 12:45:07 +01:00
Nicolas Goaziou 8a3a81c08e org-list: fix checkboxes directly from list structures
* lisp/org-list.el (org-list-struct-fix-checkboxes): new function
(org-checkbox-blocked-p): removed function
2011-02-18 12:45:07 +01:00
Nicolas Goaziou 7e57111524 org-list: implement new accessors to list structures
* lisp/org-list.el (org-list-get-all-items): new function
(org-list-get-all-children): new function
(org-list-get-nth): new function
(org-list-set-nth): new function
(org-list-get-ind): new function
(org-list-set-ind): new function
(org-list-get-bullet): new function
(org-list-set-bullet): new function
(org-list-get-checkbox): new function
(org-list-set-checkbox): new function
(org-list-struct-fix-bul): use new accessors
(org-list-repair): use new accessors
(org-list-indent-item-generic): make use of accessors
(org-list-get-parent): renamed from org-list-struct-get-parent
(org-list-get-child): renamed from org-list-struct-get-child
(org-list-struct-fix-ind): make use of accessors
(org-list-get-next-item): new function
(org-list-get-subtree): new function
2011-02-18 12:45:07 +01:00
Nicolas Goaziou cad24d757d org-list: add checkbox to list structures
* lisp/org-list.el (org-list-struct-assoc-at-point): add checkbox to
  list structure
* lisp/org-list.el (org-list-struct-assoc-at-point): add checkbox as
  value in structure
* lisp/org-list.el (org-list-struct-apply-struct): also apply checkboxes
2011-02-18 12:45:07 +01:00
Bastien Guerry e16c502b4a org-latex.el: fix bug about #+BIND directive not followed.
* org-latex.el (org-export-latex-content): bind local variables
for export in the temporary export buffer.

Thanks to Andreas Leha for reporting this.
2011-02-18 11:25:11 +01:00
David Maus 373caa4d1c Change date of obsolete declaration to 2011-02-17
* org-protocol.el (org-protocol-unhex-single-byte-sequence)
(org-protocol-unhex-string, org-protocol-unhex-compound): Change date
of obsolete declaration to 2011-02-17.
2011-02-17 20:21:54 +01:00
David Maus 0d6dacd978 Throw error if encoding character in utf8 fails
* lisp/org.el (org-link-escape): Throw error if encoding character in
utf8 fails.
2011-02-17 19:26:49 +01:00
David Maus 0590bb7fe1 Use `org-link-unescape' instead of obsolete unhex string function
* lisp/org-protocol.el (org-protocol-split-data) (org-protocol-open-source):
Use `org-link-unescape' instead of obsolete unhex string function.
2011-02-17 19:26:49 +01:00
David Maus 139cc1d4c2 Always percent escape the percent sign
* lisp/org.el (org-link-escape, org-link-escape-chars-browser)
(org-link-escape-chars): Always percent escape the percent sign.
2011-02-17 19:26:49 +01:00
David Maus 7b58cccddd Refactor unescaping functions
* org.el (org-link-unescape): Simpler algorithm for replacing percent
escapes.
(org-link-unescape-compound): Use cond statements instead of nested
if, convert hex string with string-to-number, save match data.
(org-link-unescape-single-byte-sequence): Use mapconcat and
string-to-number for unescaping single byte sequence.
2011-02-17 19:26:49 +01:00
David Maus dc76fd5d71 Rename lambda argument
* org.el (org-link-escape): Rename lambda argument.
2011-02-17 19:26:49 +01:00
David Maus 1350e57626 Add percent sign to list of escape chars
* org.el (org-link-escape-chars-browser, org-link-escape-chars): Add
percent sign to list of escape chars.
2011-02-17 19:26:49 +01:00
David Maus d8c2cad3ef Use new percent escape character table format
* org-mobile.el (org-mobile-escape-olp): Use new percent escape
character table format.
2011-02-17 19:26:48 +01:00
David Maus 98bf28c52f Remove obsolete argument in call to org-link-unescape
* org-mobile.el (org-mobile-locate-entry): Remove obsolete argument in
call to org-link-unescape.

`org-link-unescape' always unescapes all percent escaped sequences.
2011-02-17 19:26:48 +01:00
David Maus 17f3548e78 Declare obsolete & alias to respective org-link-unescape-* functions
* org-protocol.el (org-protocol-unhex-string)
(org-protocol-unhex-compound)
(org-protocol-unhex-single-byte-sequence): Declare obsolete and
alias to respective org-link-unescape-* functions.
2011-02-17 19:26:48 +01:00
David Maus 51e665622c Unescape functions moved and renamed from org-protocol.el
* org.el (org-link-unescape, org-link-unescape-compound)
(org-link-unescape-single-byte-sequence): Functions moved and renamed
from org-protocol.el.
2011-02-17 19:26:48 +01:00
David Maus 465940d6c2 Inline function to properly decode utf8 characters in Emacs 22
* org-macs.el (org-char-to-string): Inline function to properly decode
utf8 characters in Emacs 22.  Moved and renamed from org-protocol.el.

* org-protocol.el (org-protocol-unhex-compound): Use renamed inline
function.
2011-02-17 19:26:48 +01:00
David Maus 27915744a2 New optional argument: Merge user table with default table
* org.el (org-link-escape): New optional argument.  Merge user table
with default table.
2011-02-17 19:26:48 +01:00
David Maus 41c771378a Fixup doc string
* org.el (org-link-escape): Fixup doc string.
2011-02-17 19:26:48 +01:00
David Maus 1a68b67939 New format of percent escape table
* org.el (org-link-escape-chars, org-link-escape-chars-browser): New
format of percent escape table.
(org-link-escape): Use new table format.

Just a plain list with the chars that should be escaped.
2011-02-17 19:26:48 +01:00
David Maus 0c4bb0e406 New unicode aware percent encoding algorithm
* org.el (org-link-escape): New unicode aware percent encoding
algorithm.
2011-02-17 19:26:48 +01:00
Sebastian Rose 196a9d7b2b Decode single byte sequence if decoding unicode failed.
* org-protocol.el (org-protocol-unhex-single-byte-sequence): New
function.  Decode hex-encoded singly byte sequences.
(org-protocol-unhex-compound): Use new function if decoding sequence
as unicode character failed.
2011-02-17 19:26:48 +01:00
Bastien Guerry 17351b924f org-clock.el: require 'org-exp to set `org-export-default-language'.
Thanks to Matt Lundin for reporting this.
2011-02-17 17:38:57 +01:00
Bastien Guerry c7700d7bbe * org-html.el (org-export-as-html): expand the HTML title.
This fix is a modified version of a patch submitted by Pierre Téchoueyres.
2011-02-16 11:53:28 +01:00
Bastien Guerry 045214f9d2 org-special-blocks.el: mention that backend is dynamically scoped. 2011-02-16 11:40:53 +01:00
Bastien Guerry 4b8d74150f Fix bug: fetch the updated title of a page when creating the sitemap.
* org-publish.el (org-publish-cache-ctime-of-src): improve
docstring.
(org-publish-find-title): New option to explicitly reset the
title in the cache.
(org-publish-format-file-entry): Use this new option.

Thanks to Jonathan Bisson for reporting this.
2011-02-16 11:39:13 +01:00
Bastien Guerry d03d3575cb Code cleanup: always use 'backend instead of htmlp, latexp, etc. 2011-02-16 10:58:04 +01:00
Bastien Guerry 4db5a1edcf `org-clock-clocktable-language-setup': added spanish translation.
Thanks to Juan Pechiar for providing the translation.
2011-02-16 00:48:05 +01:00
Bastien Guerry 0382a62303 `org-clock-clocktable-language-setup': Fix translation. 2011-02-15 18:27:36 +01:00
Bastien Guerry 0491e5305e `org-export-default-language': Better docstring. 2011-02-15 18:25:43 +01:00
Dan Davison fda90a9aad New function `org-clone-local-variables'.
* org-exp.el (org-export-preprocess-string): Set the source
buffer and use `org-clone-local-variables' to get local
variables from it.

* org.el (org-clone-local-variables): New function.
2011-02-15 18:03:58 +01:00
Bastien Guerry a9da06b1db org-latex.el: minor docstring clean up. 2011-02-15 15:01:25 +00:00
Dan Davison 695b15da6d Allow empty strings in minted/listings latex options
* lisp/org-exp.el (org-export-format-source-code-or-example):
Allow empty string as second element in minted/listings options

Both

    (setq org-export-latex-minted-options
          '(("frame" "lines")
            ("fontsize" "\\scriptsize")
            ("linenos" "")))

and

    (setq org-export-latex-minted-options
          '(("frame" "lines")
            ("fontsize" "\\scriptsize")
            ("linenos")))

will result in latex like

\begin{minted}[frame=lines,fontsize=\scriptsize,linenos]{common-lisp}
2011-02-15 15:01:25 +00:00
Dan Davison 65d0b3d353 New UI for configuring latex src code export.
Three new user-customizable variables:

org-export-latex-listings-options (default nil)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Association list of options for the latex listings package.

These options are supplied as a comma-separated list to the
\\lstset command. Each element of the association list should be
a list containing two strings: the name of the option, and the
value. For example,

  (setq org-export-latex-listings-options
    '((\"basicstyle\" \"\\small\")
      (\"keywordstyle\" \"\\color{black}\\bfseries\\underbar\")))

will typeset the code in a small size font with underlined, bold
black keywords.

Note that the same options will be applied to blocks of all
languages.

See ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf

customization group: org-export-latex

org-export-latex-minted-options (default nil)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Association list of options for the latex minted package.

These options are supplied within square brackets in
\\begin{minted} environments. Each element of the alist should be
a list containing two strings: the name of the option, and the
value. For example,

  (setq org-export-latex-minted-options
    '((\"bgcolor\" \"bg\") (\"frame\" \"lines\")))

will result in src blocks being exported with

\\begin{minted}[bgcolor=bg,frame=lines]{<LANG>}

as the start of the minted environment. Note that the same
options will be applied to blocks of all languages."

customization group: org-export-latex

See minted.googlecode.com/files/minted.pdf

org-export-latex-custom-lang-environments (default nil)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Association list mapping languages to language-specific latex
environments used during export of src blocks by the listings
and minted latex packages. For example,

  (setq org-export-latex-custom-lang-environments
     '((python \"pythoncode\")))

* lisp/org-exp.el (org-export-format-source-code-or-example):
  Support new user-customizable options
(org-export-latex-custom-lang-environments): Ensure new variable is defined
(org-export-latex-listings-options): Ensure new variable is defined
(org-export-latex-minted-options): Ensure new variable is defined

* lisp/org-latex.el (org-export-latex-listings-options): New variable
(org-export-latex-minted-options): New variable
(org-export-latex-custom-lang-environments): New variable
2011-02-15 15:01:25 +00:00
Bastien Guerry e51aa0eaa5 Bugix: keep backward-compatible with the old default of `org-export-html-validation-link'.
* org-html.el (org-export-as-html): handle the case when
`org-export-html-validation-link' is nil to keep backward
compatible with the old default value of this variable.

Thanks to Sébastien Vauban for spotting this.
2011-02-15 15:57:20 +01:00
Bastien Guerry ed6d676026 Code cleanup: use a generic :for-backend parameter. 2011-02-15 11:07:46 +01:00
Bastien Guerry 0f01b842bb Small bug fix to org-ascii-level-start (again). 2011-02-15 10:47:26 +01:00
Eric Schulte e9cba96b0a ob: fix indentation bug when inserting results from inline code blocks
* lisp/ob.el (org-babel-insert-result): Don't choke if indent is not a number.
2011-02-14 23:51:40 -07:00
Bastien Guerry d9eeb15ab9 Fix bug when jumping to a datetree from the agenda.
Datetree entries have a fixed form now:

* 2011
** 2011-02 monthname
*** 2011-02-13 dayname

These headings will not be recognized as datetrees:

* 2011 A task for 2011
** 2011-02 several words
*** 2011-02-13 several words

Thanks to Detlef Steuer for reporting this.
2011-02-15 06:07:53 +01:00
Christian Moe 740afd558d org-bbdb-export: use a better description.
* org-bbdb.el (org-bbdb-export): When a link description has been
added by org-export-normalize-links, use path instead (remove the
`bbdb:' prefix).

The existing code handled the case where desc is nil. However, this no
longer occurs, since org-export-normalize-links now automatically adds
a desc to links, with a `bbdb:' prefix that would not usually be
wanted in exported text. The patch results in the same output as
originally intended.

TINYCHANGE
2011-02-15 05:37:17 +01:00
Bastien Guerry 8ee7408edb `org-export-ascii-underline' is now order from level 1 to n.
* org-ascii.el (org-export-ascii-underline): Put the level's
characters in the right order, as documented by the docstring.
(org-ascii-level-start): select the right char for underlining
headlines.
2011-02-15 05:30:00 +01:00
Bastien Guerry 846a2d13d3 Code cleanup: use (org-mode-p) when possible. 2011-02-15 05:18:22 +01:00
Bastien Guerry a923f528cd org-src.el: allow source editing from modes derived from Org.
* org-src.el (org-edit-src-code): allow to edit source code
from modes derived from Org.
2011-02-15 05:04:22 +01:00
Niels Giesen 5f7c880c4d `org-clock-clocktable-language-setup': add dutch strings.
* lisp/org-clock.el (org-clock-clocktable-language-setup): Add list of
dutch strings.
2011-02-14 22:02:45 +01:00
Dan Davison ef4c6c8785 Fix use of minted with beamer export
* lisp/org-beamer.el: Mark frame as fragile when it is using minted
for src block export.
2011-02-14 11:00:49 +00:00
Bastien Guerry 7a108e1fc6 org-vm.el: properly handle virtual folders.
This fix is inspired by comments from Arik Mitschang.
2011-02-14 11:14:25 +01:00
Bastien Guerry fa9dfe52b6 Fix bug when scattering deadline and improve org-agenda-bulk-mark-regexp.
* org-agenda.el (org-agenda-date-later)
(org-agenda-date-earlier): Enhance docstrings.
(org-agenda-bulk-mark-regexp): Only match against headlines.
Send a message when no entry is marked.
(org-agenda-bulk-action): Fix bug about scattering deadlines.
Send an error when trying to scatter outside an agenda or a
timeline view.  Silently fail when trying to scatter sexp
entries.
2011-02-13 17:40:08 +01:00
Bastien Guerry 9b23f082ea lisp/org-clock.el: allow to set the language through a new :lang parameter.
* org-clock.el (org-clock-clocktable-language-setup): New
custom variable.
(org-clocktable-defaults): Set the default language.
(org-clocktable-write-default): Use the new variable.
2011-02-13 13:57:06 +01:00
Bastien Guerry 706f2da458 org-ascii.el: Fix bug when picking up the underline char. 2011-02-13 12:43:39 +01:00
Bastien Guerry 7c489ff0f5 Merge branch 'master' of orgmode.org:org-mode 2011-02-13 12:16:03 +01:00
Valentin Wüstholz e409a59dfa org-latex.el: Fontify timestamps in headlines.
(org-export-latex-fontify-headline): Fontify timestamps in
headlines.
2011-02-13 12:15:08 +01:00
Dan Davison 1d1368e142 ob: Maintain in-context text properties when listing search hits in minibuffer
* lisp/ob.el (org-babel-src-block-names): Don't strip text properties from search hits
(org-babel-result-names): Don't strip text properties from search hits
2011-02-13 11:13:32 +00:00
Dan Davison 8e4b9b3a6a ob: python: Don't bother removing echoed output in value mode
* lisp/ob-python.el (org-babel-python-evaluate-session): Pass nil as
remove-echo part of META argument to `org-babel-comint-with-output'

The regexp matching involved in this procedure can fail on large input
data, so we only do it when necessary (i.e. output mode).
2011-02-13 11:03:58 +00:00
Dan Davison a8f2163d76 ob: `substring' comparison instead of regexp matching
* lisp/ob.el (org-babel-script-escape): Use `substring' comparison
instead of regexp matching

Workaround for regexp limitation, e.g.

(string-match
 "^\\[.+\\]$"
 (concat
  "["
  (mapconcat (lambda (i) "x") (number-sequence 1 33500) "")
  "]"))

gives "Stack overflow in regexp matcher" in several current builds.
2011-02-13 11:03:58 +00:00
Dan Davison 10f5ac643d Reorganize org-edit-src-code; allow buffer-local `org-edit-src-content-indentation'
* lisp/org-src.el (org-edit-src-code): When generating the code edit
buffer, it is necessary for several variables to inherit their values
from the parent org buffer. These changes collect all such variables
together into a single association list of (variable-name value)
pairs. In addition, a new variable is added to the list:
`org-edit-src-content-indentation'. This has the effect that a buffer
local value can be used for that variable.
2011-02-13 11:00:17 +00:00
Dan Davison 477a8deb31 ob: Don't truncate sbe results
This permits sbe to be used to retrieve multiline results. An example
of usage is with the :shebang and :preamble header args,

 #+srcname: get-shebang
 #+begin_src org
 initial
 shebang
 lines
 here
 #+end_src

 #+begin_src emacs-lisp :shebang (sbe get-shebang)
 stuff
 #+end_src

* lisp/ob-table.el (sbe): Don't truncate sbe results
2011-02-13 10:52:58 +00:00
Lawrence Mitchell aa6dba8a74 Only match complete words in org-export-add-options-to-plist
* org-exp.el (org-export-add-options-to-plist): Require match to start
at a word-boundary.

Previously, if an option was the suffix of another option (such as TeX
and LaTeX) the setting for the former would propagator to the latter.
This seems like an unintended consequence of a lax regexp in
org-export-add-options-to-plist.  This patch allows options to share a
suffix with another option by requiring that the match against an
option starts at a word-boundary.
2011-02-13 00:47:51 +01:00
Bastien Guerry 2fb8bff528 * org-latex.el (org-export-latex-hyperref-format): Update docstring. 2011-02-13 00:43:46 +01:00
Tom Dye 03ddcc63bb * lisp/org.el: Update documentation of `org-add-link-type'. 2011-02-13 00:31:52 +01:00
Dan Davison 4d880b150f Fix bug when using prefix arg to construct `org-link-search' call.
* lisp/org.el (org-open-at-point): Fix bug when using prefix arg to
construct `org-link-search' call. Rename prefix arg with a more
generic name, to reflect its diverse uses in this function.
2011-02-12 23:56:36 +01:00
Bastien Guerry f956c242f3 Make org-icalendar-date-time-format backward compatible. 2011-02-12 21:15:06 +01:00
Rémi Vanicat d1a6092233 Add explicit time zone to datetime exported to ical.
* org-icalendar.el (org-icalendar-use-UTC-date-time): remove.
(org-icalendar-date-time-format): New custom variable.
(org-icalendar-use-UTC-date-timep): New function.
(org-ical-ts-to-string): Use the new variable.

----
When exporting to ical, using localtime is incompatible with some
software, using explicit universal time may failed with daylight
saving time, so we need another possibility, that is localtime with
explicit timezone.
2011-02-12 20:57:59 +01:00
Bastien Guerry 8fd354cf0e Merge branch 'master' of orgmode.org:org-mode 2011-02-12 19:39:20 +01:00
Bastien Guerry d95e468744 org-vm.el: check if buffer refers to a file when storing a link.
* org-vm.el (org-vm-store-link): Make sure the buffer is
associated with a file when trying to store an Org link.
2011-02-12 19:39:06 +01:00
Dan Davison 934e6b0510 ob: Allow ":header-arg-name" as matching property name.
* lisp/ob.el (org-babel-params-from-properties): Test for
"header-arg-name" and ":header-arg-name", in that order.
2011-02-12 18:26:10 +00:00
Bastien 08650cbb5c Allow (currentfile) for capture templates.
* org-capture.el (org-capture-templates): document currentfile
for capture template.
(org-capture-templates): Allow to use currentfile for capture
templates.
(org-capture-set-target-location): Handle currentfile as a way
to setting the capture buffer.

* org.texi (Template elements): document currentfile for
capture templates.
2011-02-12 19:07:52 +01:00
Bastien Guerry 03c33d0d38 Don't wrap org-entry-get into condition-case.
* ob.el (org-babel-params-from-properties): don't wrap
org-entry-get into condition-case.

* org-table.el (org-table-export): don't wrap org-entry-get
into condition-case.

* org.el (org-store-link): don't wrap org-entry-get into
condition-case.
2011-02-12 19:02:52 +01:00
Bastien Guerry f0c9e8d672 Whitespace and indentation cleanup. 2011-02-12 18:53:07 +01:00
Dan Davison 7dd425cc5d Allow properties to be retrieved before first heading in file.
* lisp/org.el (org-entry-get): Don't look for a property drawer if we
are before the first heading in the file.
(org-entry-get-with-inheritance): Don't attempt to move up the tree if
we are before the first heading in the file. Also, enclose less of the
function in the save-excursion.
2011-02-12 18:51:40 +01:00
Bastien Guerry 2df6f65e23 Merge branch 'master' of orgmode.org:org-mode 2011-02-12 16:53:21 +01:00
Bastien Guerry 8ec508b128 Add org-notmuch.el by Matthieu Lemerre to contrib/lisp/. 2011-02-12 16:53:10 +01:00
Dan Davison 775d962788 ob: Fix bug in using #+babel properties in fresh buffer
* lisp/ob.el (org-babel-params-from-buffer): Return desired value
rather than nil from failed re search.
2011-02-12 15:29:07 +00:00
Bastien Guerry 3b77c7ed57 org-latex.el: fix bug when using #+INCLUDE before the first heading.
The LaTeX looks for strings to export before the first headline.  Such
strings are defined as "before the first heading", so they normally never
match a heading regexp.  However, #+INCLUDE can insert lines before the
first heading matching a heading regexp, causing these lines to appear
twice: as first lines and as normal headings.

The fix is to never include first lines when they match a heading regexp.

This was reported by Rasmus <rasmus.pank@gmail.com>.
2011-02-12 16:01:40 +01:00
Bastien Guerry 6132405d05 org-agenda.el: small stylish fix: always use equal. 2011-02-12 14:03:08 +01:00
Bastien Guerry 905d2f7489 Fix small docstring typo. 2011-02-12 14:00:26 +01:00
Bastien Guerry 6d6d24581d Put multiline diary entries on a single line.
* org-agenda.el (org-get-entries-from-diary): Put multiline
diary entries on a single line when lines don't start with a
diary time.

This was requested by Suvayu Ali.
2011-02-12 13:08:14 +01:00
Bastien Guerry 3a04522ef1 New variable org-export-html-protect-char-alist.
* org-html.el (org-export-html-protect-char-alist): New custom
variable to define characters to be HTML protected.
(org-html-protect): Use the new variable.
2011-02-12 12:49:50 +01:00
Manuel Giraud dbb46ae6b1 Better sitemap formating
Hi,

Here's a patch that make the sitemap entry formating coherent with the
new html-pre/postamble one.

While here I was trying to add some documentation about this feature in
org.texi but I end up copy/pasting or paraphrasing the docstring of
correspondant customs. Is it acceptable for the documentation or plain
useless?

>From 766b0db7d0189d2edb0d8799c3424d62f9ac4e47 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
Date: Fri, 11 Feb 2011 15:32:58 +0100
Subject: [PATCH] org-publish.el: sitemap formating coherent with new preamble

Adopt downcase for format directive to be coherent with the new
pre/postamble formating.

Use `format-spec' function instead of `org-replace-escapes'.
2011-02-11 17:35:52 +01:00
Bastien Guerry 99d507dfc4 org-print-icalendar-entries: use org-export-exclude-tags. 2011-02-11 14:00:10 +01:00
Bastien Guerry e318bacdbf Use # to separate the info file and the node in Org links.
* org-info.el (org-info-store-link): use "#" to separate the
info file and the node.
(org-info-follow-link): use both "#" to separate the info file
and the node.  Continue to use ":" for backward compatibility.
2011-02-11 13:38:39 +01:00
Bastien Guerry 6f29af3440 New custom variable `org-icalendar-honor-noexport-tag'.
* org-icalendar.el (org-icalendar-honor-noexport-tag): New
custom variable.
(org-print-icalendar-entries): Use this new variable to
prevent export of entries with a :noexport: tag.

This was requested by Juraj Kubelka.
2011-02-11 12:03:26 +01:00
Bastien Guerry 3411a9d759 New variable to set the initial export scope.
* org-exp.el (org-export-initial-scope): new custom variable.
(org-export): Use this new variable.  If there is an active
region, tell it when prompting the user for an export command.
Also change the way the function handles selection of buffer
and subtree export.

----
Now `1' switches between subtree/buffer export until the user
select an export command.  Also, when there is an active region,
modify the message so that the user is aware he will only export
the surrounding subtree.
2011-02-11 10:44:35 +01:00
Bastien Guerry da8dc7bba7 Rewrite the handling of HTML preamble/postamble.
* org-html.el (org-export-html-auto-preamble)
(org-export-html-auto-postamble): Remove.
(org-export-html-preamble, org-export-html-postamble): Turn
into custom variables.  Update the docstrings.
(org-export-html-preamble-format)
(org-export-html-postamble-format): New custom variables.
(org-export-as-html): Use org-export-html-postamble-format and
org-export-html-preamble-format.
(org-export-html-title-format): delete.

* org-exp.el (org-export-plist-vars): Remove
:auto-preamble and :auto-postamble.  Rename :preamble and
:postamble to :html-preamble and :html-postamble.

* org-publish.el (org-publish-project-alist): Remove
:auto-preamble and :auto-postamble.  Rename :preamble and
:postamble to :html-preamble and :html-postamble.

* org.texi (Publishing options): replace :preamble and
:auto-preamble by :html-preamble (same for postamble.)
2011-02-11 01:27:15 +01:00
Eric Schulte f9c833dad0 org-exp-blocks: deprecating begin_dot and begin_ditaa blocks, will be removed soon
* lisp/org-exp-blocks.el (org-export-blocks-format-ditaa): This
  function is begin deprecated in favor of begin_src blocks.
  (org-export-blocks-format-dot): This function is begin deprecated in
  favor of begin_src blocks.
2011-02-10 10:00:06 -07:00
Eric Schulte 840052b910 Merge branch 'master' of orgmode.org:org-mode 2011-02-10 09:35:05 -07:00
Eric Schulte 7b720d28a6 ob: adding no-expand to list of header argument names
* lisp/ob.el (org-babel-header-arg-names): no-expand is now part of
  the default header argument names list.
2011-02-10 09:34:46 -07:00
Valentin Wüstholz 39d5acd33c org-latex.el: match horizontal rules with HTML regexp
Also a slight update of the manual about horizontal rules.
2011-02-10 17:03:31 +01:00
Bastien Guerry a6554b2fdf Fix bug when creating datetree heading.
When a heading like

* 2011 Do this

existed, the creation of a datetree for the year 2011 didn't work,
as the "2011 Do this" heading was mistaken for such a datetree.

This has been reported by Charles Cave.
2011-02-10 15:54:48 +01:00
Bastien Guerry e4b762af34 org-agenda.el: fix bug about wrong current span.
Locally kill org-agenda-current-span as a variable, otherwise
the current value of org-agenda-current-span is taken as the
default value when redoing the buffer or calling org-agenda
with a different view.

This might be a temporary fix, as Julien is looking for a
more general solution.  See his message here:

http://article.gmane.org/gmane.emacs.orgmode/37359
2011-02-10 15:30:09 +01:00
Bastien Guerry 7473e3cc78 Revert "Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]"
This reverts commit ca7aeada15.
2011-02-09 17:30:20 +01:00
Manuel Giraud 641144ef26 org-publish.el: allow formatting of sitemap entries.
* org-publish.el (org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): new custom variables.
(org-publish-projects): use these variables to format the
sitemap entries.
2011-02-09 17:12:18 +01:00
Ulf Stegemann c56d295b9b org-gnus.el: Allow org-link creation from message-mode.
* org-gnus.el (org-gnus-store-link): Allow org-link creation from
message-mode.
2011-02-09 16:54:36 +01:00
Carsten Dominik ce217d153a Merge branch 'agenda-refresh-clocktable-on-filter-change' 2011-02-09 10:10:04 +01:00
Carsten Dominik 09c5ff8359 Refresh agenda when updating the filter while the clock report is following
* lisp/org-agenda.el (org-agenda-filter-by-tag): Refresh agenda when
updating the filter while the clock report is following the filter.

When the clock table in the agenda has been set up to respect the
current agenda tags filter, modifying the filter will now
automatically rebuild the agenda to make sure that also the clock
report is updated along with it.  Updating the entire agenda is not
strictly necessary - updating the table would be enough.  However,
right now we do not really have a function that will update only the
clock table, as inserting the table is currently part of building the
agenda itself.  Maybe someone can optimize this in the future.

This feature was requested by Sebastien Vauban.
2011-02-09 09:04:04 +01:00
Julien Danjou ca7aeada15 Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]
On Sat, Feb 05 2011, Matt Lundin wrote:

> This results in only a day view because org-agenda-current-span is still
> 'day.

Here's a proposal fix.

I could have setq org-agenda-current-span to nil as a work around, but
it seems more logical to just kill all the local variables. That is, a
custom agenda view would not keep any of the local variable of the
previous agenda, which seems logical to me.

>From b48fc7c395dffea60df20c23b26e362ac0354b01 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 7 Feb 2011 12:36:42 +0100
Subject: [PATCH] org-agenda: kill local variables in agenda view

* org-agenda.el (org-agenda): Kill all local variables. This
assures we are not keeping buffer variable from an old agenda view
when switching to a new custom agenda.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-08 18:05:31 +01:00
Manuel Giraud 334cf2038d Adds sort options when publishing the sitemap
This patch adds sort options to the sitemap.  In addition to
alphabetical order, one can choose chronological or anti-chronological
ordering of sitemap entries.  To retrieve file date, it tries to parse
the "#+date" keyword and if not present defaults to file modification
time.
2011-02-08 17:51:17 +01:00
Christoph Groth 2214788528 org-bbdb: allow anniversaries with unknown years
Anniversaries in BBDB can be now also specified in the format MM-DD
next to YYYY-MM-DD.
2011-02-08 16:57:53 +01:00
Julien Danjou 4ec289e1c4 org-crypt: cache encrypted text
* lisp/org-crypt.el (org-encrypt-string): New function.
(org-encrypt-entry): Use org-encrypt-string to encrypt, so we use cached
crypted values.
(org-decrypt-entry): Store crypted text in decrypted text.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-08 16:55:45 +01:00
Stephen Eglen a598bd5a02 org-mhe-store-link alters window layout
If I run M-x org-store-link when my current emacs frame is just showing
one MH-E window (and nothing else in the frame), e.g. the "show-+inbox"
buffer, then the link to that email is created okay, but the window
frames are altered so that the +inbox summary window is also shown.
In general, the previous window contents are forgotten.  I suggest
adding a 'save-window-excursion' into org-mhe-store-link so that the
window arrangement is preserved on exit from the function.

Patch below is long just because of the extra indentation.

Stephen
2011-02-08 16:54:53 +01:00
Dan Davison 88b793946b ob: Fix bug in export of lob one-liners
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Only replace the
match if a non-nil result is returned
2011-02-07 22:27:14 +00:00
Bastien Guerry 9e8f1ddcd8 Fix typo. 2011-02-07 16:35:59 +01:00
Carsten Dominik ca220e9c40 Merge branch 'fix-todo-list-with-extended-today' 2011-02-06 08:14:58 +01:00
Bastien Guerry 68cf793ba9 Merge branch 'master' of orgmode.org:org-mode 2011-02-04 23:22:40 +01:00
Eric Schulte 27d98d8793 adding faces for block backgrounds and begin/end lines
Patch by Sébastien Vauban
  Committed by Eric Schulte with one tiny change
2011-02-04 13:47:58 -07:00
Eric Schulte 496ea6c527 ob: changing the default header args for inline code blocks 2011-02-04 13:28:51 -07:00
Dan Davison 123f3b774c make export dispatcher go away promptly
Following on from Stephen's recent post, a
thing-that-slightly-bothers-me is the way the export dispatcher window
doesn't go away until export is complete. I've briefly looked at the
code twice now and it wasn't obvious to me why the save-window-excursion
(line 941 org-exp.el) wasn't already doing what I wanted. However, the
change below seems to have the effect I wanted. While this particular
solution may be a hack, I wonder whether people would prefer its
behaviour? E.g. try exporting this:

#+title: title

#+begin_src sh :exports results
sleep 5 && echo hello
#+end_src

export can often take several seconds and it's nice to be able to zone
out looking at your org document rather than the dispatcher window.

	Modified lisp/org-exp.el

(I see that (sit-for .0001) is used in a couple of places in Org for
this effect, so maybe that should be used instead.)

Dan
2011-02-04 20:02:26 +01:00
Carsten Dominik 73be48bdf9 Fix bug that would show empty todo list on extended todays
* lisp/org-agenda.el (org-agenda-get-day-entries): Compare DATE with
modified today.

When a user sets org-extend-today-until, the agenda TODO list would
come up empty when requested in the extension period between midnight
and org-extend-today-until.  This problem is new, it was caused by a
patch that introduced the function org-today and used it also
in org-todo-list.

The reason why this caused a problem is a bit difficult.  The agenda
need a date to be defined, and getting todo entries is subject to the
current date being today.  This is a leftover condition from the times
when the TODO list was often part of the daily agenda listing, and the
test is there to avoid that the TODO list comes also up when looking
at the agenda for tomorrow.  Much of this is irrelevant now, because
people use either block agendas, or separate views - but the old
functionality is retained for backward compatibility.

This patch fixes the problem by making `org-agenda-get-day-entries'
check for the date computed by `org-today'.
2011-02-04 17:47:03 +01:00
Bastien Guerry a9d2e4240a Merge branch 'refine-org-agenda-repeating-timestamp-show-all' 2011-02-04 10:56:59 +01:00
Bastien Guerry 28b88bbb11 Fix bug in org-update-parent-todo-statistics.
* org.el (org-update-parent-todo-statistics): fix bug when
updating statistics from the column view.

This was reported by James Deaton and confirmed by Bernt Hansen.
2011-02-04 10:44:29 +01:00
Bastien Guerry 809b505ef0 Add a new command: org-agenda-bulk-mark-regexp
* org-agenda.el (org-agenda-bulk-mark-regexp): New command.
(org-agenda-menu): Add the new command to the menu.
(org-agenda-mode-map): Add % as the keybinding for the new
command.
2011-02-03 20:03:51 +01:00
Bastien Guerry 814871c42b Fix docstring typo in org-link-search-must-match-exact-headline. 2011-02-03 18:00:16 +01:00
Bastien Guerry b93aa70551 Fix bug in org-export-target-internal-links.
* org-exp.el (org-export-target-internal-links): Locally turn
on `org-link-search-must-match-exact-headline' to match exact
internal links.

Thanks to Jambunathan K for spotting this.
2011-02-03 17:59:56 +01:00
Bastien Guerry dfbdc547d5 Revert "(org-scan-tags): Optimize a bit the regexp search."
This reverts commit 0b7ce5f47d.
2011-02-03 17:35:51 +01:00
Julien Danjou d840de551c face: make org-special-keyword inherit
* org-faces.el (org-special-keyword): Make it inherited from font-lock-keyword-face.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-02 19:46:58 +01:00
Julien Danjou 44e68033ee face: make org-link inherit from link
* org-faces.el (org-link): Make org-link inherits from link face.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-02 19:46:29 +01:00
Bastien Guerry 0b7ce5f47d (org-scan-tags): Optimize a bit the regexp search. 2011-02-02 19:27:51 +01:00
Bastien Guerry 7b72c57e15 (org-hidden-keywords): Fix docstring. 2011-02-02 16:29:56 +01:00
Bastien Guerry 16b408bd06 (org-block-regexp): Now also match dynamic blocks. 2011-02-02 16:12:27 +01:00
Bastien Guerry b3c3746d92 New function org-narrow-to-block.
* org.el (org-narrow-to-block): New function to narrow to block.
Bound this function to `C-x n b'.
* org.texi (Dynamic blocks, Structure editing): Mention
the function `org-narrow-to-block'.

This is inspired by a request by Leonidas Tsampros.
2011-02-02 11:47:41 +01:00
Bastien Guerry 4828e3c2d0 Fix bug when using org-schedule/org-deadline on timestamps with complex repeaters.
* org.el (org-schedule, org-deadline): Fix bug: take care of
repeating timestamps like ".+1d/3d" or "+1d 10d".
2011-02-02 11:04:50 +01:00
Puneeth Chaganti b6efc82dd0 org-html.el: Fix bug about remaining "@" when exporting timestamps. 2011-02-02 10:45:55 +01:00
Bastien Guerry f121bc5e72 Make org-agenda-repeating-timestamp-show-all aware of TODO keywords.
* org-agenda.el (org-agenda-repeating-timestamp-show-all):
Allow to use a list of TODO keywords as the value of this
variable.  The agenda will show repeating stamps for entries
matching these TODO keywords.
(org-agenda-get-timestamps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Allow the use of a list of
keywords in `org-agenda-repeating-timestamp-show-all'.

---
This was suggested by Jeff Horn and supported by Detlef Steuer.
2011-02-02 10:35:56 +01:00
Bastien Guerry 8158131e7a Remove org-export-latex-use-verb.
* org-latex.el (org-export-latex-emph-format): Don't use
`org-export-latex-use-verb'.  Remove this variable.

This variable was introduced by Carsten for testing purpose,
it was not meant to be a user variable.
2011-02-01 18:03:57 +01:00
Bastien Guerry b2838f40ff Delete useless ChangeLog file. 2011-02-01 18:00:56 +01:00
Jason Dunsmore ca69b55624 Fix bug when exporing inactive timestamps.
* org-html.el (org-html-handle-time-stamps): fix bug when
exporing inactive timestamps.
2011-02-01 17:46:57 +01:00
Bastien Guerry 4cc1063dd2 Define and use org-archive-subtree-add-inherited-tags.
* org-archive.el (org-archive-save-context-info): Fix
docstring typo.
(org-archive-subtree-add-inherited-tags): New variable to
control whether inherited tags should be appended to local
tags when archiving subtrees.
(org-archive-subtree): Use the new variable.

This feature was suggested by Carsten, after a request by Osamu OKANO.
2011-02-01 16:09:04 +01:00
Bastien Guerry 5af82bac46 * org-archive.el (org-archive-save-context-info): Fix docstring typo. 2011-02-01 15:29:46 +01:00
Bastien Guerry e236d54acc Merge branch 'master' of orgmode.org:org-mode 2011-02-01 13:09:28 +01:00
Osamu Okano a017fca37f Various docstrings typo fixes by Osamu OKANO. 2011-02-01 13:05:13 +01:00
Julien Danjou 86bb47fcac org-crypt: fix decrypt outline display bug
* org-crypt.el (org-decrypt-entry): Delete \n on top level heading.
This avoids a display bug showing the heading outlined where the text
is not since it does not have the outline property.
Restore subtree visibility state after decryption.

Cc: John Wiegley <johnw@gnu.org>
Cc: Peter Jones <pjones@pmade.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-01 12:53:59 +01:00
Julien Danjou bf46c32aad Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]
On Mon, Jan 17 2011, Carsten Dominik wrote:

> have you been following this thread?  I think this has to do with your
> rewrite of the dagenda span stuff.  Maybe you can find out better and
> faster that I why this goes wrong?  Please read the entire thread.

I've followed but not sure I understood what the bug is. But from my
various tries, I found a bug: when pressing 'j', the current span is
discarded.

Attached is a patch that should fix that, even for future use of
`org-agenda-list' with the span unspecified. :)

>From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 17 Jan 2011 16:05:28 +0100
Subject: [PATCH] Fix agenda span on date jump

* org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
possible default span if it is set.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-01 12:52:00 +01:00
Dan Davison bbb28d5bf8 Get rid of extra help message when editing src code
* lisp/org-src.el (org-edit-src-persistent-message): Change docstring.
(org-edit-src-code): Get rid of help message in echo area.
* lisp/ob.el (org-babel-do-in-edit-buffer): Do not pass 'quietly
argument to org-edit-src-code as this has been removed
2011-02-01 11:44:32 +00:00
Bastien Guerry 3b2bb9760e * org-latex.el (org-export-latex-emphasis-alist): use
\protectedtexttt for the =...= emphasis and \verb for the
~...~ emphasis.
(org-export-latex-use-verb): now defaults to t.
(org-export-latex-emph-format): distinguish between =...= and
~...~ emphasis.

---
This patch was submitted by Carsten as a variation on Thomas Dye's
original patch.
2011-02-01 11:21:34 +01:00
Bastien Guerry e6f51d2485 Merge branch 't/patch568' 2011-01-31 21:36:55 +01:00
Julien Danjou f1bfcc6f8a Bug: UTF-8 characters in #+LINK does not work [7.4]
On Sat, Jan 29 2011, Matt Lundin wrote:

> The regexp in org-link-expand-abbrev does not allow for accented
> characters in the link abbreviation. I am not sure whether this is an
> intended limitation or a bug. :)

I don't see any reason. Patch attached.

>From 1ec1e178aaa6a9935819a873ae492be7a2ddb2f6 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 31 Jan 2011 21:19:07 +0100
Subject: [PATCH] Allow more char type in link abbrev

* org.el (org-link-expand-abbrev): Allow any type of character
in link expand.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-01-31 21:36:05 +01:00
Bastien Guerry 29c106f5e8 Merge branch 'master' of orgmode.org:org-mode 2011-01-31 20:43:26 +01:00
Bastien Guerry e4bbefeef6 Another small docstring typo. 2011-01-31 20:42:50 +01:00