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

3887 commits

Author SHA1 Message Date
Nicolas Goaziou 398c7bb528 Indent correctly body of source blocks
* org.el (org-indent-line-function): indentation of source block is
  left to `org-edit-src-exit' and shouldn't be modified by
  `org-indent-line-function'. Indentation of others blocks should be
  the same as the #+begin line.
2010-09-01 20:42:05 +02:00
Dan Davison 13891fce6e babel: Allow `org-babel-map-src-blocks' to operate on current buffer
* ob.el (org-babel-map-src-blocks): If FILE is nil evaluate
	BODY forms on source blocks in current buffer; restore point
	in current buffer.
2010-09-01 10:57:53 -07:00
Nicolas Goaziou 86b4d5e69d Keep byte-compiler happy 2010-09-01 19:05:56 +02:00
Nicolas Goaziou 8e5729c466 Speed optimizations and docstring modifications. 2010-09-01 19:05:56 +02:00
Nicolas Goaziou d05c77d6a5 Fix infinite loop when buffer was ending on a blank lines with whitespaces. 2010-09-01 19:05:56 +02:00
Nicolas Goaziou 421ba3a187 Correctly get bullet when point is not at bol. 2010-09-01 19:05:56 +02:00
Nicolas Goaziou bfce8dd357 Do not crash when trying to export an ill-formed list in HTML and DocBook. 2010-09-01 19:05:56 +02:00
Nicolas Goaziou 0932dac73d Fix `org-list-bottom-point' when point is after end of list. 2010-09-01 19:05:55 +02:00
Nicolas Goaziou e2dc3cd985 Small modification to `org-list-ending-method' docstring. 2010-09-01 19:05:55 +02:00
Nicolas Goaziou 7a46718ec6 Optimize search of top and bottom points when ending method is `both' 2010-09-01 19:05:55 +02:00
Nicolas Goaziou 595ce4e7f8 Minor fix. 2010-09-01 19:05:55 +02:00
Nicolas Goaziou 5de49d2032 Optimize list indentation.
* org-list.el (org-list-struct): accept list boundaries as an
  argument in order to avoid computing `org-list-top-point' and
  `org-list-bottom-point' twice when indenting.
2010-09-01 19:05:55 +02:00
Nicolas Goaziou 7e6778c16f When indenting a region, first check if there is any item to move. 2010-09-01 19:05:55 +02:00
Nicolas Goaziou 668e5832c2 Bug fix: `org-list-struct' would get the last item twice sometimes. 2010-09-01 19:05:55 +02:00
Nicolas Goaziou 5dee2ec351 Fix code typo. 2010-09-01 19:05:55 +02:00
Nicolas Goaziou 86228b817c Changed default value of `org-list-ending-method'
* org-list.el (org-list-ending-method): default value is now `both',
  to ensure maximum compatibility before previous implementation.
2010-09-01 19:05:55 +02:00
Nicolas Goaziou ebf5e1236b Fix bug when buffer is starting with a list.
* org-list.el (org-list-in-item-p-with-indent): Test if first line is
  the item beginning.
* org-list.el (org-list-top-point-with-indent): Test if first line is
  a valid list beginning.
2010-09-01 19:05:55 +02:00
Nicolas Goaziou df33ccb956 Do not drag outside items when moving whole list multiple times. 2010-09-01 19:05:55 +02:00
Nicolas Goaziou 7b8352f94b Renamed org-indent-item-tree' to org-list-indent-item-generic'. 2010-09-01 19:05:55 +02:00
Nicolas Goaziou bac9497d7a Handle drawers correctly. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou 50f2c13ddc Modified docstrings according to `checkdoc-current-buffer'. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou c675061eb2 Speed optimization of indent method 2010-09-01 19:05:54 +02:00
Nicolas Goaziou c96c14a9d5 Fix bug in org-list-bottom-point' and org-list-top-point'. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou 221ff58e19 Small optimization. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou 113818cdf0 Bug fix: infinite loop while looking for top point with indent method 2010-09-01 19:05:54 +02:00
Nicolas Goaziou 6b2468477e [@num] is valid to enforce a numbering (same as [@start:num]) 2010-09-01 19:05:54 +02:00
Nicolas Goaziou 56542f799c Removed renumber rule. Documentation fixes. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou 347f39445a Added some documentation to code. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou b5eb7047f3 Now both indentation and regexps can end lists
* org-list.el (org-list-ending-method): New customizable variable to
  tell Org Mode how lists end. See docstring.
2010-09-01 19:05:54 +02:00
Nicolas Goaziou 2cca510276 Fix structure for malformed lists. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou 8b66f26920 Modified indentation of long lines of code. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou d2b3923b6a Keep byte-compiler happy. 2010-09-01 19:05:54 +02:00
Nicolas Goaziou dae1ec63a9 org-fix-bullet-type is now org-list-repair. Created aliases for compatibility. 2010-09-01 19:05:53 +02:00
Nicolas Goaziou dea5050dbc Ensure shifting top-level item can catch column 0
* org-list.el (org-indent-item-tree): shifting step of top-level item
  depends on `org-level-increment'.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou 05aeeae9ed First line after a list should not be indented according to list
* org.el (org-indent-line-function): Indent first non blank line after
  a list according to current heading level.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou 7ef456426e Fix DocBook and HTML sensitivity about item's body indentation
* org-docbook.el (org-export-as-docbook): Removed check for
  indentation on lines that do not start with a list bullet.
* org-html.el (org-export-as-html): Same thing.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou 1230cf9f09 Fix bug when inserting an item after bottom point of list
* org-list.el (org-list-bottom-point): Take into consideration that
  bound of search can be before true ending of the list.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou 8385393fe6 Optimize writing of structure to buffer.
* org-list.el (org-list-struct-apply-struct): No longer shift item's
  body twice: one after replacing bullet and one after changing
  indentation.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou 8c89086e73 Refactoring of search functions. 2010-09-01 19:05:53 +02:00
Nicolas Goaziou bed92c6863 Refactoring 2010-09-01 19:05:53 +02:00
Nicolas Goaziou 443afde30c Handle `org-list-demote-modify-bullet'
* org-list.el (org-list-struct-indent): Added code to replace bullets
  if needed when indenting.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou 0c1b40bd6c Removed unused functions. 2010-09-01 19:05:53 +02:00
Nicolas Goaziou 97c60a1a86 More rules to determine blank lines when inserting item
* org-list.el (org-list-insert-item-generic): A single item already
  counting blank lines in his body should be separated with the next
  one by a blank line. Moreover, if user already provided blank lines,
  follow his wishes.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou d726f924dd Fix bug when moving a *-list at column 0. Docstrings modifications.
* org-list.el (org-indent-item-tree): when moving top item of a *-list
  to column 0, only the first item had its bullet changed to -. It now
  changes all items of the top-level list, as expected.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou a2a72f38fa Toggle checkbox even if not at beginning of line.
* org-list.el (org-toggle-checkbox): go to beginning of line before processing.
2010-09-01 19:05:53 +02:00
Nicolas Goaziou e890cb5eeb Small changes to fontification. 2010-09-01 19:05:53 +02:00
Nicolas Goaziou e8967901fa Little bug fix.
* org-list.el (org-list-struct-apply-struct): check if ancestor exists.
2010-09-01 19:05:52 +02:00
Nicolas Goaziou fd16515b4a Removed last call to org-provide-checkbox-statistics. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 5d196be958 Small refactoring. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 9eab167626 Indentation is faster and now correct. Indenting region is back. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 030fc40b1d Minor refactoring. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 12acf70f92 Little fix to ASCII exporter with regards to [@start:num] structures. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 0dab6a2e1b Do not enforce white spaces just after [@start:num]. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou 5a3113592a Allow multiple [@start:num] in a list.
* org-list.el (org-renumber-ordered-list): check for [@start:x] is
  done at each item.
2010-09-01 19:05:52 +02:00
Nicolas Goaziou c5f4081221 Fix reordering bug when when cycling indentation above 10th item.
* org-list.el : Removed unused variable
  `org-suppress-item-indentation'.
* org-list.el (org-renumber-ordered-list): Skip item if bullet number
  is already good.
2010-09-01 19:05:52 +02:00
Nicolas Goaziou 5903c08447 Moving top list item will move whole list only if moving by subtree.
* org-list.el (org-list-automatic-rules): doc-string reflects this
  change.
* org-list.el (org-indent-item-tree): prevent whole list from being
  moved when user is not moving subtree. Thus,
  `org-cycle-item-indentation' will not allow to move the list.
2010-09-01 19:05:52 +02:00
Nicolas Goaziou ee568516e8 Bug fix when indenting items.
* org-list.el (org-indent-item-tree): Removed region code. It was prone
  to errors and undocumented.
* org-list.el (org-item-indent-positions): Better heuristics to
  determine what bullet the item will have when demoted.
2010-09-01 19:05:52 +02:00
Nicolas Goaziou d9c4c52533 Documentation fix. 2010-09-01 19:05:52 +02:00
Nicolas Goaziou a665ecb666 Fix bug when `org-list-two-spaces-after-bullet-regexp' would be nil.
* org-list.el (org-list-bullet-string): first check if
  `org-list-two-spaces-after-bullet-regexp' isn't nil.
2010-09-01 19:05:51 +02:00
Nicolas Goaziou 7eb193de1d Minor refactoring. 2010-09-01 19:05:51 +02:00
Nicolas Goaziou 80b269d947 `org-toggle-item' working as expected.
* org-list.el (org-list-bullet-string): do not modify match-data.
* org.el (org-toggle-item): now working again when changing list items
  into plain text. Moreover take into consideration
  `org-list-two-spaces-after-bullet-regexp'.
2010-09-01 19:05:51 +02:00
Nicolas Goaziou 884489c3fb When indenting an item, bullet should be more predictable.
* org-list.el (org-indent-item-tree): removed unnecessary bullets fix,
  and improved heuristics to determine bullet when indenting.
* org-list.el (org-item-indent-positions): function now returns sane
  results when there are two lists separated with blank lines only.
2010-09-01 19:05:51 +02:00
Nicolas Goaziou cb23060a46 HTML and DocBook exporters handle multiple uses of [@start:?].
* org-docbook.el (org-export-as-docbook): Use override="num" in any
  listitem matching [@start:num]
* org-html.el (org-export-as-html): Use value="num" in any li matching
  [@start:num]
2010-09-01 19:05:51 +02:00
Nicolas Goaziou a73ce76fe3 Checkbox rule forbids inserting checkboxes in description item 2010-09-01 19:05:51 +02:00
Nicolas Goaziou 4d40259e56 Better handling of checkboxes with regards to [@start:x] constructs
* org.el (org-set-font-lock-defaults): Correct fontification for
  checkboxes found after [@start:?].
* org-list.el (org-list-at-regexp-after-bullet-p): skip any [@start:?]
  when looking at a regex after a bullet.
* org-list.el (org-toggle-checkbox): correct insertion of checkboxes
  when there is already a [@start:?] in the item.
* org-list.el (org-checkbox-blocked-p): properly check if there's an
  unchecked item before.
* org-list.el (org-list-parse-list): function handles items having
  both a counter and a checkbox.
2010-09-01 19:05:51 +02:00
Nicolas Goaziou c444086ade Documentation fixes. 2010-09-01 19:05:51 +02:00
Nicolas Goaziou 4a4c4f2cf1 Ensure new indentation cycles always start with same bullet
* org-list.el (org-cycle-item-indentation): org-tab-ind-state stores
  both indentation and bullet when cycle started.
2010-09-01 19:05:51 +02:00
Nicolas Goaziou 3f762cf76d Refactoring
* org-list.el: `org-at-description-p' renamed to
  `org-at-item-description-p', `org-first-list-item-p' renamed to
  `org-list-first-item-p', `org-end-of-item-text-before-children'
  renamed to `org-end-of-item-or-at-child'.
2010-09-01 19:05:51 +02:00
Nicolas Goaziou 6593fcc7cd Unconditionally fix list when using C-c C-c.
* org.el (org-ctrl-c-ctrl-c): call `org-fix-bullet-type' instead of
  `org-maybe-renumber-ordered-list' and `org-fix-bullet-type' before
  toggling a checkbox.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou 66bf386e25 Correctly handle bullets with two spaces.
* org-list.el (org-list-bullet-string): New function returning bullet
  concatenated with an appropriate number of white spaces.
* org-list.el (org-list-insert-item-generic): Insert the right bullet,
  with help of `org-list-bullet-string'.
* org-list.el (org-indent-item-tree): Use `org-list-bullet-string'.
* org-list.el (org-fix-bullet-type): Use `org-list-bullet-string'.
* org-list.el (org-toggle-checkbox): send an error when
  `org-toggle-checkbox' is trying to insert a checkbox at a
  description item.
* org-list.el (org-item-re): modified regexp so it can catch correct
  number of white space before item body.
* org-list.el (org-list-at-regexp-after-bullet-p): Take into
  consideration new `org-item-re'.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou cbc337f285 Bug fix. First bullet of *-list would not become "-" when hitting column 0. 2010-09-01 19:05:50 +02:00
Nicolas Goaziou 3a91400baa Modified default number of blank lines when inserting an item.
* org-list.el (org-list-insert-item-generic): the second item in a
  list will be separated from its predecessor with the number of blank
  lines separating the first item from its parent, if any, or no blank
  line.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou a905db7db7 Smarter fix and reordering of list when indenting items.
* org-list.el (org-indent-item-tree): Fix and reorder every list and
  sublist, from parent of list that has moved if indenting, or from
  list at point if outdenting.

* org-list.el (org-list-replace-bullet): New internal function.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou d99f7fcf05 Try to keep relative column in line when indenting item.
* org-list.el (org-indent-item-tree): Try to keep relative position on
  line. It can't if point is in white spaces before bullet because
  mixed tabs and spaces make some columns unattainable.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou eabb018913 `org-cycle-item-indentation' works only on empty items.
* org-list.el (org-cycle-item-indentation): Cycle when the whole item
  only contains bullet and maybe a checkbox. Previously, TAB would
  cycle when the first line of the item was blank.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou 7c424b33ea Cycle indentation for newly created description items or checkboxes.
* org-list.el (org-cycle-item-indentation): Allow a point just after a
  description item or a checkboxed item to start cycling.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou 25de94f3cc Take `org-plain-list-ordered-item-terminator' into consideration when cycling bullets.
* org-list.el (org-cycle-list-bullet): Check
  `org-plain-list-ordered-item-terminator' before allowing 1. or 1) as
  valid bullets when cycling.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou 1bfe98bdf6 Minor refactoring. 2010-09-01 19:05:50 +02:00
Nicolas Goaziou 91488c75d5 Added variable `org-list-automatic-rules'. 2010-09-01 19:05:50 +02:00
Nicolas Goaziou ca106beabb New function `org-item-has-children-p'. 2010-09-01 19:05:50 +02:00
Nicolas Goaziou c4d0151b28 Return value of `org-cycle-item-indentation' was broken.
* org-list.el (org-cycle-item-indentation): Do return t if and only if
  cycling is possible and succeded.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou a13ee91cbe Rules preserving integrity of a list now apply when moving subtree.
* org-list.el (org-indent-item-tree): when outdenting a subtree, the
  last item shouldn't have a children.
2010-09-01 19:05:50 +02:00
Nicolas Goaziou 330c27e4ec Fix cycling problems.
* org-list.el (org-cycle-item-indentation): cycling should play nicely
  with indent rule in `org-list-automatic-rules'.
2010-09-01 19:05:49 +02:00
Nicolas Goaziou 0a14598575 Added a rule for indentation and improved reordering.
* org-list.el (org-indent-item-tree): If indent rule is activated, it
  should be impossible to outdent an item having children without
  moving its subtree. Improved reordering of lists modified by cycling
  indentation.
2010-09-01 19:05:49 +02:00
Nicolas Goaziou 19372845f9 Melt org-maybe-renumber-ordered-list-safe' into org-maybe-renumber-ordered-list'. 2010-09-01 19:05:49 +02:00
Nicolas Goaziou aed0cb3b9e org-maybe-renumber-ordered-list' do not call org-fix-bullet-type'.
* org-list.el (org-maybe-renumber-ordered-list): Removed call for
  `org-fix-bullet-type' to prevent infinite loop, and some checks
  already done in `org-renumber-ordered-list'.
* org-list.el (org-fix-bullet-type): Remove a check and call directly
  `org-maybe-renumber-ordered-list'
2010-09-01 19:05:49 +02:00
Nicolas Goaziou 4c9eb76846 Do not indent the first item in a sublist.
* org-list.el (org-indent-item-tree): It shouldn't be possible to
  indent the first item of a sublist (though outdent is possible) as
  it would break list's structure.
2010-09-01 19:05:49 +02:00
Nicolas Goaziou 2c3157e34e Better guessing of blank lines when inserting an item.
* org-list.el (org-list-insert-item-generic): When local search
  doesn't help, search the list globally for blank lines. Moreover,
  don't bother with new lists, and add 1 blank line.
2010-09-01 19:05:49 +02:00
Nicolas Goaziou ff6c147ac6 Defined `org-item-beginning-re'. Org capture should recognize new lists.
* org-capture.el (org-capture-place-item): use `org-search-forward-unenclosed'
  and `org-search-backward-unenclosed' and new variable `org-item-beginning-re'.
* org-list.el (org-item-beginning-re): regexp matching beginning of an item.
2010-09-01 19:05:49 +02:00
Nicolas Goaziou 3d3e307c31 Fix list folding. Refactoring. 2010-09-01 19:05:49 +02:00
Nicolas Goaziou 5b9857da7c Minor fix. 2010-09-01 19:05:49 +02:00
Nicolas Goaziou 0bac5c248b Forgot to handle 'previous argument in `org-cycle-list-bullet'.
* org-list.el (org-cycle-list-bullet): Put back support for 'previous argument.
2010-09-01 19:05:49 +02:00
Nicolas Goaziou 3a084384f4 Refactoring. 2010-09-01 19:05:49 +02:00
Nicolas Goaziou eebd8eb022 Fixed bug in `org-in-item-p' with point at an heading just beyond list.
* org-list.el (org-in-item-p): Handle case when point is at an
  heading.
* org-list.el (org-list-make-subtree): Add protection when used
  outside of list
* org-list.el (org-insert-item): Removed useless hack now
  `org-in-item-p' is fixed.
* org-timer.el (org-timer-item): Removed useless hack now
  `org-in-item-p' is fixed.
2010-09-01 19:05:49 +02:00
Nicolas Goaziou 42f82d1bad Descriptions items shouldn't be numbered.
* org-list.el (org-cycle-list-bullet): prevent description items from
  being numbered. String argument is also recognized now, as long as
  it is a valid bullet.
2010-09-01 19:05:48 +02:00
Nicolas Goaziou 8241e9b652 Refactoring. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou a42f8066d4 Can't insert new item after `org-list-bottom-point' anymore. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou fb7183c619 Forgot a save-excursion' in org-apply-on-list'. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou 9e3b3d023d List follows indentation of its top item.
* org-list.el (org-indent-item-tree): moving indentation of top list
  item will make the whole list move.
* org-list.el (org-apply-on-list): function is less sensitive to
  changes of indentation.

Before this patch, cycling indentation of top list item would just
break list. Now, it does something useful.
2010-09-01 19:05:48 +02:00
Nicolas Goaziou d22d58acf1 Allow cycling indentation at creation of description and checkboxed items.
* org-list.el (org-at-item-checkbox-p): add whitespaces at the end of
  the regexp.
* org-list.el (org-checkbox-blocked-p): use new checkbox regexp.
* org-list.el (org-cycle-item-indentation): allow cycling description
  items and checkbox items.
* org-list.el (org-toggle-checkbox): use new checkbox regexp.
* org-list.el (org-reset-checkbox-state-subtree): use new checkbox regexp.
2010-09-01 19:05:48 +02:00
Nicolas Goaziou 85868125c2 Fix cycling indentation. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou 8597bb25ee Description item regexp was too strict. 2010-09-01 19:05:48 +02:00
Nicolas Goaziou 97f857c9b7 Minor refactoring. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou abb490c572 Internal functions stay with org-list- prefix. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou d830b4b3ee Refactoring 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 8a215f56eb No checkboxes for description items. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 2b5b8cf8a2 Refactoring. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou c3bbbc0926 Blank lines number is guessed locally when inserting item.
* org-list.el (org-insert-item-internal): guessing of blank lines
  number is made by looking at neighbours items, if any.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou 905ad49e9a Fixed some corner-case when inserting item. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 3dfc889cce Refactoring. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 0229bcc054 Sort also timer lists.
* org-list.el (org-sort-list): add the possibility to sort timer lists
  with the ?t or ?T options.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou 802a3d1b3f Refactoring.
* org-list.el (org-search-unenclosed-internal): new function to handle
  both `org-search-forward-unenclosed' and
  `org-search-backward-unenclosed'.
* org-list.el (org-search-backward-unenclosed): Can send errors now.
  Removed useless usage of COUNT.
* org-list.el (org-search-forward-unenclosed): Can send errors now.
  Removed useless usage of COUNT.
* org-list.el (org-update-checkbox-count): Use
  `org-search-forward-unenclosed' and `org-search-backward-unenclosed'
  instead of `re-search-forward' and `re-search-backward'.
* org-list.el (org-sort-list): Use
  `org-search-forward-unenclosed' and `org-search-backward-unenclosed'
  instead of `re-search-forward' and `re-search-backward'.
* org-list.el (org-list-make-subtree): Use
  `org-search-forward-unenclosed' and `org-search-backward-unenclosed'
  instead of `re-search-forward' and `re-search-backward'.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou 7cf8ab06de Fix inserting item with point before first char of item's body.
* lisp/org-list.el (org-insert-item-internal): fixes the problem when
  point was before the first char of the item's body.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou deb6b0c504 Some comments changes. 2010-09-01 19:05:47 +02:00
Nicolas Goaziou 53c4b53e8f Less latency in org-timer-item.
* org-timer.el (org-timer-item): Refactoring. Compute timer string
  before inserting it in the buffer
* org-timer.el (org-timer): added an optional argument to return timer
  string instead of inserting it.
2010-09-01 19:05:47 +02:00
Nicolas Goaziou 8eece59f9e Refactoring and increased protection on item insertion.
* org-list.el (org-insert-item-internal): New function to handle
  positionning and contents of an item being inserted at a specific
  pos. It is not possible anymore to split a term in a description
  list or a checkbox when inserting a new item.
* org-list.el (org-insert-item): Refactored by using the new
  `org-insert-item-internal' function.
* org-timer.el (org-timer-item): Refactored by using the new
  `org-insert-item-internal' function.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 472579fb96 Minor refactoring. 2010-09-01 19:05:46 +02:00
Nicolas Goaziou 1f41236014 Cycle lists properly.
* org-list.el (org-list-bottom-point): Be sure to check real
  ORG-OUTLINE-REGEXP and not outline-regexp, that might be modified.
* org.el (org-cycle-internal-local): cycle up to end of subtree or end
  of item if we are in a list.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 2dd3b8a2a8 Better support for timer lists. Trying to insert a new item with point
in a special block now move before block.

* org-list.el (org-insert-item): Move before any special block in a
  list prior to add a new item.
* org-timer.el (org-timer-item): When in a timer list, insert a new
  timer item like `org-insert-item'. If in another list, send an
  error. Otherwise, start a new timer list.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 2e4e05b3d6 Minor refactoring.
* lisp/org-list.el: Minor refactoring.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 2b8aa4c406 Position items with relative timer at the right place.
* org-timer.el (org-timer-item): Insert description list item at the
  right column.
* org-list.el (org-insert-item): Insert the right number of blank
  lines before a relative timer.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 292b52f596 Insert item even in LaTeX environments.
* org-list.el (org-insert-item): Remove restriction on latex blocks.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 47cd0c193d Make parsing of lists more powerful during export.
* org-list.el (org-search-backward-unenclosed): Do not stop in
  protected places.
* org-list.el (org-search-forward-unenclosed): Do not stop in
  protected places.
* org-latex.el (org-export-latex-lists): Use the fact that
  org-search-forward do not stop anymore at protected places.
2010-09-01 19:05:46 +02:00
Nicolas Goaziou 168a8b6007 Do not prevent list items from being inside LaTeX blocks.
* org-list.el (org-search-backward-unenclosed): Do not prevent list
  items from being inside LaTeX blocks.
* org-list.el (org-search-forward-unenclosed): Do not prevent list
  items from being inside LaTeX blocks.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 968fa927c4 Fix for org-list-send-list.
* org-list.el (org-in-item-p): Do not widen before checking if we are
  in item.
* org-list.el (org-list-send-list): We cannot count on
  `org-list-top-point' and `org-list-bottom-point' before buffer is
  narrowed. Find bounds of list otherwise.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou b2433f9eb6 Changed default for end-list regexp.
* lisp/org-list.el (org-list-end-regexp): By default, list ending is
  exactly 2 blank lines.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 197ed8b273 Remove useless checks for `org-empty-line-terminates-plain-lists'.
* org-docbook.el (org-export-as-docbook): When we find an empty line,
  we do not need to check for `org-empty-line-terminates-plain-lists'
  because we would have found end-list marker before.
* org-html.el (org-export-as-html): Same.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 0c4770e661 Refactoring.
* org-list.el (org-insert-item): Simplify count of blank lines to insert.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 37733b77a4 List ending is now customizable.
* org-list.el (org-list-end-regexp): New customizable variable to
  define what string should end lists.
* org-list.el (org-list-end-re): Function is now aware of
  `org-list-end-regexp'.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 27cfeefc3b Code cleanup.
* org-html.el (org-export-as-html): Code cleanup.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 07eb3308c1 Docbook exporter now handles new list definition.
* org-docbook.el (org-export-as-docbook): Properly close any open list
  when seeing ORG-LIST-END. Removed any reference to now unneeded
  DIDCLOSE variable.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou a63ecfa89b Better handling of non-blank-lines types of list enders.
* org-exp.el (org-export-mark-list-ending): fix number of blank lines
  inserted after a list.
* org-list.el (org-list-parse-list): fix case when `org-list-end-re'
  would have an indentation greater than current list.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou fe42a5e83e Export supports any list ender. Export to ascii has been fixed.
* org-exp.el (org-export-mark-list-ending): Differentiate between
  export backends, and replace `org-list-end-re' by a blank line upon
  exporting.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 4c2bc51c52 Remove the no longer needed didclose variable.
* org-html.el (org-export-as-html): Delete didclose and everything
  related to it, as it is no longer needed.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou 99306969b0 Both latex and html should now export correctly.
* org-html.el (org-export-html-preprocess): Remove unneeded insertion
  of list end marker, as it is now handled by
  `org-export-mark-list-ending'.
* org-html.el (org-export-as-html): Cleaner termination of lists.
* org-exp.el (org-export-mark-list-ending): New function to insert
  specific markers at the end of lists when exporting to a backend not
  using `org-list-parse-list'.
  This function is called early in `org-export-preprocess-string',
  while it is still able to recognize lists.
* org-latex.el (org-export-latex-lists): Better search for lists. It
  now only finds items not enclosed and not protected.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou f677013276 Use org-search-forward-unenclosed' instead of re-search-forward'.
* lisp/org-list.el: Replaced `re-search-forward' by
  `org-search-forward-unenclosed' where it made sense.
2010-09-01 19:05:45 +02:00
Nicolas Goaziou ecd5a4b0f1 Make `org-apply-to-list' more functional.
* lisp/org-list.el (org-apply-to-list): Now a return value is handed
  at each new call of the function applied.
* lisp/org-list.el (org-fix-bullet-type): Use the new
  `org-apply-to-list' format.
* lisp/org-list.el (org-renumber-ordered-list): Use the new
  `org-apply-to-list' format.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou fb5cab814e Better regexps in searches unenclosed.
* lisp/org.el (org-in-regexps-block-p): minor fix: limit wasn't
  correctly used.
* lisp/org-list.el (org-search-forward-unenclosed): Better regexp
  used.
* lisp/org-list.el (org-search-backward-unenclosed): Better regexp
  used.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 2dec9eb473 Fix regression in `org-sort-list'.
* lisp/org-list.el (org-sort-list): end-rec function was ill-defined.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou f7f07198dd Fix for org-search-forward-unenclosed' and org-search-backward-unenclosed'.
* lisp/org-list.el (org-search-forward-unenclosed): fix behavior when
  last occurence was enclosed.
* lisp/org-list.el (org-search-backward-unenclosed): fix behavior when
  last occurence was enclosed.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 30fb7a570a Fix documentation.
* lisp/org.el (org-in-regexps-block-p): Fix documentation.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou a0ad769d0b Fixed blocks regexp.
* lisp/org-list.el (org-search-backward-unenclosed): fix block regexp.
* lisp/org-list.el (org-search-forward-unenclosed): fix block regexp.
* lisp/org-list.el (org-list-parse-list): minor fix.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 82f0bd75e7 Delete org-list-end-re' when org-list-parse-list' is used for
export.

* org-list.el (org-list-parse-list): Delete `org-list-end-re' when
  called with t argument.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou e3813fcfcb List ending is replaced by a blank line during html export.
* org-html.el (org-export-html-preprocess): Replace `org-list-end-re'
  by a blank line during pre-process.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou a0a86fbba0 Minor fix.
* lisp/org-list.el (org-list-bottom-point): No need for square
  brackets for `skip-chars-backward'.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 4c0bf39469 Do not delete space between end of list and beginning of the following
* lisp/org-html.el: Do not delete space between end of list and
  beginning of the following.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 1d99d9ee73 Do not try to guess list ending and let org-list.el do its job.
* lisp/org-html.el: preprocess buffer string and add ORG-LIST-END
  where needed. Lists should not end before seeing this.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 6167dfa444 Notice end of lists.
* lisp/org-html.el: Notice end of lists.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 9996da73a3 Fix radio lists and radio templates.
* lisp/org-list.el (org-list-parse-list): Better handling of
  restrictions when function is called on a list with sublists.
* lisp/org-list.el (org-list-send-list): find the true ending of the
  list being sent.
* lisp/org-list.el (org-list-radio-list-templates): templates are more
  specific to lists.
2010-09-01 19:05:44 +02:00
Nicolas Goaziou 5fda851968 Initial commit. 2010-09-01 19:05:44 +02:00
Eric Schulte c7ed188859 ob-js: now supports session based evaluation through mozrepl
* lisp/ob-js.el (org-babel-js-eoe): indicate end of input
  (org-babel-execute:js): support for session evaluation
  (org-babel-prep-session:js): fleshed out definition
  (org-babel-js-initiate-session): can initiate a session using
  mozrepl
2010-09-01 08:48:21 -06:00
David Maus 3d6c1090cb Protect escape char in `org-complex-heading-regexp-format'
* org.el (org-set-regexps-and-options): Protect escape char in
`org-complex-heading-regexp-format'.
2010-08-31 22:58:08 +02:00
Carsten Dominik 0a46f202ca Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-31 10:03:02 +02:00
Eric Schulte fc69523827 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-31 01:48:46 -06:00
Carsten Dominik fa18c1c232 Fix read-date problem that could result in August 34th
Paul Sexton writes:

> Today (31 August),
> if I evaluate "(org-read-date t)", then at the prompt type
> "+3"
> The string returned is:
> "2010-08-34"
2010-08-31 09:22:26 +02:00
Eric Schulte ab95959057 ob-scheme: now supports session-based evaluation
* lisp/ob-scheme.el (org-babel-scheme-eoe): for marking the end of
  session-based evaluation
  (org-babel-execute:scheme): now supports session-based evaluation
  (org-babel-prep-session:scheme): now works and defines variables
  (org-babel-scheme-initiate-session): now works using run-scheme from
  cmuscheme
2010-08-31 01:14:02 -06:00
Dan Davison 381f913af3 Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-31 00:11:41 -07:00
Carsten Dominik dabfd646ae LaTeX export: remove the t1enc package
* lisp/org.el (org-export-latex-default-packages-alist): Remove the
t1enc package - this is already covered by fontenc.
2010-08-31 08:31:14 +02:00
Manish Sharma 2cf6136523 Allow "#" and "%" in tags
Patch largely from Manish, missing points added by Carsten
2010-08-31 08:25:20 +02:00
Dan Davison 8cb53ddc1a babel: Eliminate compiler warnings
* ob.el (with-parsed-tramp-file-name): declared
	(org-babel-tramp-localname): Ensure variable name exists
	locally

	* ob-R.el (ess-eval-buffer): declared

	* ob-comint.el (with-parsed-tramp-file-name): declared
	(tramp-flush-directory-property): declared
	(org-babel-comint-eval-invisibly-and-wait-for-file): Ensure
	variable name exists locally
2010-08-30 18:20:01 -07:00
Dan Davison 9c878a8290 babel: Fix temporary file processing in the remote execution case.
* ob.el (org-babel-temp-file): Don't use babel temporary
	directory in remote case; use make-temp-file with remote file
	name so that temp file is guaranteed not to exist previously
	on remote machine.
	(org-babel-tramp-localname): New function to return local name
	portion of possibly remote file specification

	* ob-R.el (org-babel-R-evaluate-external-process): Respond to
	changes in `org-babel-temp-file'; pass local file name to
	remote R process.
	(org-babel-R-evaluate-session) Respond to
	changes in `org-babel-temp-file'; pass local file name to
	remote R process.
2010-08-30 09:35:48 -07:00
Dan Davison fcfba8d487 babel: R: Unify R write-to-file expressions
* ob-R.el (org-babel-R-write-object-command): New unified R
    command for writing results to file
    (org-babel-R-wrapper-method): Remove variable
    (org-babel-R-wrapper-lastvar): Remove variable
    (org-babel-R-evaluate-external-process): Use new R command
    (org-babel-R-evaluate-session): Use new R command
2010-08-30 09:35:48 -07:00
Dan Davison 08cdd05579 babel: Cleaner session evaluation for R in :results value case
* ob-comint.el (org-babel-comint-eval-invisibly-and-wait-for-file): New
    function to evaluate code invisibly and block until output file exists.
    * ob-R.el (org-babel-R-evaluate-session): Use
    `ess-eval-buffer' to evaluate R code in session for :results
    value. Write result to file invisibly using new function
    `org-babel-comint-eval-invisibly-and-wait-for-file'.

These changes move to using standard ESS code evaluation in R sessions
in the :results value case, which avoids unnecessary output to the
comint buffer. In addition, the R command responsible for writing the
result to file is hidden from the user.
2010-08-30 09:35:48 -07:00
Carsten Dominik b212d2ed60 Align tags after capture template tags insertion
* lisp/org-capture.el (org-capture-fill-template): Align tags
after insertion.
2010-08-30 13:51:04 +02:00
Carsten Dominik 9bc1d0c74f Avoid a star in a headline to be interpreted as multiline emphasis
* lisp/org-exp.el (org-export-concatenate-multiline-emphasis): Ignore
matches that start in a headline.
2010-08-30 09:39:52 +02:00
Eric Schulte fdad92edd6 ob-plantuml: wrapping in-file and out-file in shell-quote-argument
Thanks to Michael Gauland for pointing out this fix

* lisp/ob-plantuml.el (org-babel-execute:plantuml): wrapping in-file
  and out-file in shell-quote-argument
2010-08-29 19:33:38 -06:00
David Maus 4b7c9136a7 Remove compile-time dependency on doc-view.el
* org-docview.el (org-docview-store-link): Use expanded macro to get
current page.
(doc-view-goto-page, image-mode-window-get): Declare functions for
byte compiler.

doc-view mode is not available in Emacs22.  We need to use the
expanded form of the macro `doc-view-current-page' at compile-time.
2010-08-29 21:29:16 +02:00
Eric Schulte f6c09411a7 ob-scheme: very preliminary support for evaluating scheme code blocks
* Makefile (LISPF): adding ob-scheme.el to the makefile
* lisp/ob-scheme.el: very preliminary support for evaluating scheme
  code blocks
* lisp/org.el (org-babel-load-languages): adding scheme
2010-08-27 18:03:11 -06:00
Eric Schulte 4054eb0b9b ob-js: very preliminary support for evaluating Javascript code blocks
This relies upon node.js as the Javascript execution engine.
  http://nodejs.org/
2010-08-27 16:59:08 -06:00
Eric Schulte de6ff60e25 fixing circular require introduced by previous changes
* lisp/ob.el (require): removing circular (require 'org)
2010-08-27 14:47:59 -06:00
Eric Schulte b183da4be6 Babel: fixing compiler warnings
* lisp/ob-R.el (ess-make-buffer-current): declared
  (ess-ask-for-ess-directory): declared
  (ess-local-process-name): declared
* lisp/ob-latex.el (org-babel-latex-tex-to-pdf): capturing free
  variable
* lisp/ob.el (org-edit-src-code): fixing arguments
  (org-edit-src-exit): declared
  (org-outline-overlay-data): declared
  (org-set-outline-overlay-data): declared
2010-08-27 14:45:55 -06:00
Glenn Morris e314478511 Fix some more Org `check-declare' issues.
* ob.el: Require org when compiling.
(org-save-outline-visibility): Remove macro declaration.
* ob-emacs-lisp.el: Require ob-comint when compiling, for macros.
Remove unnecessary/macro declarations.
* org-docview.el: Require doc-view when compiling.
(doc-view-goto-page): Autoload rather than declaring.
(doc-view-current-page): Remove macro declaration.
* ob.el (tramp-compat-make-temp-file, org-edit-src-code)
(org-entry-get, org-table-import): Fix declarations.
(org-match-string-no-properties): Remove declaration.
* ob-sh.el (org-babel-comint-in-buffer)
(org-babel-comint-wait-for-output, org-babel-comint-buffer-livep)
(org-babel-comint-with-output): Remove unnecessary declarations.
* ob-R.el (orgtbl-to-tsv): Fix declaration.
* org-list.el (org-entry-get): Fix declaration.
2010-08-27 14:45:48 -06:00
Eric Schulte 2a400ef016 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-27 09:45:34 -06:00
Eric Schulte 344163403b call to delete-file no longer throwing errors on some Emacsen
Thanks to Erik Iverson for pointing this out

* lisp/ob.el (org-babel-remove-temporary-directory): removed explicit
  second argument
2010-08-27 09:45:07 -06:00
Carsten Dominik 3a06bc3730 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-27 17:02:12 +02:00
Magnus Henoch b2861749d0 Fix :step day for agenda clockreport
I just tried adding :step day to
org-agenda-clockreport-parameter-plist, but then hitting R in the
agenda caused a crash, since org-clocktable-steps expects ts and te to
be strings, though in fact they are Gregorian day numbers.

This patch fixes the problem for me.  It's quite ugly, so I don't
expect it to be committed in its current form :) but I hope it serves
as inspiration for someone to figure out the right way to solve this.

* lisp/org-clock.el (org-clocktable-steps): Allow ts and te to be
day numbers.

TINYCHANGE
2010-08-27 16:27:38 +02:00
Eric Schulte 2554f27683 moved `org-save-outline-visibility' into org-macs.el
Thanks to Nick Dokos for pointing out this as a fix to a Babel issue

* lisp/org-macs.el (org-save-outline-visibility): moved from org.el

* lisp/org.el: moved `org-save-outline-visibility' to org-macs.el
2010-08-27 08:18:32 -06:00
Carsten Dominik 7be6f7e3d5 Fix typo 2010-08-27 10:02:05 +02:00
Carsten Dominik f0d58188ca Revert "Bug: possible bug in latex export [7.01trans (release_6.36.735.g15ca.dirty)]"
This reverts commit bb0a1f190b.
2010-08-27 09:29:25 +02:00
Carsten Dominik 33f9d116ba Remove some properties from ASCII-exported text 2010-08-27 09:27:59 +02:00
Eric Schulte 3d2dbf8604 additional ":results silent" default header argument for org code blocks
Thanks to David Hajage for suggesting this fix

* lisp/ob-org.el (org-babel-default-header-args:org): additional
  ":results silent" default header argument for org code blocks
2010-08-26 17:36:26 -06:00
Eric Schulte e52909d902 now possible to abort code block evaluation without throwing errors
this makes it possible to export while not evaluating some code
  blocks

* lisp/ob-exp.el (org-babel-exp-do-export): removing hacky ":noeval",
  which is now an alias to ":eval no"

* lisp/ob.el (org-babel-confirm-evaluate): ":noeval" is an alias for
  ":eval no", also no longer throwing errors

  (org-babel-header-arg-names): adding both eval and noeval as general
  header arguments

  (org-babel-execute-src-block): now using the new non-error
  confirmation functionality
2010-08-26 17:14:43 -06:00
Eric Schulte 2c33b2eb66 Introducing ob-org and now wrapping ":results org" in org code block
ob-org has two non-standard header arguments in that it exports it's
  results by default and the result type defaults to raw, this ensures
  that the body of a begin_src org block exports transparently.

  This is a breaking change in that if you are currently using org
  code blocks to export org-fontified code you will have to set the
  ":exports" header argument for org-mode blocks to "code" on a block,
  file, language or system-wide basis.

* Makefile (LISPF): adding ob-org.el to the makefile

* lisp/ob-org.el: defines handling of org code blocks

* lisp/ob.el (org-babel-insert-result): now when "org" is a result
  type the results are wrapped in an org code block
2010-08-26 10:01:21 -06:00
Eric Schulte a89dc43e83 integrating ob-plantuml -- Thanks to Zhang Weize for this contribution!
* Makefile (LISPF): now compiling and installing ob-plantuml.el

* contrib/scripts/.gitignore : ignores the plantuml.jar file, so that
  it can be located next to ditaa.jar

* lisp/ob-plantuml.el: adding copyright notice and FSF attribution

  (org-plantuml-jar-path): now a defcustom

  (org-babel-execute:plantuml): now using org-babel-eval which
  displays error messages

* lisp/org.el (org-babel-load-languages): ob-plantuml is now part of
  org-babel-load-languages
2010-08-26 09:36:08 -06:00
Zhang Weize 810bb09ef3 ob-plantuml.el support for evaluating plantuml scripts 2010-08-26 09:10:03 -06:00
Eric Schulte 9c43017755 Babel -- fix bug in final deletion of `org-babel-temporary-directory'
Thanks to Noorul Islam for pointing out this issue

* lisp/ob.el (org-babel-remove-temporary-directory): the version of
  `delete-directory' found in files.el can not be assumed to be
  present on all versions, so this copies the recursive behavior of
  that command in such a way that all calls to delete-directory will
  also work with the built-in internal C implementation of that
  function.  This is not overly difficult as all elements of the
  directory can be assumed to be files.
2010-08-26 07:22:21 -06:00
Eric Schulte e3d271ea5b fixed issue in org-babel-temp-file when forcing extension types
* lisp/ob-C.el (org-babel-C-execute): corrected arguments to
  org-babel-temp-file

* lisp/ob-latex.el (org-babel-execute:latex): corrected arguments to
  org-babel-temp-file

* lisp/ob.el (org-babel-temp-file): corrected arguments to
  make-temp-file
2010-08-25 19:21:42 -06:00
Eric Schulte 7b00073f2d Babel now cleans up any temporary files created using org-babel-temp-file
* lisp/ob.el (org-babel-temporary-directory): variable to hold the
  value of the Babel temporary directory

  (org-babel-temp-file): replacement for make-temp-file with cleanup
  on exit of Emacs

  (org-babel-remove-temporary-directory): cleanup function run on exit
  of Emacs

  (kill-emacs-hook): now includes babel cleanup function

* lisp/ob-C.el (org-babel-C-execute): using org-babel-temp-file
  instead of make-temp-file

* lisp/ob-R.el (org-babel-R-assign-elisp): using `org-babel-temp-file'
  instead of `make-temp-file'

  (org-babel-R-evaluate-external-process): using `org-babel-temp-file'
  instead of `make-temp-file'

  (org-babel-R-evaluate-session): using `org-babel-temp-file' instead of
  `make-temp-file'

* lisp/ob-asymptote.el (org-babel-execute:asymptote): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-clojure.el (org-babel-clojure-evaluate-external-process):
  using `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-ditaa.el (org-babel-execute:ditaa): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-dot.el (org-babel-execute:dot): using `org-babel-temp-file'
  instead of `make-temp-file'

* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars): using
  `org-babel-temp-file' instead of `make-temp-file'

  (org-babel-execute:gnuplot): using `org-babel-temp-file' instead of
  `make-temp-file'

* lisp/ob-haskell.el (org-babel-load-session:haskell): using
  `org-babel-temp-file' instead of `make-temp-file'

  (org-babel-haskell-export-to-lhs): using `org-babel-temp-file' instead
  of `make-temp-file'

* lisp/ob-latex.el (org-babel-execute:latex): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-ledger.el (org-babel-execute:ledger): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-lisp.el (org-babel-execute:lisp): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-octave.el (org-babel-octave-evaluate-external-process):
  using `org-babel-temp-file' instead of `make-temp-file'

  (org-babel-octave-evaluate-session): using `org-babel-temp-file'
  instead of `make-temp-file'

  (org-babel-octave-import-elisp-from-file): using `org-babel-temp-file'
  instead of `make-temp-file'

* lisp/ob-perl.el (org-babel-perl-evaluate): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-python.el (org-babel-python-evaluate): using
  `org-babel-temp-file' instead of `make-temp-file'
  using `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-ruby.el (org-babel-ruby-evaluate): using
  `org-babel-temp-file' instead of `make-temp-file'
  using `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-sass.el (org-babel-execute:sass): using
  `org-babel-temp-file' instead of `make-temp-file'

* lisp/ob-sh.el (org-babel-sh-evaluate): using `org-babel-temp-file'
  instead of `make-temp-file'

* lisp/ob-sql.el (org-babel-execute:sql): using `org-babel-temp-file'
  instead of `make-temp-file'

* lisp/ob-sqlite.el (org-babel-execute:sqlite): using
  `org-babel-temp-file' instead of `make-temp-file'

  (org-babel-sqlite-expand-vars): using `org-babel-temp-file' instead of
   `make-temp-file'
2010-08-25 14:47:47 -06:00
Aditya Siram 58f0a4ed41 Noweb style references are now expanded with loading a code block in a session.
* lisp/ob.el (org-babel-load-in-session): expanding noweb references
  when appropriate
2010-08-25 12:21:41 -06:00
Nicolas Goaziou 869b2693a5 Recognize underscores in URL
* org.el (org-make-link-regexps): modified regexp of org-plain-link-re.
2010-08-25 12:33:12 +02:00
Carsten Dominik ffa985a093 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-25 12:31:40 +02:00
Noorul Islam 92e491e52c org-habit.el: better error handling required
Attached is the patch which catch this error and throws meaningful
message.

* lisp/org-habit.el (org-habit-parse-todo): Find sr-days only if
scheduled-repeat is non nil.  Use 4th element of the list returned
by (org-heading-components) as habit-entry.  Modify the error
message to be more meaningful.

TINYCHANGE

paulusm <paulusm@bigpond.com> writes:

> Hi org-mode people,
>
> Whilst playing with the "shaving" example from
> http://orgmode.org/manual/Tracking-your-habits.html I accidentally put a
> bad character in the SCHEDULED timestamp.
>
> Instead of: "SCHEDULED: <2010-08-26 Thu .+2d/4d>"
> I had:      "SCHEDULED: <2010-08-26 Thu .+2nd/4d>"
>
> When trying to view my agenda, I was presented with a blank agenda and Emacs
> very quietly reported:
>     "org-habit-duration-to-days: Wrong type argument: stringp, nil"
> which is not really helpful.
>
> Removing the bad character fixes the issue, and I can duplicate the error
> condition as described above.
>
> Perhaps some better error trapping could be done?
>
>
2010-08-25 12:16:47 +02:00
Eric Schulte 5305fe903f ob-latex :fit,:border header arguments and working with the newest latex export code
* lisp/ob-latex.el (org-babel-execute:latex): adding new ":fit" and
  ":border" header arguments which both use the "preview" latex
  package to fit the resulting pdf image to the figure.

  (org-babel-latex-tex-to-pdf): updated to the latest code from
  org-latex.el
2010-08-24 19:16:12 -06:00
Erik Iverson 1d1439f91e babel: R: Respect value of `ess-ask-for-ess-directory' 2010-08-23 23:06:55 -04:00
David Maus 17c7786bb0 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-23 19:35:52 +02:00
David Maus 9e6391389c Don't try to store link if point is at end of buffer.
* org-wl.el (org-wl-store-link): Don't try to store link if point is
at end of buffer.
2010-08-23 19:35:43 +02:00
Harri Kiiskinen 550278c135 :body-only property for publishing projects
* lisp/org-publish.el (org-publish-project-alist): Document the new
body-only property.
(org-publish-org-to): Use the body-only property.
2010-08-23 13:34:31 +02:00
Jambunathan K 5908e8ed7b org-store-link: Return link when invoked from within agenda buffer
* org.el (org-store-link): Return link when invoked non-interactively from
an agenda buffer.

TINYCHANGE

> Summary:
>
> When I trigger a org-capture, with the cursor positioned on a line in
> the agenda buffer, I want the link to the agenda entry to be available
> as an annotation (%a) to the capture process. Currently this is broken.
>
> The enclosed patch fixes this.
>
> Setup:
>
> # file todo.org
> * TODO Talk to someone
>    SCHEDULED: <2010-08-23 Mon>
>
> # org-capture-templates
>  ("z" "Conversation" entry
>   (file+headline "~/conversation.org" "Conversations")
>   "** Note taken on %U\n   %a\n   %?" :prepend t :empty-lines 1)
>
> Steps for reporduction:
>
> 1. Restrict agenda to todo.org
> 2. Do org-agenda
> 3. Place the cursor on the above todo line
> 4. Trigger an org-capture for the above capture entry
>
> Examine the entries in conversation.org before/after the patch is
> applied. Note the absence/presence of the link to the parent todo entry.
>
> * Conversations
>
> ** Note taken on [2010-08-23 Mon 03:58]
>    [[file:~/todo.org::*Talk%20to%20someone][Talk to someone]]
>
> ** Note taken on [2010-08-23 Mon 03:42]
>
> Jambunathan K.
2010-08-23 12:18:00 +02:00
Jambunathan K 784e5f1488 org-store-link: Fix storing of links to headlines in indirect buffers
* org.el (org-store-link): Storing of links to headlines in indirect
buffers was broken.  Fix it.

TINYCHANGE
Summary:

> When org-store-link is invoked on a headline in indirect buffer (as in a
> capture buffer), hyperlink gets created to the file and NOT the
> headline. This is a bug.
>
> The attached patch fixes this.
>
> Setup:
>
> # ~/.emacs
>
> (defun my-conversation-id ()
>   (interactive)
>
>   (remove-hook 'org-capture-before-finalize-hook 'my-conversation-id)
>
>   (let ((org-link-to-org-use-id t))
>     (call-interactively 'org-store-link)
>     )
>   )
>
> # org-capture-templates
>
>  ("x" "Conversations" entry
>   (file+headline "~/conversation.org" "Conversations")
>   "%(progn (add-hook 'org-capture-before-finalize-hook 'my-conversation-id) \"\")** Note taken on %U\n   %?  " :prepend t :empty-lines 1)
>
> Steps for reproduction:
>
> Trigger org-capture for the above capture entry.
>
> Examine conversation.org before/after the patch is applied. Note the
> absence/presence of IDs for the captured entry.
>
> Check for the stored links using C-c C-l. Note the file/headline links.
>
> # file conversation.org before and after the patch
>
> * Conversations
>
> ** Note taken on [2010-08-23 Mon 04:33]
>    :PROPERTIES:
>    :ID:       7e1974a6-8fa1-43cf-bef3-2adf37d99130
>    :END:
>
> ** Note taken on [2010-08-23 Mon 04:32]
>
> # (org-insert-link) showing stored links before and after the patch
>
> file:~/conversation.org (file:~/conversation.org)
> id:7e1974a6-8fa1-43cf-bef3-2adf37d99130 (Note taken on [2010-08-23 Mon 04:33])
>
2010-08-23 12:14:20 +02:00
Aidan Kehoe 9afcc02588 Use integer syntax for the MODE argument to #'set-file-modes
Hello!

We need this change to get org-mode compiling with recent XEmacs 21.5. On
previous 21.5 and current 21.4, the problem manifests itself at runtime, not
compile time, like so:

  (set-file-modes "/tmp/aidan/foo.el" ?\755)
  => Wrong type argument: integerp, ?í

One old reason to go for the ?\755 syntax instead of the #o755 syntax under
GNU Emacs was to be that older versions of GNU Emacs didn’t support #o755,
but, to my knowledge, every released GNU Emacs since March 2000 has
supported the latter syntax.

Best,

Aidan Kehoe, the XEmacs project.

ChangeLog addition:

2010-08-21  Aidan Kehoe  <kehoea@parhasard.net>

	* ob-tangle.el (org-babel-tangle): Change the MODE argument to
	#'set-file-modes to use integer, not character syntax, avoiding
	compile problems with recent XEmacs.
2010-08-23 12:00:01 +02:00
Carsten Dominik a7660225af Fix code typo 2010-08-21 08:37:11 +02:00
Carsten Dominik 96bacc020b Fix adding context lines in agenda
* lisp/org-agenda.el (org-agenda-add-entry-text): Make sure we move
forward even if there is no text to be added.

Adding entry text with org-agenda-add-entry-text-maxlines greater than
0 could result in an infinite loop.
2010-08-21 07:09:20 +02:00
Robert P. Goldman 06034b9813 Expanded docstring for org-emph-re 2010-08-21 05:10:34 +02:00
Carsten Dominik 557ce7c01c Revert "Search for LaTeX setup case-insensitively"
This reverts commit 034dbac3ee.
2010-08-20 18:24:09 +02:00
Carsten Dominik 190e88cfc9 Remove the special noutline.el file for XEmacs
The latest XEmacs package release does now contain a modern version of
outline.el, put there by Michael Sperber.

* Makefile: Remove targets related to noutline.el.
* README: Remove the entry for the xemacs directory.
* README_DIST: Remove the entry for the xemacs directory.
* doc/org.texi (Installation): Remove the special installation
instructions for XEmacs.
* lisp/org.el (outline): Remove special code to load noutline.el
for XEmacs.
* xemacs/README: File removed.
* xemacs/noutline.el: File removed.
* xemacs/ps-print-invisible.el: File removed.
2010-08-20 14:19:29 +02:00
Magnus Henoch bf0d8c5a0e org-capture + autoload
Jambunathan K <kjambunathan@gmail.com> writes:

> It would be convenient if I could do a
>
> M-x customize-group org-capture and/or
> M-x customize-variable org-capture-templates
>
> without having triggered a prior org-capture.
>
> For now, I trigger a capture, abort it and then proceed ahead with
> customizing these.

Here is a patch that adds an "autoload cookie" for
org-capture-templates.  After recompiling, org-install.el should contain
an autoload declaration for org-capture-templates.

Let's see if the patch tracker likes me :)

Magnus
2010-08-20 10:01:50 +02:00
Carsten Dominik 19b0e03f32 Make backslash escape "-" in property matches
* lisp/org.el (org-make-tags-matcher): Read "\\-" as "-" in
the tags/property matcher.

Ilya Shlyakhter writes:

> When doing an agenda tags match for tags or properties with dashes in
> their name, the dashes become negation operators: "my-prop>0" means
> "entries that have the tag 'my' and do not have a positive property
> 'prop'", rather than "entries that have a positive property
> 'my-prop'".  Is there a way to escape the dashes to get the latter
> meaning?
2010-08-20 09:26:08 +02:00
Carsten Dominik 294d398544 Remove impact of case-fold-search on LaTeX class setup
* lisp/org-exp.el (org-infile-export-plist): Bind case-fold-search to t.
2010-08-20 08:39:55 +02:00
Carsten Dominik 6f61135c84 New macro
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry): New macro.
2010-08-20 08:32:31 +02:00
Carsten Dominik 034dbac3ee Search for LaTeX setup case-insensitively
* lisp/org-latex.el (org-export-latex-set-initial-vars): Bind
`case-fold-search' to t around the search for special LaTeX setup.
* lisp/org-beamer.el (org-beamer-after-initial-vars):  Bind
`case-fold-search' to t around the search for special BEAMER setup.
2010-08-19 23:17:24 +02:00
Carsten Dominik 72a4aeebd3 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-19 22:23:18 +02:00
David Maus 6d9fcf8ff4 Delete postscript file after creating conversion to pdf
* org-agenda.el (org-write-agenda): Delete postscript file after
creating conversion to pdf.
2010-08-19 21:54:12 +02:00
David Maus 768d88acc3 Move require statements to proper place in evaluated lisp expression
* org-agenda.el (org-write-agenda): Move require statements to proper
place in evaluated lisp expression.
2010-08-19 21:52:18 +02:00
David Maus cc5b21e2cb Rename temporary buffer to remove dependency of `flet' macro
* org-agenda.el (org-write-agenda): Rename temporary buffer to remove
dependency of `flet' macro.
2010-08-19 21:37:19 +02:00
Dan Davison 7befdf8a00 babel: edit docstring
* ob-lob.el (org-babel-lob-get-info): Edit docstring
2010-08-19 09:31:19 -04:00
Dan Davison c11106a3e5 babel: Fix bug in export of #+lob/#+call lines
* ob-exp.el (org-babel-exp-lob-one-liners): Get parameter
	values from all standard sources when executing #+lob/#+call
	lines
2010-08-19 09:30:40 -04:00
Dan Davison bf64d25744 babel: R: Refactor evaluation code
* ob-R.el (org-babel-R-evaluate): Break the two branches into
    two separate functions
    (org-babel-R-evaluate-external-process): New function to
    handle external process evaluation
    (org-babel-R-evaluate-session): New function to handle session
    evaluation
2010-08-18 20:20:54 -04:00
Dan Davison 66ca61126c Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-18 15:15:13 -04:00
Dan Davison 23ab61d93c babel: refactor `org-babel-switch-to-session'
* ob.el (org-babel-initiate-session): new function derived
    from previous `org-babel-switch-to-session'
    (org-babel-switch-to-session): refactored to use new
    `org-babel-initiate-session'

This breaks the original `org-babel-switch-to-session' into a new
function `org-babel-initiate-session' and
`org-babel-switch-to-session'.
2010-08-18 15:13:57 -04:00
Dan Davison ad7d9c43c8 babel: Fix prefix version of `org-babel-switch-to-session'
* ob.el (org-babel-switch-to-session): Supply missing "P"
	argument to (interactive)
2010-08-18 15:13:55 -04:00
David Maus d6868e1602 Decode entry according to its character encoding
* org-feed.el (org-feed-format-entry): Decode entry according to its
character encoding.

Feed entries may contain raw unicode characters that must be converted
to utf-8 before they can be properly inserted in the target buffer.
2010-08-18 21:04:04 +02:00
David Maus 7cbc7a67d4 org-feed: Use `xml-substitute-special' for unescaping XML entities.
* org-feed.el (xml-substitute-special): Declare function for byte
compiler.
(org-feed-unescape): Removed.
(org-feed-parse-rss-entry, org-feed-parse-atom-entry): Use
`xml-substitute-special' to unescape XML entities.

TINYCHANGE

Patch by Michael Brand
2010-08-18 20:49:54 +02:00
Dan Davison ed62a85bf7 babel: Throw error on `org-babel-switch-to-session' when :session not in effect
* ob.el (org-babel-switch-to-session): Throw error if block if
    :session not in effect for the block
2010-08-18 13:55:36 -04:00
Carsten Dominik fbc0ce10de Keep compiler happy 2010-08-18 08:41:29 +02:00
Carsten Dominik ce58d6dd0a Align table before converting it to a table.el table
* lisp/org-table.el (org-table-create-with-table.el): Align table
before converting.
2010-08-18 08:35:15 +02:00
Dan Davison 4ac8294020 Avoid error and unnecessary message in transient use of code edit buffer
* ob.el (org-babel-do-in-edit-buffer): Suppress message and
	check that org-src buffer is current before attempting exit

	* org-src.el (org-edit-src-code): New argument quietlyp allows
	message to be suppressed
2010-08-17 23:40:53 -04:00
Dan Davison 76790e1aa8 Get rid of some compiler warnings.
* org-src.el (ob-comint): require 'ob-comint
	(org-src-babel-info): define variable

Also, reposition `org-src-do-at-code-block' and
`org-src-do-key-sequence-at-code-block' function definitions within
the file.
2010-08-17 22:37:19 -04:00
Dan Davison f9cecd192d Make language major mode commands available at Org code blocks.
* ob.el (org-babel-do-in-edit-buffer): New macro to
    evaluate lisp in the language major mode edit buffer.
    (org-babel-do-key-sequence-in-edit-buffer): New function to call
    an arbitrary key sequence in the language major mode edit
    buffer
    * org-src.el (org-src-switch-to-buffer): Add new allowed value
    'switch-invisibly for `org-src-window-setup'.

    * ob-keys.el (org-babel-key-bindings): Bind
    `org-babel-do-key-sequence-in-edit-buffer' to x and C-x in
    `org-babel-map'
2010-08-17 17:46:04 -04:00
Dan Davison 441288ee72 Make Org-babel commands available in code edit buffers
* org-src.el (ob-keys): Require ob-keys, because
    `org-babel-map' is used.
    (org-src-do-at-code-block): New macro to evaluate lisp with
    point at the start of the Org code block containing the code
    in this edit buffer.
    (org-src-do-key-sequence-at-code-block): New function to
    execute command bound to key at the Org code block containing
    the code in this edit buffer.
2010-08-17 17:45:47 -04:00
Dan Davison a4c8bcd31b babel: implement association of R code buffers with R session
* ob-R.el (org-babel-R-associate-session): New function
    to associate R code edit buffers with ESS comint session.
2010-08-17 17:32:23 -04:00
Dan Davison b61e0c4dfc Associate code edit buffer with babel comint session, if one exists.
* org-src.el (org-edit-src-code): If at src block, store babel
	info as buffer local variable.
	(org-src-associate-babel-session): New function to associate
	code edit buffer with comint session. Does nothing
	unless a language-specific function named
	`org-babel-LANG-associate-session' exists.
	(org-src-babel-configure-edit-buffer): New function to be
	called in `org-src-mode-hook'.
	(org-src-mode-hook): add `org-src-babel-configure-edit-buffer'
	to hook.
2010-08-17 17:32:23 -04:00
Dan Davison b05f8c91fe babel: new function `org-babel-switch-to-session-with-code'
* ob.el (org-babel-switch-to-session-with-code): new function
    to generate split frame displaying edit buffer and session.

    * ob-keys.el (org-babel-key-bindings): binding for
    `org-babel-switch-to-session-with-code'
2010-08-17 17:32:23 -04:00
Dan Davison cbe5089e0f Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-17 17:32:11 -04:00
Bastien Guerry 7cc0612e62 org-agenda-clock-out: remove unnecessary "P" in (interactive). 2010-08-17 18:47:57 +02:00
Dan Davison 7917e8ea29 Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-17 11:29:21 -04:00
Carsten Dominik bf3405a6ba Fix tags column for the case when org-indent-mode is active
* lisp/org.el (org-set-tags): Consider org-indent-mode when computing the
tags column.
2010-08-17 08:34:21 +02:00
Carsten Dominik 17ace08e0f Do not use looking-at-p when it does not exist
* lisp/org-compat.el (org-looking-at-p): Only use looking-at-p when defined.
2010-08-17 06:32:55 +02:00
David Maus 1ab9b17ee8 Delete excluded lines directly after call to sorting filter function.
* org-agenda.el (org-finalize-agenda-entries): Delete excluded lines
directly after call to sorting filter function.
2010-08-16 21:06:12 +02:00
Bastien Guerry 244681c44f org-agenda-clock-out: remove unused optional argument "arg". 2010-08-16 20:46:38 +02:00
Carsten Dominik 3082ea9a30 Use a better regexp to find a refile target headline
* lisp/org.el (org-complex-heading-regexp-format): Document the variable.
(org-get-refile-targets): Use `org-complex-heading-regexp-format' to
make the regular expression for matching the headline.

Now we use the format for the complex heading regexp, which means that
Changing the TODO state, level, priority, or tags of a heading will
still allow the heading to be matched by the regexp.
2010-08-16 19:27:38 +02:00
Carsten Dominik 56cf6ad42d Verify that refile cached position is correct
* lisp/org.el (org-refile-check-position): New function.
(org-goto):
(org-refile-get-location): Call `org-refile-check-position'.

Samuel Wales has reported that the cache is loosing it, occasionally.
2010-08-16 19:20:01 +02:00
Carsten Dominik 3529be82ef Fix interpretation of the :include property as a list of file names 2010-08-16 17:27:25 +02:00
Dan Davison 4f82a58e8c babel: python: use eq instead of equal
* ob-python.el (org-babel-python-initiate-session-by-key): use
	eq instead of equal to compare symbols
2010-08-16 11:09:20 -04:00
Carsten Dominik ac8e3fb8d1 New hook to add more properties to new agenda items, or to filter
* lisp/org-agenda.el (org-agenda-before-sorting-filter-function): New hook
function.
(org-finalize-agenda-entries): Apply
`org-agenda-before-sorting-filter-function'.
2010-08-16 15:39:29 +02:00
Carsten Dominik 796318b215 Fix Table attribute issue during PDF export
* lisp/org-latex.el (org-export-latex-first-lines): Do not protect meta
lines that have nothing to do with babel.
2010-08-16 14:28:29 +02:00
Carsten Dominik 6da5c4525a Fix checkitem and item placement bugs in org-capture
* lisp/org-capture.el (org-capture-place-template): Handle the checkitem
case.
(org-capture-place-item): Provide boundaries for the search to make
sure we do not get a match in a different tree.
2010-08-16 10:24:13 +02:00
Sébastien Vauban ff1b5de478 Fontify whole lines* of code-block or meta-lines
Patch by Sebastien Vauban
2010-08-15 08:53:26 +02:00
Stephen Eglen bb0a1f190b Bug: possible bug in latex export [7.01trans (release_6.36.735.g15ca.dirty)]
> FYI: This is a know limitation of the LaTeX exporter[1] and the
> current state of this issue (dealing with skipped levels) is that
> patches for the problem are welcome.  I agree that even if
> skipped-level-headlines are not allowed, they shouldn't be silently
> droped neither.
>
> Best,
>   -- David
>
> [1] http://thread.gmane.org/gmane.emacs.orgmode/26413

I think I have a patch for this, see below.  I've tested it briefly to
see that it works with both oddeven and odd level headings, but I would
appreciate other people taking a closer look/checking that it doesn't
break other things.  I think I found the problem, in that if you have a
structure like

* A

*** B

(i.e. a level one and a level 3)

after it has found the level 1 content, it expects to find a level 2
subtree, whereas in fact there could be a level 2+ tree.  See the
comment in the code for the change I made.

Stephen
2010-08-15 08:34:26 +02:00
Carsten Dominik 2b28ba8800 Fix typo 2010-08-15 07:50:29 +02:00
Carsten Dominik 168fc09928 Minor fix, still in the macro parser 2010-08-14 19:55:57 +02:00
Carsten Dominik 68b960c099 Fix the macro argument parser
* lisp/org-exp.el (org-export-preprocess-apply-macros): Fix the macro
argument parser.

The macro argument parser was swallowing white space after escaped commas.
2010-08-14 16:41:12 +02:00
Carsten Dominik 8c0db0b909 Fix bug with escaping commas in macro arguments 2010-08-14 11:34:39 +02:00
Carsten Dominik d7377a48ee Merge branch 'implement-mathjax-support' 2010-08-14 07:51:38 +02:00
Noorul Islam 5f5af45971 Fix problem when exporting to PDF to a different directory
* lisp/org-latex.el (org-latex-to-pdf-process): Add output-directory
option for the command pdflatex.
(org-export-as-pdf): Respect directory in path of EXPORT_FILE_NAME.

On Wed, Aug 4, 2010 at 1:26 AM, Manuel Amador <amador.manuel@gmail.com>wrote:

> Hi everybody,
>
> I am running into the following issue.
>
> I would like to export certain subtrees of an org file to a particular
> directory. I set the export property as follows:
>
> * Test 1
>   :PROPERTIES:
>   :EXPORT_FILE_NAME: some_directory/some_name
>   :END:
>
>
> When I try exporting the above subtree as a pdf (say for example, by
> running
> C-c C-e 1 d), the .tex file is created in the appropriate target directory,
> but
> the .pdf file is created in the current directory (while emacs mistakenly
> reports that the pdf was not created). Is there a way to get this to work
> correctly?
>
>

Thanks and Regards
Noorul
2010-08-13 22:42:56 +02:00
Carsten Dominik 999078b0bf Implement MathJax support
* lisp/org-exp.el (org-export-with-LaTeX-fragments): New default t, which
now means to use MathJax processing for HTML.  Also allow new value
`dvipng' to force the old image processing.
(org-infile-export-plist): Parse for MATHJAX setup line.
* lisp/org-html.el (org-export-html-mathjax-options): New option.
(org-export-html-mathjax-config): New function.
(org-export-html-mathjax-template): New option.
(org-export-html-preprocess): Call the LaTeX snippet processor with an
additional argument to declare special ways of processing.
(org-export-as-html): Bind the dynamical variable
`org-export-have-math'.  Insert the MathJax script template when it is
needed by the document.
* lisp/org.el (org-preview-latex-fragment): Call `org-format-latex' with
the additional processing argument.
(org-export-have-math): New variable, for dynamic scoping.
(org-format-latex): Implement specific ways of processing.  New
function argument for processing type.
(org-org-menu): Remove the entry to configure LaTeX snippet
processing.

MathJax is now the default for displaying math in a browser.
2010-08-13 14:22:16 +02:00
Bastien Guerry d17cc96fc7 Remove a compiler warning.
Added (defvar org-clock-current-task) to org-agenda.el.
2010-08-13 10:48:40 +02:00
Bastien Guerry 5b8e10aaed Bugfix in org-clock-set-current.
Don't try to get the filename as it break `org-clock-set-current' when
trying to clock in from an indirect capture buffer.
2010-08-13 10:36:16 +02:00
Bastien Guerry 13a05628f4 org-ctrl-c-ctrl-c: document C-cC-c for capture buffer.
Don't mention remember in this docstring.
2010-08-12 15:24:32 +02:00
Bastien Guerry 12e4140f5d org-bbdb: Ignore case in anniv class string.
Based on Jambunathan's suggestion:
http://article.gmane.org/gmane.emacs.orgmode/28508
2010-08-12 11:03:07 +02:00
Bastien Guerry 0f33e18983 org-agenda-clock-goto: complete the docstring. 2010-08-12 10:27:05 +02:00
Bastien Guerry a7a842457d Rebind org-agenda-clock-goto to `J' in the agenda.
* org-agenda.el (org-agenda-clock-goto): Use `\C-c\C-x\C-j' for
`org-clock-goto' and `J' for `org-agenda-clock-goto'.  If the heading
currently clocked in is not listed in the agenda, display this entry
in another buffer.  If there is no running clock, display a help
message.

* org-clock.el (org-clock-set-current): append the filename after the
heading.
2010-08-11 16:10:14 +02:00
Bastien Guerry f0be9ff91b Bugfix: tiny typo in org-capture.el. 2010-08-11 15:08:45 +02:00
Carsten Dominik 0633c6aa09 Capture: Fix indentation of %i 2010-08-11 11:10:02 +02:00
Nicolas Goaziou da656ba48d Table caption produces trailing "nil" in pdf export
Hello,

>>>>> John Hendy writes:

> Suddenly I'm getting a line with nothing but "nil" between the caption and
> the table when exporting from org-mode to LaTeX. I swear this not happening.
> I believe I did a git pull on Friday or some time last week. The only reason
> I noticed is that I just set up emacs, org, and LaTeX on a new computer and
> tested an old file to make sure the export was working. I then checked my
> other computer with what I thought was a fine install and it's doing it now,
> too. I originally thought I missed something on the new computer, but now
> I'm wondering if it's from the fresh pull.

This patch (needed by my own mistake) should correct the problem.

Regards,

-- Nicolas
>From 38a3ae8cf8716af0db87a47a421b6d5af654d045 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Tue, 10 Aug 2010 22:43:35 +0200
Subject: [PATCH] Fix empty label bug

* org-latex.el (org-export-latex-tables): Return "" instead of nil
  when no label is attached.
2010-08-11 09:50:04 +02:00
Carsten Dominik 6a5d28bce7 Fix typo. 2010-08-11 09:45:36 +02:00
Carsten Dominik d34a5a2613 Agenda: Allow compact two-column display in agenda dispatcher
* lisp/org-agenda.el (org-agenda-menu-show-match): New option.
(org-agenda-menu-two-column): New option.
(org-agenda-get-restriction-and-command): Implement dispatch menu
without showing the matcher, and with two-column display.
2010-08-11 09:42:39 +02:00
Bernt Hansen d0a5e11db9 Fix org-indent-mode message when mode is refused
* lisp/org-indent.el (org-indent-mode): Fix grammar for message when mode is refused
2010-08-09 21:52:33 +02:00
Eric Schulte 693cea9bb9 ob.el fixed bug when inserting into empty buffer
* lisp/ob.el (org-babel-insert-result): ensures `beg' is set, even if
  no previous result exists
2010-08-08 22:01:17 -06:00
Noorul Islam 043f088753 fixed compiler warning in ob.el
* lisp/ob.el
  Declare org-babel-lob-execute-maybe() to avoid compiler warning.
2010-08-08 21:30:16 -06:00
Carsten Dominik 13ddc493e4 Fix bugs to keep compiler happy 2010-08-08 22:20:33 +02:00
Carsten Dominik dff92f433e Fix indentation 2010-08-08 08:43:07 +02:00
Noorul Islam 383802d063 Fix :VISIBILITY: handling of nested "folded" properties
On Fri, Jul 30, 2010 at 4:38 PM, Rainer Stengele
<rainer.stengele@online.de>wrote:

> Having
>
> * headline 1
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> ** headline 2.1
>  - stuff
> ** headline 2.1
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> - stuff
>
> C-u C-u <TAB>
>    Switch back to the startup visibility of the buffer, i.e. whatever is
> requested by startup options and  VISIBILITY  properties in individual
> entries.
>
>
> does not result in
>
>
> * headline 1...>
>
>
> as expected. Instead I get:
>
>
> * headline 1...>
> ** headline 2.1...>
> ** headline 2.1...>
>
>
> removing the second folded propertiy results correctly in:
>
> * headline 1...>
>
>
> This looks like a bug in the :VISIBILITY: handling!?
>
>
>
I am not sure whether this is a bug.  But it looks like the above scenario
was not considered initially. I might be wrong.

The attached patch seems to solve this problem.

* lisp/org.el: org-set-visibility-according-to-property ()
  Use backward search instead of forward, so that top hierarchy gets
priority.

Thanks and Regards
Noorul
2010-08-08 08:43:00 +02:00
Carsten Dominik 26714634a9 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-07 08:23:56 +02:00
Carsten Dominik 5188f71ee8 Timeline: Allow the buffer to be an indirect one
* lisp/org-agenda.el (org-timeline): Allow indirect buffer.
2010-08-07 08:23:33 +02:00
Bastien Guerry 5b85810f4d New command: `org-agenda-clock-goto' (C-c C-x C-j)
This command jumps to the headline of the clocking task within the
agenda buffer.  `org-agenda-clock-goto' is bound to `C-c C-x C-j'.

It is different from `org-clock-goto', which jumps to the currently
clocking entry itself (bound to `J').
2010-08-06 19:28:08 +02:00
Bastien Guerry 5236e0ea31 Revert: don't use :html-resolution in `org-create-formula-image'.
http://article.gmane.org/gmane.emacs.orgmode/28415

,----
| From: Carsten Dominik <carsten.dominik@gmail.com>
| Subject: Re: [Orgmode] Change resolution of LaTeX formulas in HTML output?
| To: Bastien <bastien.guerry@wikimedia.fr>
| Cc: amscopub-mail@yahoo.com, emacs-orgmode@gnu.org
| Date: Fri, 6 Aug 2010 12:46:28 +0200
|
| On Aug 5, 2010, at 12:32 AM, Bastien wrote:
|
| > amscopub-mail@yahoo.com writes:
| >
| >> Is there a way to control the resolution of PNG LaTeX formulas when
| >> you export to HTML?
| >
| > I've implemented this.
|
| I would not think that we need this change, the :scale and :html-scale
| parameters do this for in-buffer display and html formatting,
| respectively.
|
| Please revert this change.
|
| - Carsten
`----
2010-08-06 19:20:17 +02:00
Carsten Dominik 251a3ca7c3 Add org-wikinodes.el as a contributed package
* contrib/lisp/org-wikinodes.el: New file.
* lisp/org-exp.el (org-export-preprocess-after-radio-targets-hook):
(org-export-define-heading-targets-headline-hook): New hooks.
* lisp/org.el (org-modules): Add entry for org-wikinodes.el.
(org-font-lock-set-keywords-hook): New hook.
(org-open-at-point-functions): New hook.
(org-find-exact-headling-in-buffer):
(org-find-exact-heading-in-directory): New functions.
(org-mode-flyspell-verify): Better cursor position for checking if
flyspell should ignore a word.
2010-08-06 15:08:45 +02:00
Carsten Dominik d593bae0ff Merge branch 'internal-link-exact-headline-match' 2010-08-06 15:04:59 +02:00
Carsten Dominik b7b6a72869 Do not call modification hooks when triggering indentation
* lisp/org-indent.el (org-indent-remove-properties):
(org-indent-add-properties): Make sure changing these properties does
not trigger modification hooks
2010-08-06 12:51:56 +02:00
Carsten Dominik 2b1d745c09 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/org.el
2010-08-06 12:49:02 +02:00
Carsten Dominik 2ed0545b99 Minor doc fix 2010-08-06 12:48:16 +02:00
Carsten Dominik a84c8a2cba Make internal links in Org files search for an exact headline match
* lisp/org.el (org-link-search-must-match-exact-headline): New option.
(org-link-search-inhibit-query): New variable.
(org-link-search): Search for exact headline match in Org files
* doc/org.texi (Internal links): Document the changes in internal links.

Internal links used to do a fuzzy text search for the link text.  This
patch changes the behavior for Org files.  Here a link [[My Target]]
now searches for an exact headline match, i.e. for a headline that
does look like "* My Target", optionally with TODO keyword, priority
cookie and tags.

The new option `org-link-search-must-match-exact-headline' is
`query-to-create' by default.  This means that a failed link search
will offer to create the headline as a top-level headline at the end
of the buffer.  This corresponds to a wiki-like behavior where missing
targets are automatically created.  If you do not like this behavior,
change the option to t.
2010-08-06 08:34:33 +02:00
Dan Davison 9330ad5b81 babel: single function to execute executable babel elements
* ob.el (org-babel-execute-src-block-maybe): remove check for
    `org-babel-no-eval-on-ctrl-c-ctrl-c'; this is done in the new
    function `org-babel-execute-safely-maybe'

    (org-babel-execute-maybe): new function to execute src blocks
    or lob/call lines.

    (org-babel-execute-safely-maybe): new function to execute src blocks
    or lob/call lines via C-c C-c

    (org-ctrl-c-ctrl-c-hook): remove
    `org-babel-execute-src-block-maybe' and add
    `org-babel-execute-safely-maybe'.

    * ob-lob.el (org-ctrl-c-ctrl-c-hook): remove
    `org-babel-lob-execute-maybe'

    * ob-keys.el (org-babel-key-bindings): New function
    `org-babel-execute-maybe' is bound to C-c C-v e and C-c C-v
    C-e
2010-08-05 13:45:13 -04:00
Dan Davison 2935464811 babel: make `org-babel-load-in-session' work for remote sessions
2010-08-05  Dan Davison  <davison@stats.ox.ac.uk>

	* ob.el (org-babel-load-in-session): set directory in case
	:dir arg is in effect
2010-08-05 00:43:26 -04:00
Bastien Guerry a4b86a8eac New :html-resolution parameter for `org-format-latex-options'.
This parameter default to 140 and controls the resolution of images
created from LaTeX fragments for HTML output.  There is no :resolution
parameter: the resolution of images produced for a buffer is computed
from the font height.)

This was suggested by Uriel (amscopub-mail@yahoo.com).
2010-08-05 00:31:32 +02:00
Eric Schulte 158f5cc726 ob-tangle: don't throw errors when we're not under of a headline
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): don't throw
  errors when we're not under of a headline
2010-08-04 09:20:58 -06:00
Dan Davison 9978dcf21f babel: octave/matlab: use dlmwrite to write delimited text
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el (org-babel-octave-wrapper-method): use dlmwrite
	to write delimited text instead of save -ascii
	(org-babel-octave-import-elisp-from-file): specify that data
	written to file is tab-delimited
2010-08-03 23:54:24 -04:00
Dan Davison f318bdb19b Merge branch 'ded-babel' 2010-08-03 23:23:54 -04:00
Eric Schulte a4a44ecb4e ob-lisp: initial support for lisp code blocks
Thanks to David O'Toole for getting this going
2010-08-03 09:09:11 -06:00
Dan Davison 5122aee4a7 babel: R: Specify that tables are tab-delimited
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-R.el (org-babel-R-evaluate): Specify that tabular data is
	tab-delimited

Prior to this we had

 #+begin_src R
  c("some words", "with spaces")
 #+end_src

 #+results:
 | some | words  |
 | with | spaces |
2010-08-03 00:14:56 -04:00
Dan Davison 34144f9a95 babel: Allow specification of field separator when reading tables
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

	* ob.el (org-babel-import-elisp-from-file):
	Allow separator to be specified
2010-08-03 00:14:48 -04:00
Dan Davison 1239099120 babel: python: Fix recognition of lists and tuples
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

    * ob-python.el (org-babel-python-table-or-string): Fix
    recognition of lists and tuples

Prior to this we had

 #+begin_src python
   return [1, 2]
 #+end_src

 #+results:
 : [1, 2]
2010-08-03 00:14:35 -04:00
Dan Davison 876b115259 babel: octave: allow remote files
2010-08-02  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el (org-babel-octave-evaluate-external-process):
	allow remote files
2010-08-02 22:08:47 -04:00
Juan Pechiar 743a7b8293 From: Juan <Pechiar@computer.org>
Hi,

I'm starting to work with ob-octave and found several problems:

The first, for which I have a fix (see patch below) is that octave's
output was passed on as a string instead of being interpreted as a table:

[diff removed]

Now this works:

8<------------------------------------------------------------
#+source: test_output
#+begin_src octave :results value vector
[[1 2 3];[4 5 6]]
#+end_src

#+results: test_output
| 1.00000000e+00 | 2.00000000e+00 | 3.00000000e+00 |
| 4.00000000e+00 | 5.00000000e+00 | 6.00000000e+00 |
8<------------------------------------------------------------

(before the patch you'd get a single table element with something like
"1 2 3\n 4 5 6\n" inside).

The second problem is that if I use octave table output as input to
another block, it gets interpreted as a string instead of a vector:

8<------------------------------------------------------------
#+results: test_output
| 1.25000000e+00 |

#+source: check_input
#+begin_src octave :var input=test_output() :results output
ischar( input )
size( input )
#+end_src

#+results: check_input
: input = 1.25000000e+00
: ans =  1
: ans =
:     1   14
8<------------------------------------------------------------

This has to do with the EXP notation. The 'e+00' suffix makes the
whole table into a string. The problem is with "%S" in the formatting
inside org-babel-octave-var-to-octave.

The following patch seems to fix it (and makes it possible to work with
complex numbers inside the tables)::

[diff removed]

A third problem is with org-babel-octave-var-to-octave.

For example:

: (org-babel-octave-var-to-octave '( ( 1 2 3 ) ( 4 5 6 ) ))
: ->  "[[1, 2, 3], [4, 5, 6]]"

This is not a 2x3 matrix, but a 1x6 vector:

: octave-3.2.3:1> [[1,2,3],[4,5,6]]
: ans =
:    1   2   3   4   5   6

a semicolon ';' or '\n' is needed between rows instead of a comma.

To sum up:
   - 2 patches for prepare-session and importing the results back as
   org-tables (I don't know if these patches break anything).

   - 1 problem with matrix notation in org-babel-octave-var-to-octave.
   I'll try to provide a patch for this today.

2010-08-01  Juan Pechiar  <Pechiar@computer.org>

	* ob-octave.el (org-babel-octave-evaluate-external-process):
	use `org-babel-octave-import-elisp-from-file' instead of
	`org-babel-eval-read-file'.
	(org-babel-octave-var-to-octave): separate matrix rows with
	';', and use '%s' as format specifier instead of '%S'
2010-08-01 18:09:24 -04:00
Dan Davison 7b80fff974 babel: matlab/octave: only (require 'matlab) when necessary
2010-08-01  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el only (require 'matlab) when necessary
	(org-babel-octave-initiate-session) (require) octave-inf or
	matlab as appropriate
	(org-babel-execute:matlab): remove (require)
	(org-babel-prep-session:matlab): remove (require)
	(org-babel-matlab-initiate-session): remove (require)
2010-08-01 14:34:28 -04:00
Dan Davison a5f0bb404f babel: octave: Fix formal argument list
2010-08-01  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el (org-babel-octave-evaluate): Fix formal
	argument list
2010-08-01 12:17:47 -04:00
Bastien Guerry 0cafae6a6a Allow for multiple classes in HTML_CONTAINER_CLASS.
Based on a patch submitted by David Maus:
http://patchwork.newartisans.com/patch/178/
2010-08-01 11:32:17 +02:00
Bastien Guerry 3642e441bc Fix org-format-latex: don't throw an error if dir exists.
From: Alexandre Passos <alexandre.tp@gmail.com>

> I was editing an org document on a server earlier today, remotely
> using tramp, and continuously exporting it to html. When I added
> LaTeX, it exported once and then not anymore, failing because it
> couldn't create a directory anymore. So I found out that patching
> org-export-latex to pass a "t" parameter to org-make-directory fixes
> this, and it continues to work perfectly. This is the modified version
> of that function, if anyone else is interested in this constrained
> case. The only change I made was right under the "make sure directory
> exists" comment.
2010-08-01 10:08:35 +02:00
Bastien Guerry 8221861f72 Revert Tassilo's patch for org-gnus.el as it is not finished yet. 2010-08-01 01:46:19 +02:00
Bastien Guerry 9a81df1394 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-01 01:31:46 +02:00
Eric Schulte 9a2ea65bc3 ob-python: can now handle VERY long result lines
* lisp/ob-python.el (org-babel-python-table-or-string): can now handle
  VERY long result lines
2010-07-31 14:24:25 -06:00
Nicolas Goaziou caa5da1efd bug in org-mode-export-as-latex
Hello,

>>>>> Neil Hepburn writes:
> The latest version (7.01g) seems to have a bug when exporting to PDF
> (and LaTeX) with tables with labels.  The export does not label the
> table in the LaTeX file although it is labeled in the .org file.

Curiously, it looks like \label code was removed at some time.

This quick fix should put labels back.

Regards,

-- Nicolas
>From 64855c52b20766db9898ce82316fac11d51de72d Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Wed, 28 Jul 2010 20:54:40 +0200
Subject: [PATCH] Add labels to tables.

* org-latex.el (org-export-latex-tables): add label if any
* org-latex.el (org-export-latex-convert-table.el-table): fix little
  mistake when inserting label
2010-07-31 18:59:18 +02:00
Nicolas Goaziou d035222ce5 Keep same column when cycling visibility
Hello,

Like what is already done with drawers, point should not move when
cycling visibility of headings and list items.

The call to `org-back-to-heading' this patch removes seems redundant
anyways.

Regards,

-- Nicolas
>From 17cd55557d747366c90fad47b44edeac2daf920b Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sun, 25 Jul 2010 23:14:08 +0200
Subject: [PATCH] Cursor stays at same column when cycling visibility.

* org.el (org-cycle-internal-local): Removed an unnecessary call to
  `org-back-to-heading' that was preventing point to stay at its
  column when cycling visibility.
2010-07-31 18:53:32 +02:00
Bastien Guerry d458125974 Merge branch 'restriction-lock-speed-keys' 2010-07-31 18:43:15 +02:00
Noorul Islam 0ac2a69836 org-capture: Make messages consistent.
A very small patch that makes the message displayed consistent.

* lisp/org-capture.el (org-capture-finalize):
  Make messages consistent.
2010-07-31 18:41:52 +02:00
Noorul Islam cb769af073 org-gnus.el: Suppress compiler warning.
The attached patch suppresses a compiler warning in org-gnus.el

* lisp/org-gnus.el:
  Suppress compiler warning by declaring outside function
nnimap-retrieve-headers-from-file.
2010-07-31 18:38:57 +02:00
Bastien Guerry 09ae8a0b1d Add restriction (un)lock to `org-speed-commands-default'.
You can now use "<" and ">" as speedy key commands for
org-agenda-set-restriction-lock and org-agenda-remove-restriction-lock.
2010-07-31 18:19:11 +02:00
Noorul Islam 4cd9e71019 Bug in org-colview/org-beamer?
On Sat, Jul 31, 2010 at 12:54 PM, Simon Guest <simon.guest@tesujimath.org>wrote:

> Hi,
>
> I'm making my first real Org mode Beamer presentation, using org-mode
> 7.01g, and trying to set the ignore_heading for a multi-column slide.
>
> In column mode, when I hit 'e' in the Env column, Emacs says:
> Wrong type argument: commandp, org-beamer-set-environment-tag
> (and org-beamer-set-environment-tag does not appear to be defined
> anywhere).
>
> It's triggered from this code in org-colview.el
>     ((equal key "BEAMER_env")
>      (setq eval '(org-with-point-at pom
>                    (call-interactively 'org-beamer-set-environment-tag))))
>
> Any idea what's wrong?
>
>
This function was renamed to org-beamer-select-environment and I think it
was not changed here.

The attached patch should solve the problem.

* lisp/org-colview.el
  Use org-beamer-select-environment instead
of org-beamer-set-environment-tag

Thanks and Regards
Noorul
2010-07-31 12:48:15 +02:00
Nick Dokos e555514feb Placement=[H] not exporting to LaTeX anymore?
Nick Dokos <nicholas.dokos@hp.com> wrote:

> John Hendy <jw.hendy@gmail.com> wrote:
>
> > Just to be sure I created an blank org file with only this:
> >
> > * test
> >
> > #+CAPTION: test table
> > #+ATTR_LaTeX: placement=[H]
> > | 1    | 2    | 3    | 4    |
> > |------+------+------+------|
> > | test | test | test | test |
> > | test | test | test | test |
> >
> > It gets exported to this:
> >
> > \begin{table}[htb]
> > \caption{test table}
> > \begin{center}
> > \begin{tabular}{llll}
> >
> > Did something change between 6.35 and 7.01 or in the LaTeX table options?
> >
>
> I think that placement works fine for figures, but not for tables. In
> fact, I cannot find the code that's supposed to do this for tables: I
> suspect that it never existed. So unless I'm mistaken, it seems that
> tables never got the placement treatment that figures did.
>

Try the following patch (might be wrong in detail, and its scope might
be too limited, but I hope it's not too far off: at least it seems to
work on your simple table.) It may also be white-space damaged, so some
reformatting may be needed after applying it.

Nick

>From 4c8cdde9f3d80edc882efe83562a934fd9a6a8c8 Mon Sep 17 00:00:00 2001
From: Nick Dokos <nicholas.dokos@hp.com>
Date: Fri, 23 Jul 2010 17:54:06 -0400
Subject: [PATCH] Process latex placement attribute for tables.

Figures got placement attributes previously, but tables never did.
2010-07-31 11:16:20 +02:00
Tassilo Horn c708851b5e Fixing slowness of following Gnus links to IMAP articles
David Maus <dmaus@ictsoc.de> writes:

Hi David,

>>I'm trying to add a workaround to org-gnus.el which should save the
>>slowness of querying the IMAP server by looking up the article number
>>in the group's .overview file.  But since I don't have nnimap groups,
>>we have to play some question & answer game. ;-)
>
>>Please apply this patch and set
>>`org-gnus-nnimap-query-article-no-from-file' to t.
>
> The patch does not work: It calls `nnimap-retrieve-headers-from-file'
> without the required arguments (group server)

Argh, stupid me!  Here's a corrected patch.

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---

> and the headers are not fetched because
> `nnimap-retrieve-headers-from-file' looks for a NOV cache file, not
> .overview.

Aren't overview file and NOV file synonyms?

Hm, anyway.  In the Gnus docs I've found this paragraph:

,----[ (info "(gnus)IMAP") ]
| `nnimap-nov-is-evil'
|      Never generate or use a local NOV database. Defaults to the value
|      of `gnus-agent'.
|
|      Using a NOV database usually makes header fetching much faster,
|      but it uses the `UID SEARCH UID' command, which is very slow on
|      some servers (notably some versions of Courier). Since the Gnus
|      Agent caches the information in the NOV database without using the
|      slow command, this variable defaults to true if the Agent is in
|      use, and false otherwise.
`----

So maybe we're trying to replace one slow command with another slow
command.  Especially, the fact that Courier is explicitly mentioned is a
bit frustrating.  Well, let's try it out and see if it helps a bit.

> Alas: I couldn't figure out how to enable NOV cache for my nnimap
> group.  Setting `nnimap-nov-is-evil' to nil didn't help.

This variable defaults to the value of `gnus-agent', so I assume the
agent has to be enabled (which is default), and most probably the IMAP
server has to be agentized as well.  That can be done in the server
buffer (`^' in *Group*), and then:

,----[ (info "(gnus)Server Agent Commands") ]
| `J a'
|      Add the current server to the list of servers covered by the Gnus
|      Agent (`gnus-agent-add-server').
`----

Bye,
Tassilo
2010-07-31 10:34:35 +02:00
Matt Lundin f08a5eaa06 org-insert-time-stamp: fix value of org-last-inserted-timestamp
* lisp/org.el (org-insert-time-stamp): Fix org-insert-time-stamp so
  that the value of org-last-inserted-timestamp includes time range.

Previously, org-last-inserted-timestamp included only the
beginning of a time range (e.g., 10:00 instead of 10:00-12:00).
This caused parsing problems elsewhere, such as when rescheduling
items with repeating timestamps and a time range (the repeater
was removed during rescheduling).
2010-07-31 10:31:30 +02:00
David Maus d3c82cc757 Provide link property for message-id without angle brackets
* org-wl.el (org-wl-store-link-message): Provide link property
for message-id without angle brackets.

The message-id header field can be used to maintain the connection
between an Org entry and an internet message.  The angle brackets have
a special meaning when performing a TAGS/PROPS/TODO query (Cf. Org
mode manual 10.3.3).  To be able to use the message-id as an entry
property we have to remove the angle brackets to be able to perform a
search for the entry associated with a particular message.
2010-07-31 09:47:33 +02:00
Eric Schulte c32ece6e76 ob-keys: org-babel-load-in-session now using "l", org-babel-lob-ingest switched to "i"
* doc/orgcard.tex: "l" used for org-babel-load-in-session and
  org-babel-lob-ingest switched to "i"
2010-07-30 11:02:42 -06:00
John Wiegley 3ee6b99f06 Added a missing call to (goto-char (point-min)) 2010-07-28 21:05:50 -04:00
John Wiegley dfa41442af Resolve a compiler warning 2010-07-28 20:50:19 -04:00
Eric Schulte 69f15e0b73 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-28 09:24:15 -06:00
Eric Schulte dc92eaa08d ob-R: improved prompt-stripping regexp thanks to Charles C. Berry
* lisp/ob-R.el (org-babel-R-evaluate): improved prompt-stripping
  regexp
2010-07-28 08:05:30 -06:00
Eric Schulte f6ccee2568 ob-tangle: org-babel-post-tangle-hook no longer kills the current buffer
* lisp/ob-tangle.el (org-babel-find-file-noselect-refresh): finds a
  file ensuing that the latest changes on disk are represented

  (org-babel-with-temp-filebuffer): now only kills the buffer of the
  tangled file, and doesn't kill said buffer if the file is already
  being visited
2010-07-28 07:41:16 -06:00
Eric Schulte 4d318e4499 ob-sqlite: now inserts string arguments w/o quotes
* lisp/ob-sqlite.el (org-babel-sqlite-expand-vars): now inserts string
  arguments w/o quotes
2010-07-28 07:31:39 -06:00
Bernt Hansen 95212c2202 Fix clocking on capture completion
* lisp/org-capture.el (org-capture-finalize): Fix clock in of interrupted
task during capture finalize

Calling org-capture-get inside the org-with-point-at macro does not
work when the current clocking task and the capture target buffer are
the same.  In this case the captured task would continue clocking
instead of switching back to the previously clocking task.
2010-07-28 02:35:38 -04:00
John Wiegley d91ce1490d Merge branch 't/patch157' 2010-07-28 02:26:57 -04:00
Jambunathan K 86ca53fe6f Agenda view invokes custom sort routine even if not configured to do so 2010-07-28 02:25:09 -04:00
Eric Schulte 24bb01afc8 ob-R: clean up extra prompts in session output
Thanks to Charles C. Berry for pointing this issue out

* lisp/ob-R.el (org-babel-R-evaluate): clean up extra prompts in
  session output
2010-07-27 12:20:00 -06:00
Eric Schulte bb8086ffbb ob-C: more generous regular expression for matching main call
* lisp/ob-C.el (org-babel-C-ensure-main-wrap): more generous regular
  expression for matching main function
2010-07-25 12:32:48 -06:00
Eric Schulte ea0563e642 ob-ledger: Babel support for the ledger accounting system
Thanks to Eric S Fraga for contributing this support.

  For information on Ledger see
  http://wiki.github.com/jwiegley/ledger/
2010-07-23 09:23:44 -07:00
Eric Schulte ec034ba0d5 ob-lob: fixed error in lob regexp -- it wasn't matching lob lines w/o indices
* lisp/ob-lob.el (org-babel-lob-one-liner-regexp): fixed error in lob
  regexp -- it wasn't matching lob lines w/o indices
2010-07-22 16:20:08 -07:00
Eric Schulte 8bda0e276f fix compiler warning in org-exp.el
* lisp/org-exp.el (org-export-latex-listings-w-names): fix compiler
  warning in org-exp.el
2010-07-22 11:36:34 -07:00
Carsten Dominik dd484300d3 Publish: Better error messages if important information is missing
* lisp/org-publish.el (org-publish-file): Better error message if
base-directory or publishing-directory are not defined.
2010-07-22 11:45:04 +02:00
Carsten Dominik 1e48ae4259 Column view: Fix indentation problem when org-indent-mode is active
* lisp/org-colview.el (org-columns-display-here): Use overlays to
overrule line prefix properties during column view.
2010-07-22 10:43:48 +02:00
Carsten Dominik 73304c5f46 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-22 09:37:35 +02:00
Carsten Dominik 22567f5ea0 Agenda: Document the limitation of the filter preset
* lisp/org-agenda.el (org-agenda-filter-preset): Document the limitation
for the filter preset - it can only be used for an entire agenda view,
not in an individual block in a block agenda.
* doc/org.texi (Agenda commands):  Document the limitation
for the filter preset - it can only be used for an entire agenda view,
not in an individual block in a block agenda.
2010-07-22 09:11:12 +02:00
Eric Schulte 6f825152d9 ob-table: babel scripts called from tables can accept ranges
* lisp/ob-table.el (sbe): now able to accept range references from tables
2010-07-21 16:11:49 -07:00
Eric Schulte 917ad74b58 babel: accept explicit lists of colnames and/or rownames
* lisp/ob.el (org-babel-pick-name): if colnames or rownames contain a
  list of names, then use those directly

example of using this new feature would be

  #+begin_src emacs-lisp :var n=10 :colnames '("n" "fn")
    (defun fib (n)
      (if (< n 2) 1 (+ (fib (- n 1)) (fib (- n 2)))))

    (mapcar (lambda (n) (list n (fib n))) (number-sequence 0 n))
  #+end_src

  #+results:
  |  n | fn |
  |----+----|
  |  0 |  1 |
  |  1 |  1 |
  |  2 |  2 |
  |  3 |  3 |
  |  4 |  5 |
  |  5 |  8 |
  |  6 | 13 |
  |  7 | 21 |
  |  8 | 34 |
  |  9 | 55 |
  | 10 | 89 |
2010-07-21 11:19:50 -07:00
Eric Schulte 717c73cc7a improve latex listings code block name export
* lisp/org-exp.el (org-export-format-source-code-or-example): escape
  underscores in code block names on latex listings export

* lisp/org-latex.el (org-export-latex-listings-w-names): make export
  of code block names to latex optional
2010-07-21 10:39:53 -07:00
Eric Schulte c31c1d627b Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-21 09:47:08 -07:00
Eric Schulte e3429de115 ob-tangle: inhibit unwanted buffer movement on use of post-tangle-hook
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): use
  find-file-noselect to avoid excess buffer movement
2010-07-21 09:46:55 -07:00
Carsten Dominik fe684b62c6 Autoload org-id-store-link
* lisp/org-id.el (org-id-store-link): Autoload.
* lisp/org.el ("org-id"): Autoload `org-id-store-link'.
2010-07-21 18:37:34 +02:00
Carsten Dominik 682b275615 HTML export: Fix inlining images
* lisp/org-html.el (org-html-should-inline-p): Only inline images
if they should be.
2010-07-21 16:04:33 +02:00
Eric S Fraga 2c31a3b00a iCalendar export: Implement alarms
* lisp/org-icalendar.el (org-icalendar-alarm-time): New option.
* lisp/org-icalendar.el (org-print-icalendar-entries): timed events
are exported with alarm events, a.k.a. reminders
* doc/org.texi (iCalendar export): Document alarm creation.
2010-07-21 09:47:57 +02:00
Carsten Dominik e3b93cda2e Capture: Default template when no capture templates are defined
* lisp/org-capture.el (org-capture-target-buffer): Throw an error
if we have no target file.
(org-capture-select-template): Use a default template if the user has
not specified any.
2010-07-21 08:28:20 +02:00
Carsten Dominik fff87c2c9f Install Paul Rodriguez' org-velocity.el
* contrib/lisp/org-velocity.el: New file.
* contrib/README: List org-velocity.el
* lisp/org.el (org-modules): Add entry for org-velocity
2010-07-21 07:50:29 +02:00
Carsten Dominik 294527373e Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-21 04:11:21 +02:00
Eric Schulte 73d8016e8b babel: matching indexes in lob one-liners
* lisp/ob-lob.el (org-babel-lob-execute): changing indentation to
  improve line length

  (org-babel-lob-get-info): now catching indexes passed through lob
  calls

  (org-babel-lob-one-liner-regexp): now matches optional indexes into
  variable results
2010-07-20 11:40:57 -07:00
Carsten Dominik 6aa469b116 Fix bug with exporting table metalines to LaTeX/PDF
* lisp/org-exp.el (org-export-handle-table-metalines): Choose a better
position for checking protectedness.
2010-07-20 17:44:54 +02:00
Eric Schulte 08a7f6a6df fix infinite loop in csv table import
* lisp/org-table.el (org-table-convert-region): don't continue csv
importation which the point catches the end, this fixes an infinite
loop which was caused by the (point) never catching up with the
"end" marker

Hi,

I've just noticed that I get an infinite loop when importing csv tables
into Org-mode tables.  For example calling

  (org-table-convert-region (point-min) (point-max) '(4))

from inside of a simple text file containing the following

--8<---------------cut here---------------start------------->8---
1,2,3
1
2
3
5
--8<---------------cut here---------------end--------------->8---

results in an infinite loop.  The attached patch fixes this issue [1],
however it seems weird that this would just surface now, given that the
code in question has been in the repo since last fall

,----
| commit 59c9c4cdd4
| Author: Carsten Dominik <carsten.dominik@gmail.com>
| Date:   Mon Oct 26 12:31:16 2009 +0100
|
|     Correctly interpret CVS tables with quoted fields
|
|     The csv parser was very primitive, ignoring quoted fields.  This is
|     now fixed.
`----

Has anyone else noticed this problem? Should I go ahead and apply this
patch?

Best -- Eric

Footnotes:
[1]

>From 3c3f4ca9a34dca23051ca2f4e4518b416338d4f4 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Mon, 19 Jul 2010 13:45:25 -0700
Subject: [PATCH] org-table: fix infinite loop in table importation

* lisp/org-table.el (org-table-convert-region): don't continue csv
  importation which the point catches the end, this fixes an infinite
  loop which was caused by the (point) never catching up with the
  "end" marker
2010-07-20 09:28:22 +02:00
Carsten Dominik cee04fa632 Make org-capture use `org-default-notes-file' if the file is not specified
* lisp/org-macs.el (org-string-nw-p): New function.
* lisp/org-capture.el (org-capture-import-remember-templates): Interpret
an empty string as request to use `org-default-notes-file'.
(org-capture-target-buffer): If the FILE is not a (non-empty) string,
use `org-default-notes-file'.
2010-07-20 09:05:31 +02:00
Carsten Dominik 347c8ebe34 Fix customize type for capture template function
* lisp/org-capture.el (org-capture-templates): Fix customize type
2010-07-19 14:42:06 +02:00
Carsten Dominik 899e89518b Estimate ranges in column view
* lisp/org-colview-xemacs.el (org-columns-compile-map):
(org-columns-number-to-string):
(org-columns-string-to-number): Handle estimate ranges.
(org-estimate-mean-and-var):  New function.
(org-estimate-combine):  New function.
(org-estimate-print):  New function.
(org-string-to-estimate): New function.
2010-07-19 13:56:17 +02:00
Michael Gauland 55ea8ca071 Estimate ranges in column view
Carsten,
Here is a patch for a new 'est+' summary type, including corresponding changes for xemacs and the manual. I've done basic testing on the GNU emacs version, but not the xemacs code.

I'm not sure the change to the manual provides the right amount of information
in the right place; I'd be happy to re-write to make it find in
better. Similarly, the name of the summary type is entirely up to you.

I didn't know whether to send this directly to you, or to the list; if it should go to the list I'd be happy to send it there directly.

Thanks for the chance to contribute,
Mike
2010-07-19 13:35:49 +02:00
Carsten Dominik d1347d01a6 Remove the various ChangeLog files
We are no longer using them - when a ChangeLog is need, we generate it
from the git history.
2010-07-19 12:59:30 +02:00