Commit graph

5022 commits

Author SHA1 Message Date
Eric Schulte fa59060617 Revert "Globally replace buffer-substring-filters with filter-buffer-substring-functions."
This reverts commit 66e8a4b09a.
2011-06-16 10:29:24 -07:00
Carsten Dominik 12d51dad7b Use a new function to mark anniversaries in Org diary files
* lisp/org-agenda.el (org-agenda-add-entry-to-org-agenda-diary-file):
Use stable internal `org-anniversary' instead of diary-anniversary.
(org-class): New function.
(org-diary-class): Use `org-class'.
(org-anniversary, org-cyclic, org-date, org-block): New functions.

This patch provides stable alternatives for a number of diary
functions to be used in diary sexp entries. The corresponding diary-*
functions swap around their input arguments depending on
`calendar-date-style', which is unstable and evil.  The functions
provided here have a fixed order of arguments, the ISO order: year
month day.

Also, the `i a' key in the agenda now uses `org-anniversary' instead of
diary-anniversary.
2011-06-16 14:34:07 +02:00
Eric Schulte 01ebf445aa ob: adding noweb-ref to the list of header argument names
* lisp/ob.el (org-babel-header-arg-names): Adding noweb-ref to the
  list of header argument names.
2011-06-15 21:49:55 -07:00
Eric Schulte 8c37281cb6 ob-tangle: continued code blocks now implemented with the :noweb-ref header arg
Now *all* code blocks which either are named `ref-name' or have the
  :noweb-ref header argument value `ref-name' will have their bodies
  concatenated when resolving the noweb reference <<ref-name>>.

* lisp/ob.el (org-babel-expand-noweb-references): Concatenating all
  bodies with the appropriate name or :noweb-ref header argument.
2011-06-15 21:14:03 -07:00
Eric Schulte 23e7adbdaa Revert "ob-tangle: initial implementation of named code block combination"
This reverts commit 0e4f9da82e.
2011-06-15 20:18:33 -07:00
Eric Schulte e001901234 revert "ob-tangle: more sophisticated block combination during tangling" 2011-06-15 20:18:22 -07:00
Eric Schulte 39cd07aacf Revert "ob-tangle: no longer inserting newlines between appended code blocks"
This reverts commit 90f6765cdf.
2011-06-15 20:14:31 -07:00
Carsten Dominik faccb8d58c Make S-up/down/left/right in indented clocktable BEGIN lines
* lisp/org.el (org-find-dblock):
(org-clocktable-try-shift): Make regexp work also when #+begin
line is indentex.

Achim Gratz writes:

It wasn't possible to use S-up/down/left/right on the clocktable BEGIN
line when the whole table was indented.  Interestingly enough calling
the function directly would work, it turned out to be a regexp in org.el
that was still pinned to bol.  There was a second one further down that
is used to recognize dynamic blocks that got the same treatment.

TINYCHANGE
2011-06-15 08:55:09 +02:00
Eric Schulte 978cdf276d Babel: code block may have empty bodies, now passing all tests
* lisp/ob.el (org-babel-src-block-regexp): Babel: code block may have
  empty bodies.
* testing/lisp/test-ob-tangle.el
  (ob-tangle/no-excessive-id-insertion-on-tangle): Updated the ID.
* testing/lisp/test-ob.el (test-org-babel/src-block-regexp): Cleaned
  up the test.
  (test-org-babel/default-header-args): Removed trivial test.
  (test-org-babel/get-header): Indentation.
  (test-org-babel/sha1-hash): Updated Hash for new sorting schema.
2011-06-14 13:41:32 -07:00
Eric Schulte c83cfcc243 trick the compiler
* lisp/org-macs.el (org-without-partial-completion): Avoid calling by
  name a function unknown to the compiler but explicitly checked by
  program logic.
2011-06-14 13:06:03 -07:00
Eric Schulte a034526448 more small compiler errors
* lisp/org-mouse.el (org-agenda-earlier): Declaring previously unknown
  function.
  (org-agenda-later): Declaring previously unknown function.
  (org-agenda-mode-map): Declaring previously unknown variable.
* lisp/org.el (org-read-date-analyze): Explicitly ignore the return
  value of a function.
2011-06-14 12:51:13 -07:00
Eric Schulte 66e8a4b09a Globally replace buffer-substring-filters with filter-buffer-substring-functions.
* lisp/org-agenda.el (org-agenda-mode): Globally replace
  buffer-substring-filters with filter-buffer-substring-functions.
* lisp/org-indent.el (org-indent-mode): Globally replace
  buffer-substring-filters with filter-buffer-substring-functions.
2011-06-14 12:45:19 -07:00
Eric Schulte 94b325839c Replacing '(λ...) with #'(λ...).
* lisp/org-ascii.el (org-export-as-ascii): Replacing '(λ...) with #'(λ...).
* lisp/org-attach.el: Replacing '(λ...) with #'(λ...).
  (org-attach-commit): Replacing '(λ...) with #'(λ...).
* lisp/org-exp.el: Replacing '(λ...) with #'(λ...).
  (org-export-handle-include-files): Replacing '(λ...) with #'(λ...).
* lisp/org-html.el: Replacing '(λ...) with #'(λ...).
  (org-export-as-html): Replacing '(λ...) with #'(λ...).
* lisp/org-mouse.el: Replacing '(λ...) with #'(λ...).
  (org-mouse-popup-global-menu): Replacing '(λ...) with
  (org-mode-hook): Replacing '(λ...) with #'(λ...).
  (org-agenda-mode-hook): Replacing '(λ...) with #'(λ...).
* #'(λ...).Replacing '(λ...) with #'(λ...).
  (org-mouse-context-menu): Replacing '(λ...) with #'(λ...).
* lisp/org-src.el: Replacing '(λ...) with #'(λ...).
  (org-src-mode-configure-edit-buffer): Replacing '(λ...) with #'(λ...).
* lisp/org-table.el: Replacing '(λ...) with #'(λ...).
  (org-table-fix-formulas-confirm): Replacing '(λ...) with #'(λ...).
* lisp/org.el: Replacing '(λ...) with #'(λ...).
  (org-confirm-shell-link-function): Replacing '(λ...) with
  (org-category): Replacing '(λ...) with #'(λ...).
* #'(λ...).Replacing '(λ...) with #'(λ...).
  (org-time-stamp-rounding-minutes): Replacing '(λ...) with #'(λ...).
2011-06-14 12:01:04 -07:00
Eric Schulte f8abb11eff Declaring functions used by `org-open-file'
* lisp/org.el (mailcap-parse-mailcaps): Declaring functions used by
  `org-open-file'.
  (mailcap-extension-to-mime): Declaring functions used by
  `org-open-file'.
  (mailcap-mime-info): Declaring functions used by `org-open-file'.
2011-06-14 11:58:00 -07:00
Eric Schulte 4f084e1467 replacing calls to now-defunct function `interactive-p'
* lisp/org-agenda.el (org-agenda-redo): Replacing call to now-defunct
  function `interactive-p'.
  (org-agenda-show-1): Replacing call to now-defunct function
  `interactive-p'.
  (org-agenda-set-tags): Replacing call to now-defunct function `interactive-p'.
* lisp/org-ascii.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-latin1): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-latin1-to-buffer): Replacing call to now-defunct
  function `interactive-p'.
  (org-export-as-utf8): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-as-utf8-to-buffer): Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-ascii): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-docbook.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-docbook): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-html.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-html): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-latex.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-export-region-as-latex): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-macs.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-called-interactively-p): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-table.el: Replacing call to now-defunct function
  `interactive-p'.
  (org-table-blank-field): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-current-column): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function
  `interactive-p'.
  (org-table-current-dline): Replacing call to now-defunct function
  `interactive-p'.Replacing call to now-defunct function
  `interactive-p'.
  (org-table-sort-lines): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-sum): Replacing call to now-defunct function
  `interactive-p'.
  (org-table-rotate-recalc-marks): Replacing call to now-defunct
  function `interactive-p'.
  (org-table-eval-formula): Replacing call to now-defunct function
  `interactive-p'.
  (orgtbl-send-table): Replacing call to now-defunct function `interactive-p'.
* lisp/org.el: Replacing call to now-defunct function `interactive-p'.
  (org-mode): Replacing call to now-defunct function `interactive-p'.
  (org-copy-subtree): Replacing call to now-defunct function
  `interactive-p'.
  (org-paste-subtree): Replacing call to now-defunct function
  `interactive-p'.
  (org-store-link): Replacing call to now-defunct function
  `interactive-p'.
  (org-todo): Replacing call to now-defunct function `interactive-p'.
  (org-occur): Replacing call to now-defunct function `interactive-p'.
2011-06-14 11:37:59 -07:00
Eric Schulte 95f9aa5ff5 fixing compiler warnings for Babel functions
* lisp/ob-R.el (ess-local-process-name): This variable wasn't known to
  be defined.
* lisp/ob-lisp.el (org-babel-lisp-dir-fmt): This defcustom now has a
  group specified.
* lisp/ob-tangle.el (org-bracket-link-regexp): This variable wasn't
  known to be defined.
  (org-babel-tangle-combine-named-blocks): Roll my own version of a
  forbidden common lisp function.
* lisp/ob.el (org-babel-sha1-hash): Using a non-deprecated version of
  called-interactively.
2011-06-14 11:23:56 -07:00
Eric Schulte 2601678dc0 replacing the "multicolumn" option for latex tables
This brings the behavior inline with the documentation.

* lisp/org-latex.el (org-export-latex-tables): Check for the
  "multiline" option and set the `floatp' option to true when
  multicolumn tables are requested.
2011-06-14 09:28:38 -07:00
Carsten Dominik 9108d3f0ee Merge branch 'master' of orgmode.org:org-mode 2011-06-14 14:56:07 +02:00
Carsten Dominik 1891ee5aaf Fix HTML export to make CUSTOM_ID links work again
* lisp/org-html.el (org-export-as-html):
(org-html-level-start): Only convert section number underscores to dashes.
2011-06-14 10:46:09 +02:00
Carsten Dominik 36dd7e2150 Fix bulk scattering command
* lisp/org-agenda.el (org-agenda-bulk-action): Fix bug caused by
`days-to-time, converting relative to 1 BC, while the code assumed it
would return a time relative to 1970.

For more information, see

http://thread.gmane.org/gmane.emacs.orgmode/42531
2011-06-14 10:39:58 +02:00
Eric Schulte 90f6765cdf ob-tangle: no longer inserting newlines between appended code blocks
* lisp/ob-tangle.el (org-babel-tangle-combine-named-blocks): No longer
  inserting newlines between appended code blocks.
2011-06-13 14:58:56 -07:00
Eric Schulte f1c0042967 removing two currently unused export variables
* lisp/ob-exp.el: We may no longer need to export names along with
  code blocks.
2011-06-13 14:58:19 -07:00
Eric Schulte f089a9e914 Merge branch 'master' of orgmode.org:org-mode 2011-06-13 14:06:09 -07:00
Eric Schulte 5d7e0b79c9 org-exp-blocks: Ensure balanced nested begin/end blocks in block bodies.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Ensure
  balanced nested begin/end blocks in block bodies.
2011-06-13 14:05:59 -07:00
Dan Davison 3ed5915f01 Automatically use pdflatex -shell-escape for minted export
Patch by Bastien

* lisp/org-latex.el: Add -shell-escape to pdflatex commands
2011-06-11 13:40:14 -07:00
Eric Schulte 64c1304473 ob-tangle: more sophisticated block combination during tangling
Thanks to Neeum Zawan for suggesting this behavior

* lisp/ob-tangle.el (org-babel-tangle-named-block-combination): Block
  combination can now take a number of values.
  (org-babel-tangle-combine-named-blocks): More sophisticated block
  combination behavior.
2011-06-10 12:55:13 -06:00
Eric Schulte 0e4f9da82e ob-tangle: initial implementation of named code block combination
* lisp/ob-tangle.el (org-babel-tangle-do-combine-named-blocks):
  Switch to turn on the combination of code blocks of the same name.
  (org-babel-tangle-combine-named-blocks): Combine blocks of the same
  name.
2011-06-10 12:29:10 -06:00
Eric Schulte 3f90f26336 ob-ruby: xmpfilter result type for outputting annotated source code
Thanks to Avdi Grimm for suggesting this addition

* lisp/ob-ruby.el (xmp): Declaring this function to appease the
  compiler.
  (org-babel-execute:ruby): "xmp" result option for outputting
  annotated source code.
2011-06-10 10:49:04 -06:00
Nicolas Goaziou 889a487ae4 org-list: fix item's start number in LaTeX exporter
* lisp/org-list.el (org-list-to-latex): the enumerate environment in
latex increments the counter before using it. Therefore, org-mode
should set the enumeration counter to the desired value minus one.

Patch from Darlan Cavalcante Moreira
TINYCHANGE
2011-06-10 15:50:51 +02:00
Niels Giesen 1de29a0059 Fix reported file time for clock reports
Fix the format specification for clock tables.

Niels writes:

Bernt was right in that there were more arguments to format than the
format string specified. I guess I must not have noticed that there was
a call to format (all the other times properties columns are 'maybe
inserted' go directly to `insert-before-markers'), and I must have
forgotten to test the multifile case (I never used multifile clock
reports myself).

However, to keep the layout of the table consistent the *File time*
cells should be in the Headline column. Attached patch fixes this by
putting the (empty) properties cells *before* the *File time* cell.
2011-06-10 13:56:02 +02:00
Michael Brand 374b70a383 Bugfix for heading levels when toggling from list
* org.el (org-toggle-heading): More comments and fix number of stars
when toggling from list items.

TINYCHANGE
2011-06-09 21:11:20 +02:00
Christian Egli e6f90729a0 Taskjuggler: support the new effort durations
* lisp/org-taskjuggler.el (org-taskjuggler-clean-effort): handle any
effort that is accepted by `org-duration-string-to-minutes´.
* doc/org.texi (TaskJuggler export): Modified the example to reflect
the new effort durations.

The Effort property previously had no unit attached. With release 7.5
of orgmode you can now attach units to it such as 4h, 2d or 2m. This
patch enhances the exporter to accept the same effort specifications.

Note: This change is NOT BACKWARDS COMPATIBLE. Where the exporter
previously assumed a plain number was meant to be days, it now assumes
it to mean minutes. You will have to change existing effort
specifications from e.g. '2' to '2d'. A simple M-x
query-replace-regexp should do.
2011-06-08 17:03:23 +02:00
Nicolas Goaziou 51946c36d7 Keep byte-compiler happy 2011-06-06 20:46:31 +02:00
Julien Barnier c227da352a Fix sh block execution in session
Hi,

When evaluating shell code blocks in org-babel, the execution seems to hang
indefinitely. The following patch is trying to fix this problem by modifying
the way shell code is send to comint and the way the end-of-evaluation
indicator is looking for.

As I am far from an emacs lisp expert and as the patch modifies the widely use
org-babel-comint-with-output function, it certainly needs some testing. I've
made some tests with shell and R code blocks, but I'm not sure it's enough.

Thanks !

Julien

Fix sh block execution in a session

* lisp/ob-sh.el (org-babel-sh-evaluate) : when sending input to comint, wait
until previous line execution is finished
* lisp/ob-comint.el (org-babel-comint-with-output) : when looking for
end-of-evaluation indicator, search forward for the indicator before searching
forward for the prompt
2011-06-06 07:17:18 -06:00
Carsten Dominik 648affcbd4 Fix HTML entity for degree
* lisp/org-entities.el (org-entities): Fix HTML entity for degree.

Patch by Ult Stegemann.
2011-06-06 09:24:21 +02:00
Nicolas Goaziou ddeab1a8af Changes automatically made to cookies shouldn't move tags
* lisp/org.el (org-auto-align-tags): change docstring.
(org-update-parent-todo-statistics): keep tags aligned even when
statistics cookies are shifting them.
* lisp/org-list.el (org-update-checkbox-count): keep tags aligned even
when statistics cookies are shifting them.
2011-06-05 18:55:25 +02:00
Lawrence Mitchell cfb05268f4 lisp/ob.el: Don't modify babel info when hashing it
* lisp/ob.el (org-babel-sha1-hash): Don't modify info argument by
side-effect when sorting result-params list.

copy-sequence only does shallow copies, so if we're going to modify a
sub-list, we need to make sure we copy it first.
2011-06-03 07:04:02 -06:00
Lawrence Mitchell 3f61432898 lisp/ob.el: Fix org-babel-result-regexp to match users
* lisp/ob.el (org-babel-result-regexp): Use non-shy group around
org-babel-data-names.

By default regexp-opt returns a shy group around its arguments.  But
users of org-babel-result-regexp expect the third match-string to
contain the hash.  With a shy group, the second match-string contains
the hash.
2011-06-02 12:07:21 -06:00
Carsten Dominik cf708c72e5 Merge branch 'master' of orgmode.org:org-mode 2011-06-02 19:48:57 +02:00
Carsten Dominik 0db8830733 Fix issue with truncate-lines and visual-line-mode
* lisp/org.el (org-insert-link): Set truncate-line in the *Org Link* buffer
and make sure that it really is set there.

See http://thread.gmane.org/gmane.emacs.orgmode/42447
2011-06-02 19:48:36 +02:00
Eric Schulte fbfc2d1835 ob-lisp: more general handling of the default-directory value in lisp code
Once again, thanks to Mark Cox for raising these issues.

* lisp/ob-lisp.el (org-babel-lisp-dir-fmt): Defcustom for use in
  changing how/if the current directory is represented to lisp code.
  (org-babel-execute:lisp): More general handling of the default
  directory value.
2011-06-01 18:52:33 -06:00
Eric Schulte af677f6d06 Merge branch 'master' of orgmode.org:org-mode 2011-06-01 06:46:50 -06:00
Eric Schulte 459cbd4fd8 ob-lisp: setting *default-pathname-defaults* to the directory of the Org-mode file
Thanks to Mark Cox for suggesting this change.

* lisp/ob-lisp.el (org-babel-execute:lisp): Setting the value of
  *default-pathname-defaults* to either the value of the :dir header
  argument or the directory of the containing Org-mode file.
2011-06-01 06:41:08 -06:00
Eric Schulte cbd4a5b764 ob-lisp: re-arrange order of function nesting in lisp execution function
* lisp/ob-lisp.el (org-babel-execute:lisp): No real functional change,
  just aesthetic.
2011-06-01 06:32:10 -06:00
Carsten Dominik 32ac8dd0e5 More fixes to priority setting.
Patch by Michael Brand
2011-06-01 14:25:03 +02:00
Sébastien Delafond 1afcef3007 Do not run flyspell-checks on {todo,all-time,additional-option-like}-keywords
* org.el (org-mode-flyspell-verify): This is useful when using
  flyspell with a non-English dictionary, or if some of your
  keywords are in another language.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-06-01 13:51:31 +02:00
Carsten Dominik e05aa5552d Merge branch 'master' of orgmode.org:org-mode 2011-06-01 09:09:26 +02:00
David Maus e47fcaae35 Provide compatibility function for `activate-mark'
* org-exp.el (org-export): Use new compatibility function
  `org-activate-mark'.
* org-compat.el (org-activate-mark): New function. Provide
  `activate-mark' if not present (e.g. Emacs22).

Emacs 22 misses this function. Defun copied from Emac23's
`active-mark' but removed reference to customization variable
`select-active-regions' which is not present in Emacs22.
2011-06-01 09:05:24 +02:00
David Maus 48d970a916 Declare variable to keep byte compiler happy
* org-table.el (org-table-follow-field-mode): Declare variable to keep
  byte compiler happy.
2011-06-01 08:41:20 +02:00
David Maus da93c5d3f1 Declare function, silence byte compiler
* org-footnote.el (org-id-uuid): Declare function, silence byte
  compiler.
2011-06-01 08:30:52 +02:00
David Maus e144f53c9a Don't use equalp at run-time, compare downcased strings
* org-bibtex.el (org-bibtex-headline): Don't use equalp at run-time,
compare downcased strings.

Compiler complains about using `equalp' because other than for example
`concatenate' it is not declared 'inline.

Cf. [[info:cl#Declarations]] about the 'inline declaration

...
`inline'
     The `inline' DECL-SPEC lists one or more functions whose bodies
     should be expanded "in-line" into calling functions whenever the
     compiler is able to arrange for it.  For example, the Common Lisp
     function `cadr' is declared `inline' by this package so that the
     form `(cadr X)' will expand directly into `(car (cdr X))' when it
     is called in user functions, for a savings of one (relatively
     expensive) function call.

     The following declarations are all equivalent.  Note that the
     `defsubst' form is a convenient way to define a function and
     declare it inline all at once.

          (declaim (inline foo bar))
          (eval-when (compile load eval) (proclaim '(inline foo bar)))
          (defsubst foo (...) ...)       ; instead of defun

     *Please note:*  this declaration remains in effect after the
     containing source file is done.  It is correct to use it to
     request that a function you have defined should be inlined, but it
     is impolite to use it to request inlining of an external function.

     In Common Lisp, it is possible to use `(declare (inline ...))'
     before a particular call to a function to cause just that call to
     be inlined; the current byte compilers provide no way to implement
     this, so `(declare (inline ...))' is currently ignored by this
     package.
...

Thus other than `concatenate' `equalp' is stored as a function call at
run-time.
2011-06-01 08:30:52 +02:00
David Maus 9da7485a7b Declare variable to silence byte compiler
* org-bibtex.el (org-id-locations): Declare variable to silence byte
  compiler.
2011-06-01 08:30:52 +02:00
David Maus e33ba24640 Remove reference to non-existent configuration option
* org-id.el (org-id-locations): Fix docstring, remove reference to
  non-existent option.

The configuration option `org-id-use-hash' does not exist. Git bisect
and grepping for 'org-id-use-hash' showed that this string never ever
occured more than once, hence it was never there..
2011-06-01 08:30:52 +02:00
David Maus 00040e708c Use delete-char' instead of delete-backward-char'
* org.el (org-self-insert-command): Use `delete-char' instead of
  `delete-backward-char'.
* org-table.el (orgtbl-self-insert-command): Dto.

According to the doc string `delete-backward-char' "is meant for
interactive use only; from Lisp, better use `delete-char' with a
negated argument."
2011-06-01 08:30:20 +02:00
Carsten Dominik b637e261c4 Save match data when checking for table.el table
* lisp/org-latex.el (org-export-latex-special-chars): Save match data
when checking for table.el table.
2011-06-01 08:30:01 +02:00
David Maus f4f20ad5c8 Move defsubst `org-re-property' before its first use
* org.el (org-re-property): Move before its first use.
2011-06-01 06:47:03 +02:00
Eric Schulte 8d9f7c4208 Merge branch 'master' of orgmode.org:org-mode 2011-05-31 19:09:49 -06:00
Nicolas Goaziou 24221723a3 org-latex: ensure footnote contents cannot end a list
* lisp/org-latex.el (org-export-latex-preprocess): add
  `original-indentation' property to footnotes so they cannot possibly
  end a list by being less indented than the item they belong to.
2011-05-31 19:06:02 +02:00
Eric Schulte fa31c082d3 ob-lisp: moved progn' wrapper out of org-babel-expand-body:lisp'
Thanks to Mark Cox for suggesting this patch

* lisp/ob-lisp.el (org-babel-expand-body:lisp): No longer wraps
  biddies in `progn'.
  (org-babel-execute:lisp): Wraps bodies in `progn' as they are passed
  to swank.
2011-05-31 09:55:10 -06:00
Carsten Dominik 7c6323ef09 Add param :properties to list properties in clocktable
* doc/org.texi (The clock table): Document the :properties and :inherit-props
arguments for the clocktable.
* lisp/org-clock.el (org-clocktable-write-default): Implement adding property
columns to the clock table.

Patch by Niels Giesen.
2011-05-31 14:20:14 +02:00
Carsten Dominik 1beda3d3c8 Fix typo in code
* lisp/org.el (org-toggle-item): Move parenthesis to correct location.
2011-05-31 13:46:30 +02:00
Carsten Dominik 257ce858e7 Improve documentation and error handling with priorities
* lisp/org.el (org-default-priority):
(org-priority-start-cycle-with-default): Improve docstring.
(org-priority): Throw error when priority is out of range.

Patch by Michael Brand.
2011-05-31 13:37:04 +02:00
Carsten Dominik a958e3bc8f Fix issue with buffer-undo-list being t in some buffers
* lisp/org.el (org-self-insert-command): Catch the case of
buffer-undo-list eq t.
2011-05-31 09:23:52 +02:00
Carsten Dominik d1f33de0c8 Merge branch 'master' of orgmode.org:org-mode 2011-05-31 00:07:04 +02:00
Nicolas Goaziou 363a4554e2 Do not split a partially selected line when calling org-toggle-heading
* lisp/org.el (org-toggle-heading): region should be considered as
  made of full lines, without the last one if region-end is at bol.
  Removed unused variables. Refactored and commented code.
2011-05-28 19:42:53 +02:00
Nicolas Goaziou 5a57bfffae Preserve subtrees when changing headlines into items
* lisp/org.el (org-toggle-item): when region includes an headline less
  indented than first one, set it as the new reference.
2011-05-28 19:10:05 +02:00
Nicolas Goaziou b39a271fcb Keep byte-compiler happy 2011-05-28 18:16:34 +02:00
Nicolas Goaziou 6c2737ddbd Fix code typo 2011-05-28 17:22:48 +02:00
Nicolas Goaziou ddc2467387 Fix list before first heading conversion to odd levels subtree
* lisp/org-list.el (org-list-to-subtree): if the list is before first
  heading and `org-odd-levels-only' is non-nil, the first item gets
  two stars instead of one.
* lisp/org.el (org-reduced-level): a level of 0 was reduced to 1 with
  `org-odd-levels-only' non-nil.
2011-05-28 14:13:11 +02:00
Nicolas Goaziou ec61f20650 Fix org-toggle-item
* lisp/org.el (org-toggle-item): converting an heading to an item
  would sometimes insert unnecessary spaces before it, and unwanted
  space with `org-indent-mode' on. Changing some text into an item
  wouldn't always preserve indentation.
2011-05-28 14:13:11 +02:00
Sébastien Vauban f72541f824 HTML export -- Allow to change the name of the global DIV
Hello,

Here is a patch which allows one to change the (currently) hard-coded DIV name
in which the page contents is being inserted.

It currently is "content", but some prefer "container" or "wrapper".

If accepted, my next patch will be to make this a per-project variable.
Best regards,
  Seb
2011-05-27 22:51:32 +02:00
Carsten Dominik bc161ded36 Capture: Store time from prompt in file+datetree+prompt target
* lisp/org-capture.el (org-capture-current-plist): Improve docstring.
(org-capture-put): Add docstring.
(org-capture-get): Add docstring.
(org-capture-member): Add LOCAL argument. Add docstring.
(org-capture-set-target-location): Store the time received from a date
prompt into the :prompt-time property.

When using the file+datetree+prompt target for capture, the time set
by the prompt is now stored in the :prompt-time property.
2011-05-27 20:50:09 +02:00
Nicolas Goaziou 8f0ea16167 Ignore lists within exporters specific blocks
* lisp/org-exp.el (org-export-mark-list-properties): even if context
  is invalid, mark list item with `list-context' property.
* lisp/org-list.el (org-list-forbidden-blocks): add exporters specific
  blocks to the list of forbidden blocks.

Thanks to Jai Bharat Patel for reporting this.
2011-05-27 16:53:54 +02:00
Nicolas Goaziou f194eb1719 org-list: fix bug when sorting a list with a custom function
* lisp/org-list.el (org-sort-list): function tries to intern
  getkey-func before it is defined, so it's always nil.

Based on a patch from Le Wang.
2011-05-26 17:48:25 +02:00
Eric Schulte 5c1cc3fb4b adding support for evaluation of awk code blocks
* Makefile (LISPF): Adding ob-awk to the makefile
* lisp/org.el (org-babel-load-languages): Adding ob-awk to the list of
  executable languages.
2011-05-26 07:34:58 -06:00
Eric Schulte 75eeae086e Merge branch 'master' of orgmode.org:org-mode 2011-05-26 06:58:54 -06:00
Carsten Dominik 9e5ab4053e Avoid changing field positions with `org-table-get-field'
* lisp/org-table.el (org-table-get-field): Make sure the new field
content is at least one space character.
2011-05-26 08:39:46 +02:00
Carsten Dominik 9f81e43973 Make sure loading org-crypt does not fail
* lisp/org-crypt.el: Check for `daemonp' before using it.
2011-05-26 08:09:29 +02:00
Eric Schulte 03aa327d79 sh: allow passing references through STDIN of a shell script
* lisp/ob-sh.el (ob-ref): Uses ob-ref to resolve the value of the
  :stdin header argument.
  (org-babel-execute:sh): Use the :stdin header argument.
  (org-babel-sh-var-to-sh): Split the bulk of this function off into a
  new sub-function.
  (org-babel-sh-var-to-string): New function for converting elisp
  values to strings that make sense for parsing with sh.
  (org-babel-sh-evaluate): Adding "stdin" option to session and
  external evaluation options.
2011-05-25 09:52:08 -06:00
Roland Kaufmann 33bae13aeb Fix markup problems when using references in source fragments
* lisp/org-exp.el (org-remove-formatting-on-newlines-in-region): New function.
(org-export-format-source-code-or-example): Call
`org-remove-formatting-on-newlines-in-region'.

TINYCHANGE
2011-05-25 09:39:47 +02:00
David Maus b6384bbcbe Prevent adding of extra space to value if property already exists
* org.el (org-entry-put): Prevent adding of extra space to value if
  property already exists.

Fixes a regression reported by Wujun Zhou.
2011-05-24 20:55:35 +02:00
Jambunathan K fa12fe82e9 org-html.el: Fix export of table.el tables.
* lisp/org-html.el (org-export-as-html): Don't expand non-data
lines of table.el tables.
(org-html-expand): Removed the (buggy) test for non-data lines
in table.el tables. The test is now done as part of
org-export-as-html.
(org-format-table-table-html-using-table-generate-source):
Added test for spanning of cells in table.el tables using
table.el's own library routine. Optionlly Suppress export of
simple table.el tables.
(org-format-table-html): Removed the (buggy) test for spanned
table.el tables. The test is now done as part of
org-format-table-table-html-using-table-generate-source.
2011-05-24 15:05:59 +02:00
Carsten Dominik 4f27391197 Turn of LaTeX preprocessing for table.el tables
* lisp/org-latex.el (org-export-latex-special-chars): Do nothing in
table.el tables.

Table.el does its own protection of special characters.
2011-05-24 14:02:43 +02:00
Carsten Dominik af7aefe945 * lisp/org-capture.el (org-capture): Ignore errors when creating a link.
Patch by Tassilo Horn.
2011-05-24 13:39:56 +02:00
Nick Dokos 438536f615 Change underscores to hyphens in section labels
* lisp/org-exp.el (org-export-define-heading-targets): Use dash instead
of underscore to make labels valid.

Currently, the section number (a string of the form "X.Y.Z") is used
to manufacture a section label of the form sec-X_Y_Z. Underscores are
overloaded however, both in org and in LaTeX, and cause conflicts with
some packages.  This patch changes underscores to hyphens in section
labels.

TINYCHANGE
2011-05-24 13:12:16 +02:00
Eric S Fraga 202d8f7bf2 Use format string for message
TINYCHANGE
2011-05-24 05:30:46 +02:00
Dan Davison cec8711a44 Avoid race condition in ob-R code responsible for writing result to disk
Slight modification of patch by Christophe Rhodes

* lisp/ob-R.el (org-babel-R-write-object-command): Ensure that all
  data is written to the results file before Emacs notices that the file
  exists.
2011-05-20 13:30:45 -07:00
Paul Sexton 7af369da69 contrib/org-drill.el -- updated to version 2.3.2
contrib/org-drill.el -- added to choices for 'org-modules' variable
2011-05-21 00:13:35 +12:00
Eric Schulte 120e621443 remove when-let which isn't a real Emacs macro
* lisp/ob-exp.el (org-babel-exp-code): Remove usage of a macro which
  is defined locally on my system, but not globally in Emacs.
2011-05-19 11:05:41 -06:00
Eric Schulte 72c154e38e expand noweb refs when ":noweb yes" during export
* lisp/ob-exp.el (org-babel-exp-do-export): Use `org-babel-exp-code'
  to generate code block output.
  (org-babel-exp-code): Re-create the code block body for exporting
  source code.
2011-05-19 07:37:33 -06:00
Carsten Dominik 2a8fbc4b46 Bury calendar buffer
* lisp/org.el (org-read-date): Bury Calendar buffer after
using it for selecting a date.

Patch by Ben North

TINYCHANGE
2011-05-16 08:36:56 +02:00
Nicolas Goaziou 2500c6b1c8 org-list: fix heuristics for number of lines to insert with a new item
* lisp/org-list.el (org-list-separating-blank-lines-number): fix
  confusion between point and item beginning. Now, if no information
  is avalaible, truly follow user preference when it inserts blank
  lines manually.
  (org-list-insert-item): send correct argument to the preceding
  function.
2011-05-15 22:38:56 +02:00
Eric Schulte 2da0ba6024 ob: keep \n inside of the code block body
* lisp/ob.el (org-babel-src-block-regexp): Keep the now-mandatory
  newline inside of the code block body.
2011-05-14 08:12:23 -06:00
Sean O'Halpin 12faa69330 * lisp/ob.el: Avoid spurious matches to literal
"#+end_src" inside a source block.

Added newline to org-babel-src-block-regexp.
2011-05-14 08:11:07 -06:00
Nicolas Goaziou 3dfcaf013a Don't indent #+include lines
* lisp/org.el (org-indent-line-function): don't include #+include lines.
2011-05-14 14:32:32 +02:00
Eric Schulte a2f29de861 Merge branch 'master' of orgmode.org:org-mode 2011-05-13 10:54:49 -06:00
Eric Schulte 7d12d45778 ob: new function to check header arguments for errors C-c C-v c
* doc/orgcard.tex: Adding line for org-babel-check-src-block.
* lisp/ob-keys.el (org-babel-key-bindings): Adding key sequence for
  org-babel-check-src-block.
* lisp/ob.el (org-babel-expand-src-block): Fit within 80 cols.
  (org-babel-edit-distance): Returns the edit distance of two strings.
  (org-babel-check-src-block): Check a code block for errors.
2011-05-13 10:54:44 -06:00
Carsten Dominik 1b262c9fc0 Fix bug in capture customization setup.
* lisp/org-capture.el (org-capture-templates): Fix bug in customization setup.

Patch by Giovanni Ridolfi

TINYCHANGE
2011-05-13 14:49:27 +02:00
Carsten Dominik bffdfeb7fc Implement a minor mode for the editor following the cursor through the table
* doc/org.texi (Built-in table editor): Document the table field follow mode.
* lisp/org-table.el (org-table-exit-follow-field-mode-when-leaving-table):
New option.
(org-table-check-inside-data-field): New optional argument `noerror'.
When set, the function will only return nil instead of throwing an
error.
(org-table-edit-field): Interpret double prefix argument, and improve
the properties of the editing window.
(org-table-follow-field-mode): New minor mode.
(org-table-follow-fields-with-editor): New function.

The main purpose of this functionality is to make working with table
with long fields simpler, by always showing the full content of the
current field.  This functionality is based on the following
mailing list thread

http://thread.gmane.org/gmane.emacs.orgmode/41584

and contains ideas by Jonny, Juan Pechiar, and Michael Brand.
2011-05-11 10:11:45 +02:00
Carsten Dominik f73f0f6323 Merge branch 'master' of orgmode.org:org-mode 2011-05-11 10:10:47 +02:00