Commit Graph

523 Commits

Author SHA1 Message Date
Carsten Dominik 67e34d7eae Allow special blocks to start with white space before the \begin{}
* contrib/lisp/org-special-blocks.el (org-special-blocks-make-special-cookies):
Allow white space at beginning of line.
2010-08-16 13:59:24 +02:00
Carsten Dominik 2f9d095617 org-depend: Fix blocking logic
* contrib/lisp/org-depend.el (org-depend-block-todo): Fix blocking logic.

Paul Sexton writes:

> The value returned by org-depend-block-todo determines whether an item
> is considered "blocked", and thus whether it is shown dimmed (because
> this function is added to org-blocker-hook).
>
> o-d-b-t only returns true in a very limited set of conditions, so very
> often items which should show up as blocked, do not. To be honest I
> don't remember the exact details, but it did not work before I applied
> the patch, and has worked correctly ever since.
2010-08-11 11:16:11 +02:00
Ivanov Dmitry b36cf7a437 org-collector: better comments and more robust conversion of string to elisp
* contrib/lisp/org-collector.el (org-read-prop): added a more detailed
  comment, changed 2 if stements to 1 cond to make the code more
  comprehensible, added
    (condition-case nil
            (read prop)
            (error prop))
  instead of
    (read prop)
  so, if any error occurs during the conversion of prop to lisp
  expression - a string will be returned.
2010-08-10 09:22:24 -06:00
Eric Schulte 25ac9ea8dd library-of-babel: more control over exporting results to files
#+source: table
  #+begin_src emacs-lisp
    (mapcar
     (lambda (el) (number-sequence el (+ el 3)))
     (number-sequence 0 4))
  #+end_src

  writes the results out as csv file
  #+call: write(data=table, file="~/Desktop/example.csv") :results silent

  writes the results out as tab separated file
  #+call: write(data=table, file="~/Desktop/example.tsv") :results silent

  write the results out as a normal org-mode file
  #+call: write(data=table, file="~/Desktop/example.org") :results silent

* contrib/babel/library-of-babel.org: more control over exporting
  results to files
2010-08-08 22:23:53 -06: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
Eric Schulte 9c1c4b3f8d org-mime: fixed major error -- was exporting entire as text/plain mime part
Thanks to Ethan Ligon for pointing this out

* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): fixed major
  error -- was exporting entire as text/plain mime part, now when
  region is active, only that region is exported
2010-07-30 15:08:27 -06:00
Eric Schulte 6b5cf346ae org-collector: don't include tags in collected headlines
Thanks to d.tchin for bringing this issue to light

* contrib/lisp/org-collector.el (org-propview-collect): don't include
  tags in collected headlines
2010-07-23 09:36:17 -07: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
Eric Schulte 15ca30bc86 library-of-babel: improving reading text/tables in from files
* contrib/babel/library-of-babel.org(read): adding explicit format
  argument

  (gdoc-read): explicit format argument, and passing the csv
  specification through to org-table-import

  also removing org example code blocks
2010-07-20 11:49:55 -07:00
Eric Schulte d6208a7fe5 library-of-babel: more flexible reading of files into elisp 2010-07-19 17:13:53 -07:00
Eric Schulte a618566cd6 library of babel: support for reading/writing to/from Google docs 2010-07-19 17:12:53 -07: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
Carsten Dominik 4f26d13f52 org-mac-link-grabber.el: Add Firefox/vimperator 2010-07-06 14:00:09 +02:00
Stephen Eglen b06e81a099 2010-07-01 Stephen Eglen <stephen@gnu.org>
* contrib/README: Update list of emacs-lisp files so that list is in
sync with the files in lisp/ and in same order as 'ls -1' for
those files.
2010-07-01 13:49:41 +02:00
David Maus f98bb728aa resubmitted patch to contrib/lisp/org-mac-link-grabber.el
Anthony Lander wrote:
>[1  <text/plain; US-ASCII (7bit)>]
>This patch fixes an issue with opening AddressBook.app and
>Together.app links.

This is just a reply with the patch attached in a way the
patchtracker[1] will catch it.

  -- David

[1] http://patchwork.newartisans.com/project/org-mode/list/
2010-07-01 06:29:17 +02:00
Eric Schulte e0f0e26a43 library-of-babel: adding a booktabs latex exporting function 2010-06-30 11:53:10 -07:00
Eric Schulte 96961abd3b library-of-babel: back to a single function per table environment 2010-06-28 13:23:48 -07:00
Eric Schulte 5461d3e605 library-of-babel: adding function for LaTeX Table export
* contrib/babel/library-of-babel.org (Write): support for LaTeX table export
2010-06-28 10:08:52 -07:00
Eric Schulte 517837b3a1 library of babel: added json function for accessing local or remote json objects
A quick example of accessing remote json data from Babel code blocks.

  Evaluate the following to see a listing of parks in DC by ward.

  #+source: dc-parks
  #+begin_src emacs-lisp :var keys='(ward address) :var data=json(url="http://ogdi.cloudapp.net/v1/dc/RecreationParks?format=json")
    (append
     (list keys 'hline)
     (mapcar
      (lambda (lis) (mapcar (lambda (key) (cdr (assoc key lis))) keys))
      (cdr (car data))))
  #+end_src
2010-06-27 16:07:29 -07:00
Eric Schulte ec8edda165 babel: ob-oz is now up to date with the new naming schema
* contrib/babel/langs/ob-oz.el (ob-oz): brought ob-oz up to date with
  new naming schema
2010-06-23 16:40:48 -07:00
Eric Schulte 3429a496a3 merged with master 2010-06-22 11:55:19 -07:00
Carsten Dominik 80531d8d71 * contrib/lisp/org-special-blocks.el
(org-special-blocks-convert-latex-special-cookies): Allow arguments to
TeX macros
2010-06-22 14:51:48 +02:00
Eric Schulte 97ead27f78 babel: remove all language file reference to define language variables 2010-06-17 18:15:35 -07:00
Eric Schulte 93f6360793 removing contrib/babel/org-babel-install.el -- no longer required 2010-06-17 18:15:32 -07:00
Eric Schulte e0e4d76094 renaming all org-babel* function to ob* to conform with Emacs conventions 2010-06-17 18:15:32 -07:00
Eric Schulte 04152d3a06 moving org-babel into the main org-mode lisp directory
we are keeping two things in the contrib directory

  1) the library-of-babel.org file, this is with the goal of lowering
     the barrier of entry for contribution of functions to the library
     of babel

  2) we are also keeping a langs directory in the contrib directory
     because some language files do not have FSF copyright assignment
     -- current org-babel-oz.el is the only such file
2010-06-17 18:15:32 -07:00
Eric Schulte 4096c92e89 babel: don't remove protected items on exported block cleanup
* contrib/babel/lisp/org-babel-exp.el (org-exp-res/src-name-cleanup):
  don't remove protected items on exported block cleanup
2010-06-16 21:01:13 -07:00
Eric Schulte 512ad1e30d babel: org-babel-R is better about trimming preceding and trailing newlines
* contrib/babel/lisp/langs/org-babel-R.el (org-babel-R-evaluate):
  trimming preceding and trailing newlines of output results
2010-06-16 10:42:08 -07:00
Eric Schulte d45826943a babel: cleanup trailing newline after removed #+source and #+results lines
* contrib/babel/lisp/org-babel-exp.el (org-exp-res/src-name-cleanup):
  cleanup trailing newline after removed #+source and #+results lines
2010-06-16 10:16:22 -07:00
Eric Schulte becfc8979e babel: now using re-search-forward to find the end of source blocks
* contrib/babel/lisp/org-babel.el (org-babel-result-end): replacing
  search-forward with re-search-forward when finding the end of result
  blocks
2010-06-15 18:20:29 -07:00
Eric Schulte 689b51224f babel: make sure that source-code blocks don't consume their neighbors
* contrib/babel/lisp/org-babel.el (org-babel-where-is-src-block-result):
  on result insertion, ensure that code blocks don't overrun
  subsequent lines or source blocks
2010-06-15 16:36:07 -07:00
Eric Schulte b7e50cdc3d babel: cleaning up leftovers from block exportation
* contrib/babel/lisp/org-babel-exp.el (org-export-blocks-postblock-hook):
  adding function to cleanup leftovers after block exportation

  (org-exp-res/src-name-cleanup): function to cleanup leftovers from
  block exportation
2010-06-15 16:21:22 -07:00
Eric Schulte 74d337ef23 babel: fixed latex packages in org-babel-latex -- Thanks to William Henney
* contrib/babel/lisp/langs/org-babel-latex.el (org-babel-latex-body-to-tex-file):
  now calling `org-export-latex-fix-inputenc' to sort out encodings in
  latex package list
2010-06-14 14:45:33 -07:00
Eric Schulte 08d8331307 babel: fixed bug resulting from two inline src blocks on the same line
* contrib/babel/lisp/org-babel.el (org-babel-set-interpreters): less
  greedy regexp for inline source blocks ensures that there is no
  confusion when two inline blocks are on the same line.
2010-06-14 13:50:10 -07:00
Eric Schulte 18be132545 babel: adding buffer-wide header arguments behind #+BABEL:
e.g. placing the following at the top of your buffer

will result in all source-code blocks in the buffer having their
:session header argument set to "example"

* contrib/babel/lisp/org-babel-lob.el (org-babel-lob-execute): now
  included buffer-wide header arguments in lob header arguments

* contrib/babel/lisp/org-babel.el (org-babel-params-from-buffer): new
  function for grabbing header arguments from the top of the buffer

  (org-babel-parse-src-block-match): now includes buffer-wide header
  arguments

  (org-babel-parse-inline-src-block-match): now includes buffer-wide
  header arguments

  (org-babel-current-buffer-properties): buffer-local variable to hold
  buffer-wide header arguments
2010-06-14 12:15:11 -07:00
Eric Schulte 1da53c668a babel: bug fix in exporter wrt: contents of lob info lists
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-lob-one-liners):
  exportation of #+lob and #+call type lines is now correctly handling
  the addition of the indentation information to the info list
2010-06-11 10:16:56 -07:00
Eric Schulte a5712e4b0a babel: can open results which don't start on the first column
* contrib/babel/lisp/org-babel.el (org-babel-open-src-block-result):
  now able to handle results which don't start on the first column
2010-06-11 08:07:19 -07:00
Eric Schulte cc1c446791 babel: ensure positional invariance of the `info' list
* contrib/babel/lisp/org-babel.el (org-babel-get-src-block-info):
  ensure that info always has the same number of arguments in the same
  order
2010-06-10 21:36:57 -07:00
Eric Schulte 9311325030 babel: all org-babel elements should now work when indented
* contrib/babel/lisp/org-babel-lob.el
  (org-babel-lob-one-liner-regexp):
  (org-babel-lob-get-info):
  (org-babel-lob-execute):
  all org-babel elements should now work when indented

* contrib/babel/lisp/org-babel-ref.el
  (org-babel-ref-at-ref-p):
  all org-babel elements should now work when indented

* contrib/babel/lisp/org-babel.el
  (org-babel-set-interpreters):
  (org-babel-execute-src-block):
  (org-babel-expand-src-block):
  (org-babel-get-src-block-info):
  (org-babel-hash-at-point):
  (org-mode-hook):
  (org-babel-parse-src-block-match):
  (org-babel-where-is-src-block-result):
  (org-babel-read-result):
  (org-babel-insert-result):
  (org-babel-result-end):
  all org-babel elements should now work when indented
2010-06-10 14:36:08 -07:00
Eric Schulte a9c4439d5a babel: removed debug line
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-src-blocks):
  removed debug line
2010-06-10 10:16:45 -07:00
Eric Schulte 8021cf9288 babel: undo two troubling unintended tab insertions in previous commit
* contrib/babel/lisp/org-babel.el (org-babel-execute-src-block):
  undo to troubling unintentional tab insertions from the previous
  commit
2010-06-10 10:04:12 -07:00
Eric Schulte 0e9e01c3fd babel: results now indented to the level of the #+results: line
Thanks to Sébastien Vauban for pointing this out -- as well as the
  previous babel commit :)

* contrib/babel/lisp/org-babel.el (org-babel-insert-result):
  results are now indented to the level of any existing #+results
  line.
2010-06-10 10:02:07 -07:00
Eric Schulte 9a3e9ad865 babel: can now find table and result lines which don't start on column 0
* contrib/babel/lisp/org-babel-ref.el (org-babel-ref-resolve-reference):
  now able to recognize #+tblname, #+resname and #+results lines which
  do not start on column 0
2010-06-10 09:45:06 -07:00
Eric Schulte 799c15ffaf babel: adding simple "echo" function to library-of-babel 2010-06-09 21:03:21 -07:00
Eric Schulte 4fb9fa323e babel: fixed bug dealing with ignoring quoted inline code blocks
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-inline-src-blocks):
  fixed bug dealing with ignoring quoted inline code blocks
2010-06-08 16:27:44 -07:00
Eric Schulte 5068f4a5cf babel: don't evaluate inline code located in verbatim or quoted environments
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-inline-src-blocks):
  only evaluate inline source code blocks if they do not appear in a
  verbatim or quoted context

  (org-babel-in-example-or-verbatim): check if the point is currently
  located in a verbatim or quoted context
2010-06-08 16:19:54 -07:00
Eric Schulte 7361f79d4c babel: no longer automatically inserting '='s around inline code results
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-results):
  removing forced verbatim '=' tags from around inline source code
  results, if users want their results displayed in this way they can
  add the '='s easily themselves, but there is no way to remove '='s
  inserted automatically by Org-babel.
2010-06-08 16:06:32 -07:00
Eric Schulte ae234f787b babel: noweb references are now expanded in the pre-export buffer
this is required because in the temporary org-mode file used during
  export code blocks may be removed entirely leading to unresolved
  references

* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-src-blocks):
  expanding noweb references during export now takes place in the
  pre-export buffer

  (org-babel-exp-inline-src-blocks): expanding noweb references during
  export now takes place in the pre-export buffer

  (org-babel-exp-results): ensure that the expanded body is passed
  through to org-babel-execute-src-block
2010-06-08 14:40:50 -07:00
Eric Schulte efbb07fe12 babel: number checking no longer fooled by strings ending in newlines
* contrib/babel/lisp/org-babel.el (org-babel-number-p): number
  checking is no longer fooled by strings ending in single newlines
2010-06-07 17:59:58 -07:00
Eric Schulte ef931fcd3a babel: resolving references outside of the visible portion of narrowed buffers
Thanks to Tom Dye for pointing out the need for this fix

* contrib/babel/lisp/org-babel.el (org-babel-expand-noweb-references):
  now able to find noweb references even outside of the narrowed
  portion of the buffer when the buffer is narrowed

* contrib/babel/lisp/org-babel-ref.el (org-babel-ref-resolve-reference):
  now able to resolve references which are located outside of the
  narrowed portion of the buffer when the buffer is narrowed
2010-06-07 17:38:35 -07:00