Commit Graph

5130 Commits

Author SHA1 Message Date
Bastien Guerry 8608b6651d Fix doubled-word typo.
Thanks to Jim Meyering <jim@meyering.net> for this upstream fixes.
2011-06-20 15:38:24 +02:00
Ted Zlatanov b3aad7ffa8 Do not error out on fontification errors
* org.el (org-fontify-meta-lines-and-blocks): Ignore errors.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-06-20 11:23:44 +02:00
Eric Schulte adf16ffdd7 ob-emacs-lisp: respect the ":results scalar" header argument combination
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Respect the
  ":results scalar" header argument combination.
2011-06-19 16:06:55 -07:00
Dan Davison 4f3a31dd97 Fix a bug in in-buffer src fontification
* lisp/org-src.el: Append a space character to copied text so that the
                   final text property change is picked up correctly
2011-06-17 16:51:29 -07:00
Eric Schulte f422849557 Merge branch 'master' of orgmode.org:org-mode 2011-06-17 16:41:55 -07:00
Eric Schulte e4204fc3fe tangle: ob-tangle now tangles only the current block when called with a prefix argument
* lisp/ob-tangle.el (org-babel-tangle-file): Use the new argument list
  to org-babel-tangle.
  (org-babel-tangle): Now when called with a prefix argument, only the
  current code block is tangled.
2011-06-17 16:41:50 -07:00
Nicolas Goaziou 432c53a474 org-list: add a way to configure transitional check-boxes export
* lisp/org-list.el (org-list-parse-list): replace transitional
check-boxes with "[CBTRANS]" string during parsing.
(org-list-to-generic): use the new property `:cbtrans' to configure
export string for transitional check-boxes.
2011-06-17 15:11:49 +02:00
Eric Schulte db1c3f6a3e Revert "replacing calls to now-defunct function `interactive-p'"
This reverts commit 4f084e1467.
2011-06-16 21:32:54 -07:00
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
Carsten Dominik af730fec0a Get rid of some compiler warnings 2011-05-11 10:10:24 +02:00
Jason Dunsmore c735d62f07 Fixed typo in org-mobile-index-file docstring. 2011-05-10 10:07:35 -05:00
Carsten Dominik 9dba548cd5 Agenda Views: Call `org-agenda-skip' first.
* lisp/org-agenda.el (org-agenda-get-todos): Call `org-agenda-skip' first,
then check if timestamps cause exclusion.
* lisp/org.el (org-scan-tags):  Call `org-agenda-skip' first,
then check if timestamps cause exclusion.

For more information, see the following mailing list thread:

http://thread.gmane.org/gmane.emacs.orgmode/41052/focus=41052
2011-05-10 08:58:04 +02:00
Thomas S. Dye cd05598dcd Optional \caption argument for LaTeX export
Aloha all,

The attached patch initializes the existing variable shortn, adds it to
two caption situations in addition to the one already coded, and adds
some description to the manual.

With this patch, #+CAPTION: [Short caption]{Long caption.} in the
Org-mode source exports to \caption[Short caption]{Long caption.} in the
LaTeX export, which is, I think, as it should be.

Many thanks to Nick Dokos who made me understand why earlier patches
hadn't shown up on the patchwork server (wrong mime type, evil mail
client).  This one sent with gnus and fingers crossed.

All the best,
Tom

>From 9dc65f7e598dd171ebce9448cd39c4062f7cafff Mon Sep 17 00:00:00 2001
From: Tom Dye <tsd@tsdye.com>
Date: Sun, 8 May 2011 06:56:25 -1000
Subject: [PATCH] optional caption arguments in LaTeX export
2011-05-08 22:15:45 +02:00
Nicolas Goaziou 946640d84d org-list: correctly identify description lists
* lisp/org-list.el (org-list-full-item-re): allow description term to
  have a newline character after the colons.
2011-05-07 02:33:13 +02:00
Nicolas Goaziou 073ab7de83 org-list: check with-case argument when sorting a list alphabetically
* lisp/org-list.el (org-sort-list): no longer ignore with-case
  argument: the function sorted case-sensitively, regardless of
  argument.
2011-05-07 02:17:19 +02:00
Eric Schulte e80305e77e Merge branch 'master' of orgmode.org:org-mode 2011-05-06 14:47:31 -06:00
Eric Schulte ec293ae62b configurable names for inline data labels
* lisp/ob-ref.el (org-babel-ref-resolve): Using the new result regexp.
* lisp/ob.el (org-babel-data-names): Configurable list of names of data.
  (org-babel-result-regexp): Using new results regexp.
2011-05-06 14:45:38 -06:00
Carsten Dominik e8151c382c Add CLOCKSUM to special properties, to make org-invoice.el work again
* lisp/org.el (org-special-properties): Add CLOCKSUM to the special properties.
2011-05-06 17:20:40 +02:00
Robert P. Goldman a173acf275 Don't prompt for bad links during babel export
* lisp/ob-exp.el (org-babel-exp-in-export-file): Bind
  `org-link-search-inhibit-query' to t to inhibit prompts.
2011-05-05 19:53:20 -06:00
Carsten Dominik 13669d7e96 Fix another option parsing bug
* lisp/org-exp.el (org-export-add-options-to-plist): Use the right match group.
2011-05-05 12:48:23 +02:00
Carsten Dominik 8d509bb494 Protect index string
* lisp/org-latex.el (org-export-latex-preprocess): Protect index string
2011-05-05 10:29:22 +02:00
Carsten Dominik cb6425e6a0 Process index entries
* lisp/org-latex.el (org-export-latex-preprocess): Pipe index entries
through org-export-latex-fontify-headline.
2011-05-05 10:23:32 +02:00
Carsten Dominik e98237927f Document the capture property :table-line-pos 2011-05-05 09:58:31 +02:00
Carsten Dominik d752029422 EXPORT: Fix the options parser
* lisp/org-exp.el (org-export-add-options-to-plist): Fix the option parser

This fixes up commit aa6dba8a74.
Instead of looking for the start of a word (which does not work for
the options that are characters), it looks for the beginning of the
line or a whitespace character preceding the option.
2011-05-05 09:08:13 +02:00
Carsten Dominik cd04462438 Remove unnecessary local variable 2011-05-05 00:35:08 +02:00
Robert P. Goldman bf7ce56a72 Make the latex export preprocessor rewrite #+INDEX to \index.
* lisp/org-latex.el (org-export-latex-preprocess): Replace index entries.
2011-05-04 09:57:50 +02:00
Robert P. Goldman 62c12cc50f Add an easy template for index (i)
* lisp/org.el (org-structure-template-alist):  Add an easy template
for index (i), and move include file to I from i.
* doc/org.texi (Easy Templates): Document new template.

Notes about this patch:
1.  It breaks some old user-visible behavior, since <i changes meaning.
    Per Nick's posting, we expect that if index is used, it will be used
    more commonly than include file.  However, since this is a custom,
    behavior could be changed.  Indeed, we could put index on capital
    I with a suggestion that users who are indexing should swap in their
    customizations.
2.  I modified the docstring for org-structure-template-alist, which did
    not explain the function of the "?" in the string.  Someone should
    check and verify I didn't get this wrong.
3.  There doesn't seem to be a Muse tag equivalent for #+index, so I
    just made the Muse equivalent of #+index be #+index.  I don't know
    org-mtags enough to know if this is appropriate.
2011-05-04 09:49:31 +02:00
Matt Lundin ad28fc9a61 Making the output of %% functions linkable in agenda views
charles.sebold@lcms.org writes:

> On 7 Apr 2011, Charles Sebold wrote:
>
>> Here's a test.  Take the line below and put it in an agenda file, then
>> view the agenda.
>>
>> %%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))
>>
>> The results as I see them give me a link that I can mouse-click on,
>> but I can't move point to it and hit C-c C-o.
>>
>> What do I need to do to make this a normal org link in every way?  Or
>> is this a bug?
>>

Here's what seems to be going on.

Clicking with the mouse works because it calls org-open-at-mouse, which
(by calling org-open-at-point) simply looks at the text surrounding the
click point to find a link.

The function org-agenda-open-link, on the other hand, grabs part of the
headline as a string (the prefix), then jumps to the location in the
original buffer and calls org-offer-links-in-entry to look for links in
both the entry and the prefix of agenda text. Obviously, it won't find
your link in the original entry since it looks like this:

%%(format "%s" (concat "[[elisp:(info)]" "[Link to info]]"))

I think it shouldn't be a problem to pass the whole agenda line to
org-offer-links-in-entry. This will not result in duplicate links, since
org-offer-links-in-entry "uniquifies" the links.

I've attached a patch.

The bigger question, however, is why the expression above is even
showing up in the agenda, since it contains no scheduling information.
:)

Best,
Matt

>From 58c7621c0c84b9c1930098a098e4559aa516eec0 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Tue, 3 May 2011 15:54:35 -0400
Subject: [PATCH] Pass entire text of agenda line to org-offer-links-in-entry.

* lisp/org-agenda.el (org-agenda-open-link): Pass entire text of
  agenda line to org-offer-links-in-entry.

This fixes bug noticed by Charles Sebold, in which links that are
dynamically formatted for the agenda view are ignored.
http://permalink.gmane.org/gmane.emacs.orgmode/40673
2011-05-04 09:43:01 +02:00
Matt Lundin 1918731fdf Add helper functions to org-bibtex
* lisp/org-bibtex.el: (org-bibtex-search): New function.
  (org-bibtex-export-to-kill-ring): New function. Export to kill ring.
  (org-bibtex-create-in-current-entry): New function
  (org-bibtex-create): Make it easier to add bib fields to an
  existing headline
  (org-bibtex-export-arbitrary-fields)
  (org-bibtex-treat-headline-as-title): Fix typos
  (org-bibtex-fleshout): Don't upcase optional field; remove ":" from
  type completion

This patch implements several helper functions: exporting to kill
ring, searching only for entries with bib fields, and creating bib
fields in an existing headline. It makes the UI of org-bibtex-fleshout
more consistent.
2011-05-02 11:23:11 -06:00
Matt Lundin 3c148beeb7 More options in use of headlines as substitute for title field
* lisp/org-bibtex.el (org-bibtex-treat-headline-as-title): New
  defcustom.
  (org-bibtex-headline): Only use headline text (not TODO or other
  metadata) to generate title field and auto key.
  (org-bibtex-fleshout): Allow user to choose whether to treat
  headline as title.
2011-05-02 11:22:27 -06:00
Tom Dye 54aa9eb6c0 * lisp/org-bibtex.el: Added crossref field to other fields 2011-05-02 10:23:35 -06:00
Tom Dye 1ee59008e8 * lisp/org-bibtex.el: Add crossref option to incollection 2011-05-02 10:23:27 -06:00
Matt Lundin c446b4dfbe Do not export TYPE property as field when allowing arbitrary fields
* lisp/org-bibtex.el (org-bibtex-headline): Don't export TYPE property
  as field
2011-05-02 10:19:36 -06:00
Matt Lundin 5cfb04a4e1 Warn if duplicate ID is created
* lisp/org-bibtex.el (org-bibtex-key-property): When storing key in
  ID, warn if a duplicate ID is generated.
2011-05-02 10:19:33 -06:00
Matt Lundin 1af957a906 Implement bibtex keywords field <-> org-mode tags
* lisp/org-bibtex.el (org-bibtex-tags): New variable
  (org-bibtex-tags-are-keywords): New variable
  (org-bibtex-no-export-tags): New variable
  (org-bibtex-headline): Export tags as comma-separated bibtex keywords
  (org-bibtex-read): Import bibtex keywords field as tags

Bibtex users often rely on the keywords field to tag their entries.
With biblatex, the keywords field can be used to organize and filter
bibliographic entries. This patch adds an option to import keywords as
org-mode tags, and to export tags as bibtex keywords.

It also adds an option to add user-defined tags to newly created bib
headlines.
2011-05-02 10:19:26 -06:00
Manuel Giraud 04c13ee6b5 Optimize getting the date for org-publish
* org-publish.el (org-publish-find-date): optimization
2011-05-02 11:13:46 +02:00
Tassilo Horn 53c1894bfa org-gnus-follow-link and nnimap-request-scan
Eden Cardim <edencardim@gmail.com> writes:

>     Tassilo> No, I just wasn't really sure what that SCAN argument
>     Tassilo> means, so I tried to be as safe as possible.  If it's
>     Tassilo> always safe to provide nil, let's change that.
>
> Well, right now all it does is to check split rules against incoming
> mail. But, if we have a link to a message in org, then that message
> already went through the split process, so re-splitting is
> unnecessary.

Ok, so here we go:
Bye,
Tassilo

>From 89fecc7b938385647618dc28c4df304df872e6eb Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tassilo@member.fsf.org>
Date: Tue, 12 Apr 2011 20:27:54 +0200
Subject: [PATCH] Call gnus-activate-group without SCAN arg.

* org-gnus.el (org-gnus-follow-link): Don't request scan of
group when following link.
2011-05-02 11:10:22 +02:00
Matt Lundin 95a8b0680e Removed unecessary invocations of org-agenda-show.
lisp/org-agenda.el (org-agenda-set-tags): Remove org-agenda-show to prevent
disrupting windows and changing point in original buffer.
(org-agenda-set-property): Same
(org-agenda-set-effort): Same
(org-agenda-toggle-archive-tag): Same

When setting a tag in the agenda, org-mode displays the corresponding
entry in the original org buffer by calling org-agenda-show. This has
the unwelcome side-effect of disrupting the current window arrangement
and changing the position of the point in the original buffer. This
behavior is inconsistent with the that of org-agenda-todo, which makes
all its changes "silently."

Here is the offending line (6799) in org-agenda-set-tags:

--8<---------------cut here---------------start------------->8---
(org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
--8<---------------cut here---------------end--------------->8---

The same line occurs in org-agenda-set-property, org-agenda-set-effort,
and org-agenda-toggle-archive tag.
2011-05-02 10:08:54 +02:00
Carsten Dominik d8625e809f Make `org-save-outline-visibility' macro return a useful value
Modified from a patch by Paul Sexton
2011-05-02 09:42:11 +02:00
Manuel Giraud 71400037f3 Allow Sitemap links without extension
* lisp/org-publish.el (org-publish-project-alist): Document new
:sitemap-sans-extension property.
(org-publish-org-sitemap): Use new sitemap-sans-extension setting.

The following patch adds an option to remove extensions of files linked
from the auto generated sitemap. This is useful if you want to follow
this: http://www.w3.org/Provider/Style/URI
2011-05-02 09:26:15 +02:00
Carsten Dominik 420899b3df Fix typo in function name
* lisp/org.el (org-remove-uninherited-tags): Renamed from
org-remove-iniherited-tags.
(org-scan-tags): Fix typo in function call.
(org-get-tags-at): Fix typo in function call.
2011-05-02 09:16:51 +02:00
Carsten Dominik 3b924ef2ad Fix whitespace problem 2011-05-02 09:14:30 +02:00
Matt Lundin c6e97d88cf org-get-tags-at: exclude filetags when local is t
* lisp/org.el (org-get-tags-at): Don't include filetags if local is t.

The function org-get-tags-at and the functions that called it were
including inherited file tags even if the user requested only local
tags. This patch fixes the behavior.
2011-05-02 09:13:06 +02:00
Eric Schulte c7ed6cde3a ob-clojure: qualify pp dispatch functions, wrap body in (do )
Patch by Eric S Fraga

* lisp/ob-clojure.el (org-babel-expand-body:clojure): Qualify pp
  dispatch functions, wrap body in `(do )'.
2011-04-29 08:26:01 -06:00
Carsten Dominik bfdc942050 Merge branch 'master' of orgmode.org:org-mode 2011-04-28 22:58:42 +02:00
Carsten Dominik 69811ff44c Fix multiple overlays bug in src blocks
* lisp/org.el (org-fontify-meta-lines-and-blocks): Fix bug which
resulted in the creation of multiple overlays in src blocks.
2011-04-28 22:08:15 +02:00
Eric Schulte 4a8640d0cf ob-clojure: more robust reading of results
* lisp/ob-clojure.el (org-babel-execute:clojure): If results are not
  readable by lisp, then return them as a string.
2011-04-28 12:21:17 -06:00
Eric Schulte 0846a121b0 org-bibtex: fixed most of the compiler warnings 2011-04-28 10:05:24 -06:00
Eric Schulte d689755ca5 org-bibtex: prompts for file name when writing to .bib file
Thanks to Tom Dye for this suggestion

* lisp/org-bibtex.el (org-bibtex): Now prompts for a file name.
2011-04-28 10:02:33 -06:00
Eric Schulte daef7d8631 org-bibtex: optionally fill in optional fields on bibtex headline creation
Thanks to Tom Dye for suggesting this functionality

* lisp/org-bibtex.el (org-bibtex-create): Adding prefix argument which
  will result in prompting for optional fields.
2011-04-28 09:46:35 -06:00
Eric Schulte 1024da4e35 ob-bibtex: fixed flet variable causing compile problems
* lisp/org-bibtex.el (org-bibtex-headline): Renamed flet function
  `get' which was causing compile problems.
  (org-bibtex-fleshout): Renamed flet function `get' which was causing
  compile problems.
  (org-bibtex-write): Renamed flet function `get' which was causing
  compile problems.
2011-04-28 09:17:59 -06:00
Christian Egli 2a8ce137f4 Merge branch 'master' of orgmode.org:org-mode 2011-04-28 12:12:53 +02:00
Christian Egli 2e21cd424a Taskjuggler: Make sure an id never starts with a number
* org-taskjuggler.el (org-taskjuggler-clean-id): Make sure an
id never starts with a number.

Taskjuggler IDs may not start with a number
2011-04-28 12:11:46 +02:00
Eric Schulte aa903a749d org-bibtex: two defcustoms; org-bibtex-export-arbitrary-fields and org-bibtex-key-property
Patch by Matt Lundin adding two new customization options

* lisp/org-bibtex.el (org-bibtex-export-arbitrary-fields): New option.
  (org-bibtex-key-property): New option.
  (org-bibtex-put): Make use of new `org-bibtex-key-property' variable.
  (org-bibtex-headline):  Make use of new
  `org-bibtex-export-arbitrary-fields' and `org-bibtex-key-property'
  variables.
  (org-bibtex-autokey):  Make use of new `org-bibtex-key-property'
  variable.
  (org-bibtex-fleshout):  Make use of new `org-bibtex-key-property'
  variable.
  (org-bibtex-write):  Make use of new `org-bibtex-key-property'
  variable.
2011-04-27 16:00:16 -06:00
Eric Schulte a1b9878623 org-bibtex: org-bibtex-yank, and misc robustifying 2011-04-27 14:53:07 -06:00
Eric Schulte 5a07ae6f11 org-bibtex: added trailing space after "Type:" thanks to Matt Lundin 2011-04-27 14:53:07 -06:00
Eric Schulte 93e000923f org-bibtex: field prompt removes ":", and shrinks prompt window 2011-04-27 14:53:06 -06:00
Eric Schulte 8a41d54c1a org-bibtex: translating between Org-mode headings and Bibtex entries
* lisp/org-bibtex.el: Updating Copyright dates, author information,
  commentary and history notes.
  (org-bibtex-types): List of bibtex types with descriptions and
  required and optional fields.
  (org-bibtex-fields): List of bibtex fields with descriptions.
  (*org-bibtex-entries*): Special variable to hold parsed bibtex
  entries.
  (org-bibtex-autogen-keys): Custom variable controlling whether
  bibtex keys are automatically generated
  (org-bibtex-prefix): Custom variable allowing use of optional prefix
  for bibtex properties in Org-mode headlines.
  (org-bibtex-get): Helper function for accessing bibtex elements of a
  property list.
  (org-bibtex-put): Helper function for inserting bibtex element into
  a property list.
  (org-bibtex-headline): Return a bibtex entry of the given headline
  as a string.
  (org-bibtex-ask): Prompt the user to fill in the value of a bibtex
  field.
  (org-bibtex-autokey): Generate a bibtex key for the current
  headline.
  (org-bibtex-fleshout): Fill in missing bibtex properties of the
  current headline.
  (org-bibtex): Export the current Org-mode buffer to a bibtex buffer.
  (org-bibtex-check): Check that all bibtex properties are present in
  the current headline.
  (org-bibtex-check-all): Check all headlines in the current buffer.
  (org-bibtex-create): Create a new bibtex headline at the current
  level.
  (org-bibtex-read): Read the current bibtex entry from a bibtex file.
  (org-bibtex-write): Write the most recently read bibtex entry into
  an Org-mode file.
2011-04-27 14:53:05 -06:00
Carsten Dominik b00948328d Merge branch 'clock-check-faces' 2011-04-27 13:50:23 +02:00
Carsten Dominik ad4970a32e Configurable faces for clock problems
* lisp/org-agenda.el (org-agenda-clock-consistency-checks): Allow to
set properties.
(org-agenda-show-clocking-issues): Handle faces.
2011-04-27 13:49:11 +02:00
Eric Schulte 1a68794fdc ob-ditaa: specify utf8 data by default (default :java header argument)
* lisp/ob-ditaa.el (org-babel-default-header-args:ditaa): Specify utf8
  content by default with "-Dfile.encoding=UTF-8".
2011-04-25 18:57:59 -06:00
Eric Schulte f0d83a355e ob-ditaa: adding :java header arg for passing flags to the java command
Thanks to Juan Pechiar for raising the need for this header argument.

* lisp/ob-ditaa.el (org-babel-execute:ditaa): New ":java" header argument.
2011-04-25 13:12:12 -06:00
Nicolas Goaziou ae60048a81 org-exp: make lists more robust wrt macros expansion
* lisp/org-exp.el (org-export-preprocess-string): mark list end before
  expanding macros. Thus, a macro inside a list and containing blank
  lines cannot break the list structure.
  (org-export-preprocess-apply-macros): multi-lines macros get
  indented with the same indentation as the first line. Thus, we are
  sure that every line belongs to the same list as the first line, if
  such list exists. Also add comments in code.
2011-04-24 19:34:09 +02:00
Carsten Dominik acda0ee212 Fix typos 2011-04-24 17:21:47 +02:00
Carsten Dominik 02441ed433 Implement clock consistency check functionality for agenda
* lisp/org-agenda.el (org-agenda-clock-consistency-checks): New option.
(org-agenda-list): Handle display change to clock check.
(org-agenda-get-progress): Show only clock entries if we are doing the
consistency check.
(org-agenda-show-clocking-issues): New function.
(org-agenda-check-clock-gap): New function.
(org-agenda-view-mode-dispatch): Offer consistency check.
(org-agenda-log-mode): Handle switch to clock only display.
(org-agenda-set-mode-name): Show lighter for Clockcheck.
* lisp/org.el (org-hh:mm-string-to-minutes): Accept an integer argument
and return it unchanged.
* doc/org.texi (Agenda commands): Document clock consistency checks.
* doc/orgcard.tex: Document key for clock consistency check.
2011-04-24 17:17:25 +02:00
Nicolas Goaziou 7327b483f1 org-list: small docstring fix 2011-04-24 11:25:40 +02:00
Nicolas Goaziou fc91845fa5 org-list: fix bug with structure and blocks/drawers indentation
* lisp/org-list.el (org-list-struct): when walking down the list, the
  function would not pay attention to drawers or blocks indentation.
  Thus, such constructs couldn't consistently end an item or a list.
  This patch ensures line indentation is stored (if applicable) before
  skipping them. Also fixed doc-string and comments.
2011-04-24 11:23:01 +02:00
Carsten Dominik e7217a74e9 Export: Add EXPORT_FILE_NAME to the enclosing tree properties
* lisp/org-exp.el (org-export): Add EXPORT_FILE_NAME to the enclosing
tree properties
2011-04-22 11:23:18 +02:00
Carsten Dominik a20eebd73f Another fix for exporting enclosing class/title piece in buffer
* lisp/org-exp.el (org-export): Define a bound for finding enclosing
tree with class/title definition.
2011-04-21 18:03:05 +02:00
Carsten Dominik b7e3d7d90b Make exporting the enclosing entry with CLASS/TITLE property work better
* lisp/org-exp.el (org-export): Go to next heading before searching
backward, so make this also work if we are on the headline of the
entry with the property...
2011-04-21 17:55:18 +02:00
Carsten Dominik 2985816e25 Postfix to the previous patch, changing after-change-functions for demotion
* lisp/org.el (org-promote):
(org-demote): Soften the previous change, by only removing the
flyspell function from after-change functions, because that was the
one causing the slowdown - at least much of it.
2011-04-21 17:01:39 +02:00
Eric Schulte 6660a51e07 Speed up promotion and demotion by turning off after-change-functions
* lisp/org.el (org-promote):
(org-demote): Turn off after-change-functions to speed up the
reindentation of text.

This is mainly toob-oz: brought up to date with the rest of Babel
2011-04-21 16:49:41 +02:00
Eric Schulte 9a863dda84 Merge branch 'master' of orgmode.org:org-mode 2011-04-19 09:44:32 -06:00
Eric Schulte 892b66f062 ob-ocaml: updated to use the new script-escape function
* lisp/ob-ocaml.el (org-babel-ocaml-read-list): Using
  `org-babel-script-escape'.
  (org-babel-ocaml-read-array): Using `org-babel-script-escape'.
2011-04-19 09:43:34 -06:00
Manuel Giraud 2f50b1380b * org-html.el (org-html-handle-links): add an alternate for inline images 2011-04-19 11:22:20 +02:00
Carsten Dominik c9958a3999 Fix agenda bulk commands
* lisp/org-agenda.el (org-agenda-bulk-action): Do not use the entries
variable before it is defined
2011-04-16 18:05:51 +02:00
Carsten Dominik c2c28fc942 Merge branch 'master' of orgmode.org:org-mode 2011-04-15 22:31:11 +02:00
Eric Schulte 1997e19bd5 org-src-lang-modes: added alias "C" to "c"
* lisp/org-src.el (org-src-lang-modes): Added a language alias of "C"
  to "c".
2011-04-15 10:16:52 -06:00
Shaun Johnson de63411264 Babel: Stop tangling failing in an indirect buffer
* ob-tangle.el (org-babel-tangle): Make it work in an indirect buffer.

The problem was that the message generated after tangling included the
file name of the current buffer which was nil in an indirect buffer.

TINYCHANGE
2011-04-15 09:55:22 -06:00
Manuel Giraud c56bf33812 HTML export: correct a bug in coderef link.
* org-html.el (org-html-make-link): correct a bug in coderef link.
2011-04-15 13:58:29 +02:00
Bernt Hansen 4262dc1cbc Fix typo in agenda local variable
* lisp/org-agenda.el (org-agenda-filter-by-tag): Fix variable name typo

maybe-reftresh -> maybe-refresh
2011-04-15 13:56:12 +02:00
Bernt Hansen 383cb5dcaa Fix agenda display when headlines are missing
* lisp/org-agenda.el (org-agenda-get-timestamps): Fix agenda display when headlines are missing

The following entry breaks the agenda display.

,----
| ****
|         :PROPERTIES:
|         :DateCreated: <2011-04-13 Mi 10:00>
|         :END:
|
| [[gnus:nntp%2BGwene:gwene.org.emacsen.planet][gnus:nntp+Gwene:gwene.org.emacsen.planet]]
`----

Provide the empty string as the headline if the search for the
headline returns nil.  org-format-agenda-items requires a string for
the headline parameter.
2011-04-15 13:55:01 +02:00
Bastien Guerry 1bc0623be2 org mobile - call pre hooks earlier
* lisp/org-mobile.el (org-mobile-push): Move call to hook, make it the
first thing of the push operation.
2011-04-15 13:53:10 +02:00
Eric Schulte 60864e851b ob: now looking for header arguments in #+Properties: as well as #+Babel:
* lisp/ob.el (org-babel-params-from-buffer): Now looking for header
  arguments in #+Properties: as well as #+Babel:.  Also, we're no
  longer caching these results into a file local variable.
2011-04-14 20:37:21 -06:00
Eric Schulte 28b325fa1e ob-python: in the case of ":results output table" results can be parsed as a table
* lisp/ob-python.el (org-babel-python-evaluate-external-process):
  Allow parsing as a table in the case of ":results output table".
  (org-babel-python-evaluate-session):   Allow parsing as a table in
  the case of ":results output table".
2011-04-14 20:24:10 -06:00
Carsten Dominik e20166eb29 Fix the bulk scatter command to always schedule
* lisp/org-agenda.el (org-agenda-bulk-action): Allow bulk scatter
in all possible agenda views.  Use `org-agenda-schedule' instead of
`org-agenda-date-later'.

The bulk scatter command so far shifted the date that was causing an
entry to appear in the agenda.  However, the true intend was to
reschedule onto dates in the near future.  This patch fixes this
issue.  A side effect is that you can now bulk scatter tasks that to
not yet have a date, for example also tasks picked from the TODO
list.
2011-04-14 00:10:56 +02:00
Eric Schulte 2c8e964b70 ob-emacs-lisp: now supports :results output
* lisp/ob-emacs-lisp.el (org-babel-execute:emacs-lisp): Now supports
  ":results output".
2011-04-10 16:29:14 -06:00
Julien Danjou 92b603c892 org: clean property entries matching
* lisp/org.el (org-entry-get):
(org-entry-delete):
(org-entry-put):
(org-property-values):
(org-delete-property-globally): Use org-re-property.
(org-re-property): New function allowing to build a regexp to match a
property.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-04-09 18:53:07 +02:00
Julien Danjou c9c5da9191 org: enhance docstring for org-property-values
* lisp/org.el (org-property-values): Enhance docstring.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-04-09 18:53:07 +02:00
Ethan Ligon 49e6bc8997 Fix for html & docbook export of description list items
The problem is illustrated by the following example:

* Illustration of bug in html export
  - This has a space after the colons :: so will work in latex and html
  - This doesn't have a space after the colons ::so is an invalid
    description item according to the org manual.  Won't work in html
    or docbook.  Will nevertheless work in latex, provided /first/
    description item is valid.
  - Has a terminating space ::
    - So it works in both html and latex export!
    - Even though it's difficult to distinguish from the next example.
  - Lacks a terminating space ::
    - At present, *doesn't* work in html or docbook export, does in
      latex.  This is the case that the following patch fixes.
2011-04-09 18:40:45 +02:00
Bastien Guerry 098ef03fa9 Minor cleanup. 2011-04-09 16:20:46 +02:00
Nicolas Goaziou a7a4693f66 org-list: don't forget to allow alphabetical counters 2011-04-09 16:09:32 +02:00
Julien Danjou 5c5468dc60 org-table: use point-min instead of 1
* lisp/org-table.el (org-table-cleanup-narrow-column-properties): Use
point-min rather than 1 when moving in the buffer.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-04-09 14:46:45 +02:00
Nicolas Goaziou abad1b4994 Auto-fill shouldn't insert new items
* lisp/org-list.el (org-list-in-valid-context-p): renamed from
  org-list-in-valid-block-p.
  (org-at-item-p,org-list-search-generic): use renamed function.

* lisp/org.el (org-fill-item-nobreak-p): new function.
  (org-set-autofill-regexps): modify `fill-nobreak-predicate' to
  prevent auto-fill from breaking line just before an item regexp.
2011-04-09 13:20:37 +02:00
Nicolas Goaziou 9a8dab1436 Correctly fontify description items
* lisp/org.el (org-set-font-lock-defaults): Be more strict when
  recognizing description items, and do not fontify wrong cases like:
  "- term ::description" or "1. term :: description"
2011-04-09 13:18:13 +02:00
Nicolas Goaziou 5efc6f5fc4 org-latex: fix footnotes wrt lists and links
* lisp/org-latex.el: pay attention to end of footnote. Before closing
  the command, ensure that list is properly closed or that last link
  is separated from the curly brace.
2011-04-09 11:57:12 +02:00
Nicolas Goaziou a1458ba5ec Don't indent footnote definitions
* lisp/org.el (org-indent-line-function): footnote definition must
  stay at column 0 to be recognized as such. Body below can have
  normal indentation, so it should ignore its definition when
  computing indentation.
2011-04-09 11:50:59 +02:00
Bastien Guerry b20bb56ba9 * org-agenda.el (org-agenda-start-day): Minor docstring update. 2011-04-08 18:48:08 +02:00
Bastien Guerry 9a0645bcfd org-protocol.el: more appropriate message when capture is done.
* org-protocol.el (org-protocol-remember)
(org-protocol-capture): More appropriate message.
2011-04-08 18:18:02 +02:00
Bastien Guerry 8cf35f0ab1 org-capture.el: Fix bugs about handling the :clock-keep parameter.
* org-capture.el (org-capture-clock-keep): New local variable.
(org-capture, org-capture-finalize): Use it and fix a bug when
:clock-keep is set to `t'.
2011-04-08 18:04:47 +02:00
Carsten Dominik a0a526bc3e Export: handle include files before processing macros.
* lisp/org-exp.el (org-export-preprocess-string): Handle include files
before processing macros.

Patch by Benny Simonsen.  TINYCHANGE
2011-04-08 12:35:37 +02:00