Commit Graph

8241 Commits

Author SHA1 Message Date
Bastien Guerry 5c53026d32 Fix (a lot of) compiler warnings.
Also introduce `org-pop-to-buffer-same-window' as a compatibility
function for Emacs =>24.1.
2011-07-18 19:25:10 +02:00
Bastien Guerry 05c66a2e2f Merge branch 'master' of orgmode.org:org-mode 2011-07-18 18:14:58 +02:00
Bastien Guerry 395af11404 Use `org-loop-over-siblings-in-active-region' for `org-archive-set-tag'. 2011-07-18 18:14:35 +02:00
Eric Schulte 06bf0eb7fe ob-java: minimal support for evaluation of java code blocks 2011-07-18 10:08:04 -06:00
Nicolas Goaziou ddec51af0f Comment some code for posterity 2011-07-18 15:11:56 +02:00
Nicolas Goaziou a161ecfd6a org-list: move point after asking for new term when inserting an item
* lisp/org-list.el (org-list-insert-item): actualize code comments.
(org-insert-item): for consistency, point cannot be moved at
a surprising place when the user is being asked to choose a new
description term to insert in the list. Point should stay where the
user called the command.
2011-07-18 13:51:15 +02:00
Jambunathan K 3aa87582b6 org-odt: Correctly export iso-8859-1 files with non-ascii chars
* contrib/lisp/org-odt.el (org-odt-get): Set
CODING-SYSTEM-FOR-WRITE and CODING-SYSTEM-FOR-SAVE to 'utf-8
irrespective of buffer-file-coding-system.

Fixes issue reported by Renzo Been in the following post.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-07/msg00795.html
2011-07-18 14:55:13 +05:30
Bastien Guerry 366254217a New feature: allow some commands to loop over siblings.
This commit introduce `org-loop-over-siblings-within-active-region-p'
as a new defcustom that you can turn on (`non-nil') to allow commands
to loop over siblings in the active region.

The list of commands is this:

- org-archive-subtree
- org-archive-to-archive-sibling
- org-toggle-archive-tag
- org-deadline
- org-schedule

When `org-loop-over-siblings-within-active-region-p' is `non-nil' and
you run one of the command above on a region containing several headlines,
then Org will apply the command to each headline.

This can be particularily useful for archiving several headlines, or to
add a deadline or schedule several entries.

* org.el (org-loop-over-siblings-within-active-region-p): New
defcustom so that `org-loop-over-siblings-in-active-region'
can be turned on and off.
(org-deadline, org-schedule): Use the new macro.

* org-macs.el (org-loop-over-siblings-in-active-region): New
macro to let some commands act upon several siblings in the
active region.

* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag): Use
`org-loop-over-siblings-in-active-region'.
2011-07-18 10:09:53 +02:00
Bastien Guerry 52fd747983 contrib/lisp: don't use `outline-regexp'.
Use `org-outline-regexp' or `org-outline-regexp-bol' instead.

* org-toc.el (org-toc-before-first-heading-p, org-toc-show)
(org-toc-get-headlines-status): Use `org-outline-regexp-bol'.

* org-lparse.el (org-do-lparse): Use `org-outline-regexp-bol'.

* org-export-generic.el (org-export-generic): Use
`org-outline-regexp'.
2011-07-18 09:42:16 +02:00
Bastien Guerry c3748fcd80 Don't use `outline-regexp' anymore.
Use `org-outline-regexp' instead or `outline-regexp'.  Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.

* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.

* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.

* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.

* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.

* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.

* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.

* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.

* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.

* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.

* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
2011-07-18 09:42:11 +02:00
Nicolas Goaziou d243679491 Fix cookies update with recursive COOKIE_DATA property
* lisp/org.el (org-update-parent-todo-statistics): COOKIE_DATA should
  be checked for parent, not current headline. Also, this function
  doesn't need to be interactive.
2011-07-18 02:20:00 +02:00
Nicolas Goaziou f7f2394448 org-list: clean left-over markers
* lisp/org-list.el (org-list-send-item, org-list-struct-apply-struct,
  org-apply-on-list, org-toggle-checkbox): make markers point nowhere
  when they have become useless.
2011-07-18 00:57:01 +02:00
Nicolas Goaziou 054230b138 org-list: never add useless blank lines when inserting an item
* lisp/org-list.el (org-list-insert-item): when insertion point is in
  some white line after the end of the list, remove all unnecessary
  white lines there before proceeding. Also refactor a snippet of
  code.
2011-07-17 22:54:21 +02:00
Bastien Guerry 46a5bde601 org-latex.el: change image default option to .9\linewidth.
* org-latex.el (org-export-latex-image-default-option): Change
default value.

Thanks to Sebastien Vauban for this suggestion.
2011-07-17 08:32:20 +02:00
Bastien Guerry 5dec19fe5b * org.el (org-refile): minor rewriting. 2011-07-17 08:16:59 +02:00
Nicolas Goaziou c59da42c4e Fix fontification error
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): blocks cannot be
  correctly fontified when the buffer is missing a final newline.
2011-07-17 00:48:36 +02:00
Bastien Guerry b9d5e7e85e org-latex.el: Bugfix: run export commands from the right buffer. 2011-07-16 19:08:40 +02:00
Bastien Guerry b93da58e1f ob.el: Bugfix about `nil' body variable when parsing block.
* ob.el (org-babel-strip-protective-commas): Return `nil'
instead of an error if no argument is given.
(org-babel-parse-src-block-match): Make sure body is defined
in the let construct.
2011-07-16 18:40:36 +02:00
Bastien Guerry 4c714198b4 ob-clojure.el: cosmetic reformatting of a defun. 2011-07-16 15:07:23 +02:00
Jon Anders Skorpen 920cf53e68 org-publish: Fix regexp for include files
* org-publish.el (org-publish-cache-file-needs-publishing): Regexp did
  not find includes with double quoted file names.

TINYCHANGE
2011-07-16 15:01:11 +02:00
Michael Markert 31effac797 Fix problem with autoloads. 2011-07-16 14:58:53 +02:00
Nicolas Goaziou 4ae030e027 org-footnote: fix some comment strings 2011-07-16 10:45:40 +02:00
Nicolas Goaziou 6d9e90454f org-footnote: don't insert footnote section without footnotes
* lisp/org-footnote.el (org-footnote-normalize): footnote section
  should be inserted only if there are footnotes to insert.
2011-07-16 10:43:46 +02:00
Nicolas Goaziou 86418aad12 org-footnote: fix compiler warning
Thanks to Matthew Sauer for catching this.
2011-07-16 09:24:59 +02:00
Nicolas Goaziou b824725df1 org-footnote: fix problem with normalize in message-mode
* lisp/org-footnote.el (org-footnote-at-definition-p,
  org-footnote-normalize): do not grab signature in the definition of
  the last footnote.
2011-07-15 19:24:59 +02:00
Eric Schulte def5a2f567 test: updated babel tangling test to reflect body-parsing change 2011-07-15 09:31:36 -06:00
Eric Schulte 8834bde39f ob: strip *single* trailing newline from code block bodies 2011-07-15 09:26:43 -06:00
Eric Schulte 407b87e9d9 org-bibtex: trimming whitespace off of bibtex fields read from properties
* lisp/org-bibtex.el (org-babel-trim): Declare this function to the
  compiler.
  (org-bibtex-get): Trimming whitespace off of bibtex fields read from
  properties.
2011-07-15 09:03:21 -06:00
Achim Gratz 74e333cb21 remove documentation for removed make target install-info-debian
* Makefile: also remove the documentation explaining the use of target
  install-info-debian, which was removed previously

TINYCHANGE
2011-07-14 17:51:14 +02:00
Nicolas Goaziou 9495979cdd org-footnote: fix doc-string typo 2011-07-14 09:49:50 +02:00
Nicolas Goaziou 31e92984bc Correctly export lists in footnotes (take 2)
* lisp/org-exp.el (org-export-preprocess-string): add the possibility
  to call recursively the function. Also change order of some function
  calls. Comment export process for footnotes.
* lisp/org-footnote.el (org-footnote-normalize): change the export
  specific parameter to hold properties of export. Thus, the function
  can send every footnote definition in the buffer through
  `org-export-process-string'.
2011-07-13 18:15:52 +02:00
Bastien Guerry 14ba8ebc28 doc/org.texi: Fix tiny typo. 2011-07-13 12:22:37 +02:00
Bastien Guerry 22fa9bf222 org.texi (Special agenda views): Fix double quoting (bug#3509).
Patch by Lars Magne Ingebrigtsen taken from emacs latest bzr repo.
2011-07-12 16:56:11 +02:00
Nicolas Goaziou 743e3e7fcc org-latex: fix interpreted latex commands and snippets in footnotes
* lisp/org-latex.el (org-export-latex-preprocess): first insert
  footnotes in the temporary buffer so their contents can properly be
  protected from further transformations if required.
2011-07-12 11:54:32 +02:00
Nicolas Goaziou ddff0a8f8c Document circular motions and sub-lists offset 2011-07-12 09:12:48 +02:00
Nicolas Goaziou 108bd48e25 org-list: introduce a variable to distinguish sub-items better
* lisp/org-list.el (org-list-indent-offset): new variable.
(org-list-struct-fix-ind): make use of the new variable.
2011-07-12 09:12:19 +02:00
Nicolas Goaziou aad4a7d4d3 Complete default values for check-boxes in LaTeX exporter
* lisp/org-latex.el (org-export-latex-list-parameters): complete
  default value with cbtrans option.
* lisp/org-list.el (org-list-to-latex): set a more consistent default
  value.
2011-07-12 09:12:19 +02:00
Nicolas Goaziou 90ef02a02b org-list: move and rename org-list-exchange-items
* lisp/org-list.el (org-list-swap-items): move it to a meaningful
  position in source code (i.e. before any function using it), and
  rename it to an easier name.
2011-07-12 09:12:19 +02:00
Nicolas Goaziou 688a29c0d6 org-list: change heuristics for number of lines separating items
* lisp/org-list.el (org-list-separating-blank-lines-number): if there
  are blank lines already in the whole list, add a blank line.
2011-07-12 09:12:19 +02:00
Nicolas Goaziou 41355053e6 org-list: introduce a variable to consider lists as rings
* lisp/org-list.el (org-list-use-circular-move): new variable.
(org-previous-item, org-next-item): make use of the new variable.
(org-move-item-down, org-move-item-up): make use of the new
variable. Simplify code.
2011-07-12 09:12:13 +02:00
Nicolas Goaziou 6338eb72a6 org-list: add a new method on lists (org-list-send-item)
* lisp/org-list.el (org-list-delete-item, org-list-send-item): new
  functions.
2011-07-12 09:09:34 +02:00
Bastien Guerry 1029a92517 org-agenda.el: New variable for custom bulk action functions.
* org-agenda.el (org-agenda-bulk-custom-functions): New
variable for custom bulk action functions.
(org-agenda-bulk-action): Use it.

Thanks to Julien Cubizolles for triggering this idea.
2011-07-12 08:31:36 +02:00
Bastien Guerry 0b0684aa95 org-latex.el: Delete trailing whitespaces. 2011-07-12 08:31:07 +02:00
Bastien Guerry 2b9afb9e63 org-latex.el: New defcustom `org-export-latex-quotes' to control quotes.
* org-latex.el (org-export-latex-quotes): New defcustom.
(org-export-latex-quotation-marks): Use it.

This allows users to define what quotes they want to use as a
replacement of english double-quotes while exporting to LaTeX.

In particular, if you use the csquote package, you can configure
Org to output something like \endquote{some quoted text} instead
of "some quoted text".

Thanks to Frederik for bringing this issue up, and to Thomas S.
Dye, Nick Dokos and Stefan Nobis for elaborating this solution.
2011-07-12 08:30:34 +02:00
Bastien Guerry 9fc6daa3d2 org-capture.el: Delete trailing whitespace. 2011-07-12 08:29:55 +02:00
Bastien Guerry 17603418ab org-capture.el: Fix bug about insert blank line when aborting.
* org-capture.el (org-capture-finalize): bugfix about
inserted blank line when killing the capture buffer and
`org-blank-before-new-entry' tells to not insert anything
before a heading.

Thanks to Leo for reporting this.
2011-07-12 08:29:02 +02:00
Bastien Guerry 462c0d1e86 org.el: cosmetic changes in docstring. 2011-07-12 00:54:14 +02:00
Bastien Guerry 35323baee5 doc/org.texi: Fix tiny typo. 2011-07-12 00:19:15 +02:00
Achim Gratz ce3431c4b0 remove Makefile target install-info-debian, modify install-info to be compatible
* Makefile: remove target install-info-debian and modify target
  install-info so that it is compatible with the older dpkg version
  of install-info that resides in /usr/sbin and may be picked up
  when root is installing info files

Initial reporting by Jude DaShiell, suggestions for changing Makefile
by Nick Dokos.  The solution implemented re-arranges the arguments to
install-info to be compatible with both the dpkg and GNU version of
the program.  On Debian, /usr/bin/install-info is actually a wrapper
that calls /usr/bin/ginstall-info and issues the following warning
when called as root:

This is not dpkg install-info anymore, but GNU install-info
See the man page for ginstall-info for command line arguments

This warning can be safely ignored since we actually prefer that GNU
install-info is called even though we've arranged the arguments to
be compatible with dpkg install-info.

Tested on openSuSE Tumbleweed, Win7/Pro (both MSys and Cygwin) and by
Jude DaShiell on Debian Squeeze and Slackware.

TINYCHANGE
2011-07-12 00:18:44 +02:00
Eric Schulte 6911f0eb27 doc: expand discussion of the :eval header argument
* doc/org.texi (eval): Expand discussion of the :eval header argument.
2011-07-11 11:47:24 -06:00