Commit Graph

8490 Commits

Author SHA1 Message Date
Carsten Dominik 8404f15647 Clean up the misleading name INCLUDE-ALL in some agenda functions
* lisp/org-agenda.el (org-agenda-include-all-todo): Declare this
option as no longer working.
(org-timeline): Rename the include-all argument to dotodo.
(org-arg-loc): Renamed from` org-include-all-loc'.
(org-agenda-list): Rename the INCLUDE-ALL argument to ARG, because its
function has changed.
2011-08-19 12:41:02 +02:00
Bastien Guerry 1bb83091a9 org.el (org-fixup-indentation): Fix various small bugs.
* org.el (org-fixup-indentation): Fix various small bugs.

Thanks to Sébastien Vauban for reporting them.
2011-08-19 09:41:15 +02:00
Nicolas Goaziou 0c6b67c191 org-indent: changes to the internals of initialization
* lisp/org-indent.el (org-indent-agent-timer,
  org-indent-agentized-buffers, org-indent-agent-resume-timer,
  org-indent-agent-process-duration, org-indent-agent-resume-delay):
  new variables.
(org-indent-initial-marker): more accurate doc-string.
(org-indent-initial-timer, org-indent-initial-resume-timer,
org-indent-initial-process-duration, org-indent-initial-resume-delay,
org-indent-initial-lock): removed variables.
(org-indent-mode): set up an agent to watch current buffer, or add it
to the list of already watched buffers.
(org-indent-initialize-agent): new function.
(org-indent-initialize-buffer): now requires a mandatory buffer
argument.
(org-indent-add-properties): reflect changes to variables. The resume
timer is now global.

This change was introduced because a buffer killed while initializing
couldn't cancel its own initialization timer. Now, a global agent
watches for buffers, starting or resuming their initialization when
appropriate. It can cancel its own timer, thus killing itself, when no
more buffers are being watched.
2011-08-18 23:14:08 +02:00
Jambunathan K 78e59a22d0 Add support for fontification of odt src blocks using htmlfontify
* contrib/lisp/org-lparse.el (org-do-lparse): Bind
hfy-user-sheet-assoc.
* contrib/lisp/org-odt.el
(org-export-odt-default-org-styles-alist): Rename
OrgSourceBlock to OrgSrcBlock for consistency.
(org-odt-format-source-code-or-example): Modified. Call either
org-odt-format-source-code-or-example-plain or
org-odt-format-source-code-or-example-colored.
(org-odt-format-source-code-or-example-plain): New. Identical
to the earlier org-odt-format-source-code-or-example.
(org-odt-format-source-code-or-example-colored): New
defun. Use htmlfontify for emitting coloring of source blocks.
(org-export-odt-use-htmlfontify)
(org-export-odt-create-custom-styles-for-srcblocks): New
customizable variables
(org-src-block-paragraph-format): New variable.
(org-odt-hfy-face-to-css)
(org-odt-insert-custom-styles-for-srcblocks): New defuns.
(org-odt-save-as-outfile): Modified. Use
org-odt-insert-custom-styles-for-srcblocks.
2011-08-19 01:02:00 +05:30
Jambunathan K ad9f393b61 org-odt: Rename style `OrgSourceBlock' to `OrgFixedWidthBlock'
* contrib/odt/styles/OrgOdtStyles.xml: Rename the style
`OrgSourceBlock' to `OrgFixedWidthBlock'.
* contrib/lisp/org-odt.el
(org-export-odt-default-org-styles-alist): Map fixedwidth
paragraphs to the custom style `OrgFixedWidthBlock'.
(org-odt-format-line, org-odt-format-source-code-or-example):
Style both fixedwidth paragraphs and src/example blocks in
fixedwidth format.
2011-08-19 00:38:44 +05:30
Jambunathan K 1ab7fbeb46 org-odt.el: Minor refactoring of src and example block formatters
* contrib/lisp/org-odt.el (org-odt-format-source-code-or-example-line)
(org-odt-format-example): Removed.
(org-odt-format-source-code-or-example, org-odt-format-line);
Changes related to above removal.
2011-08-19 00:38:35 +05:30
Jambunathan K 321f4d3a42 Introduce a new customizable variable org-export-odt-prettify-xml
* contrib/lisp/org-odt.el (org-export-odt-prettify-xml): New
customizable variable.
(org-odt-save-as-outfile): Honor the setting of the above
variable.

There have not been much reported issues with the odt output.  So turn
off prettifying of xml buffers.  But retain the option to turn it on
if required.
2011-08-19 00:38:25 +05:30
Jambunathan K a2e6a7ef90 Minor cleanups in org-odt
* contrib/lisp/org-odt.el (org-odt-format-spaces): Minor
change. Always emit a leading space.
(org-odt-fill-tabs-and-spaces): Simplify.
(org-odt-finalize-outfile): Remove a stray message.
2011-08-19 00:38:16 +05:30
Nicolas Goaziou 300b2e8f4e org-footnote: normalize function cleanup
* lisp/org-footnote.el (org-footnote-normalize): refactor, and fix
  some blank lines deletion.
2011-08-18 20:18:24 +02:00
Nicolas Goaziou c4d482b269 org-indent: forgot to make a variable local
* lisp/org-indent.el (org-indent-mode):
  `org-indent-initial-resume-timer ' needs to be local.
2011-08-18 19:06:33 +02:00
Bastien Guerry 0538dd3188 Fix some double-space after ponctuation mark in docstrings. 2011-08-18 18:38:05 +02:00
Bastien Guerry 6b04befa48 org.el (org-fixup-indentation): Correctly indent meta lines.
* org.el (org-fixup-indentation): Correctly indent meta lines.

Thanks to Sébastien Vauban for reporting this.
2011-08-18 18:18:04 +02:00
Nicolas Goaziou 74cca9f57e org-indent: silence byte-compiler 2011-08-18 15:46:09 +02:00
Nicolas Goaziou b3f462a94b org-indent: add virtual indentation for blank lines
* lisp/org-indent.el (org-indent-set-line-properties): add text
  properties down to the beginning of the next line.
(org-indent-add-properties): when last position to add properties to
is at the beginning of a line, all that line will have properties.
2011-08-18 15:45:02 +02:00
Nicolas Goaziou 84faa05c1b org-indent: add breaks during asynchronous indentation
* lisp/org-indent.el (org-indent-initial-resume-timer): new variable.
(org-indent-initialize-buffer): also resume after a small break.
(org-indent-add-properties): when in asynchronous mode, proceed for
2 seconds, then take a break.
2011-08-18 15:45:02 +02:00
Nicolas Goaziou b9962b7829 org-indent: externalize a function for better code readability
* lisp/org-indent.el (org-indent-set-line-properties): new function.
(org-indent-add-properties): externalize worker function.
2011-08-18 15:45:02 +02:00
Nicolas Goaziou d40643f949 org-indent: `org-indent-indent-buffer' acts on accessible part of buffer.
* lisp/org-indent.el (org-indent-indent-buffer): take into account narrowing.
2011-08-18 15:45:02 +02:00
Nicolas Goaziou 4d780baa11 org-indent: corrections to comments and doc-strings 2011-08-18 15:45:02 +02:00
Nicolas Goaziou ff5a081002 org-indent: refactoring 2011-08-18 15:45:01 +02:00
Nicolas Goaziou 4ef4bcd533 org-indent: handle more modifications of headlines
* lisp/org-indent.el (org-indent-modified-headline-flag): renamed from
  `org-indent-deleted-headline-flag'
(org-indent-notify-modified-headline): renamed from
`org-indent-notify-deleted-headline'. Handle situations when the stars
of an headline are modified.
(org-indent-refresh-maybe): remove case now handled by previous function.
(org-indent-mode): apply renames.
2011-08-18 15:45:01 +02:00
Nicolas Goaziou 0fd4c59367 Cleaner handling of inline tasks under org-indent-mode
* lisp/org-indent.el (org-indent-inlinetask-first-star): new variable.
(org-indent-add-properties): set the first star of inline-tasks'
virtual indentation in `org-warning' face.
* lisp/org-inlinetask.el (org-inlinetask-insert-task): create a new
  inline-task slightly differently, so virtual indentation can be
  applied normally.
2011-08-18 15:45:01 +02:00
Nicolas Goaziou acd6ed2140 org-indent: implement asynchronous initialization
* lisp/org-indent.el (org-indent-initial-marker,
  org-indent-initial-timer, org-indent-initial-lock): new variables.
(org-indent-mode): at initialization, start an idle timer to indent
the whole buffer. When the user is asking for control, interrupt the
process, and resume at the same point when idle again.
(org-indent-initialize-buffer): new function.
(org-indent-add-properties): throw an interrupt when indentation of
buffer is stopped during initialization.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou 9479991d4c org-indent: modify messages sent
* lisp/org-indent.el (org-indent-indent-buffer): send more appropriate
  messages .
2011-08-18 10:41:31 +02:00
Nicolas Goaziou a7600032d0 org-indent: remove unused variable org-indent-outline-re
* lisp/org-indent.el (org-indent-notify-deleted-headline,
  org-indent-refresh-maybe): replace `org-indent-outline-re' with
  `org-outline-regexp-bol'.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou b955d7539f org-indent: pay attention to org-indent-max and org-indent-max-levels
* lisp/org-indent.el (org-indent-max-levels): modify default value and
  add comment.
  (org-indent-add-properties): pay attention to org-indent-max and
  org-indent-max-levels values.
  (org-indent-refresh-maybe): refactor code to avoid an unnecessary
  save excursion.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou a968b8c76f org-table: remove a now useless hack
* lisp/org-table.el (org-table-align): remove now useless hack.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou 818c449e2c org-indent: remove refresh timer
* lisp/org-indent.el (org-indent-fix-section-after-idle-time): remove
  variable.
  (org-indent-initialize): remove timer.
  (org-indent-add-properties): refactor code.
  (org-indent-refresh-subtree, org-indent-refresh-section,
  org-indent-refresh-buffer,org-indent-set-initial-properties): remove
  functions.
  (org-indent-deleted-headline): new variable.
  (org-indent-notify-deleted-headline,org-indent-refresh-maybe): new
  functions.
  (org-indent-mode): insert new functions into a hook.
2011-08-18 10:41:31 +02:00
Nicolas Goaziou 4771caa09c Improve compatibility between org-indent-mode and visual-line-mode
* lisp/org-indent.el (org-indent-mode): completely refresh buffer
  before starting org-indent-mode. Also set idle timer to refresh only
  visible portion of buffer, and refresh the subtree instead of
  section when promoting or demoting it.
  (org-indent-add-properties): rewrite function to proceed line by
  line, as required by `wrap-prefix' specificity.
  (org-indent-refresh-section,org-indent-refresh-subtree): refactor.
  (org-indent-refresh-view): new function.
  (org-indent-refresh-to, org-indent-refresh-section): removed
  functions.
* lisp/org.el (org-unfontify-region): do not remove prefix properties
  when unfontifying a region.
2011-08-18 10:41:30 +02:00
Bastien Guerry 3100838dcc org-colview.el: Correctly remove leading stars.
* org-colview.el (org-columns-cleanup-item): Correctly remove
leading stars in items displayed in the agenda column view.

Thanks to Christian Schmidt for spotting this.
2011-08-18 09:14:44 +02:00
Bastien Guerry 9f337ee06c org-clock.el: remove `org-clocktable-sort-clock-data'.
This function by Max Mikhanosha was added accidently.  We are
waiting for the FSF to process Max copyright assignement to get
this function in org-mode.

Thanks to Achim Gratz for spotting at this.
2011-08-18 09:00:20 +02:00
Bastien Guerry 2edd05eaac org-colview: Clean up items in agenda mode too.
* org-colview.el (org-columns-display-here): Clean up items in
org-agenda-mode too.
(org-columns-cleanup-item): Take a new argument CPHR to allow
passing a complex heading regexp.  Rewrite to cleanup ITEM
correctly in `org-agenda-mode'.

Thanks to Christian Schmidt for pointing at this problem.
2011-08-17 16:56:27 +02:00
Bastien Guerry 8c3ecbe39a Move three functions and add appropriate require/declarations.
* org-clock.el (org-duration-string-to-minutes)
(org-minutes-to-hh:mm-string, org-hh:mm-string-to-minutes):
Move from org.el.
2011-08-17 16:08:02 +02:00
Bastien Guerry a472bee33d org-footnote.el: silence byte-compiler. 2011-08-17 16:05:11 +02:00
Bastien Guerry 95d0c42c5a Use correct name for the function `yas/next-field'.
org.texi (Conflicts): Use correct name for the function
`yas/next-field'.

Thanks to Bianca Lutz for pointing this.
2011-08-17 15:22:23 +02:00
Bastien Guerry ea055d3e6d org.el: Minor update of docstrings.
(org-open-at-mouse): Point to the docstring of `org-open-file'
for more details.
(org-open-file): Mention `org-link-frame-setup' in the
docstring.

Thanks to Reiner Steib for pointing at this.
2011-08-17 15:15:35 +02:00
Bastien Guerry 13bf859c97 org.texi: Add a note about the `org-link-frame-setup' option.
* org.texi (Handling links): Add a note about the
`org-link-frame-setup' option.

Thanks to Reiner Steib for pointing at this.
2011-08-17 15:10:07 +02:00
Bastien Guerry 4774b1b026 org.el: Allow to customize the way links are displayed.
(org-link-display-descriptive): New option to customize the
default display of links, either literal or descriptive.
(org-toggle-link-display): New command to toggle link display.
(org-org-menu): Use the new toggle function for links.

Thanks to Reiner Steib for suggesting this.
2011-08-17 15:01:54 +02:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
Also remove blank lines before the ";;; org*el ends here" declarations.

Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.

Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
2011-08-17 14:42:34 +02:00
Bastien Guerry c25165c25d org-refile: New option `org-refile-active-region-within-subtree'.
* org.el (org-refile-active-region-within-subtree): New option
to allow refiling a region that is part of a subtree without
containing a subtree itself.  This default to `nil'.
(org-refile): Use the new option.  Put point at the beginning
of the region/subtree to be refiled, so that users understand
what will be refiled.  Also improve the prompt to tell whether
the user is refiling a region or a headline.

Thanks to Jeff Horn for raising the issue of refiling a list item,
and to Nicolas Goaziou, Nick Dokos and Suvayu Ali for discussing
them patiently.  The discussion led to these changes.
2011-08-17 11:20:42 +02:00
Bastien Guerry 163cc38986 org.el: minor fix: delete trailing whitespaces. 2011-08-17 11:12:43 +02:00
Bastien Guerry eb4b035815 New option `org-properties-postprocess-alist'.
* org.el (org-properties-postprocess-alist): New option to
allow postprocessing the values of properties set through
`org-set-property'.
(org-set-property): Use this option.

This is inspired by a request from Pascal Mattia.
2011-08-17 11:11:41 +02:00
Bastien Guerry 436290bfab org.el (org-outline-regexp, org-outline-regexp-bol): Add a docstring.
* org.el (org-outline-regexp, org-outline-regexp-bol): Add a
docstring.
2011-08-17 11:05:23 +02:00
Bastien Guerry d13476b918 org-archive.el: Use `org-outline-regexp' instead of `outline-regexp'.
* org-archive.el (org-archive-to-archive-sibling): Use
`org-outline-regexp' instead of `outline-regexp'.
2011-08-17 11:05:03 +02:00
Nicolas Goaziou 7a826e09b1 fix code typo 2011-08-17 03:15:22 +02:00
Nicolas Goaziou 430b73b90c Minor fix to org-between-regexps-p
* lisp/org.el (org-between-regexps-p): searching up to pos may match
  again beginning regexp.
2011-08-17 03:11:18 +02:00
Nicolas Goaziou 4178a154f3 org-footnote: do not suggest bindings outside Org
* lisp/org-footnote.el (org-footnote-goto-definition): don't send
  erroneous message: suggested bindings might not be set outside Org.
2011-08-16 23:20:33 +02:00
Nicolas Goaziou 6815e30b62 org-footnote: refactor code 2011-08-16 23:20:33 +02:00
Nicolas Goaziou a8d621c3da org-footnote: remove every footnote tag when normalizing non Org buffers
* lisp/org-footnote.el (org-footnote-normalize): effectively remove
  any footnote tag in non Org buffers, as detailled in
  org-footnote-tag-for-non-org-mode-files doc-string.
2011-08-16 23:20:33 +02:00
Nicolas Goaziou baf7dde28e org-footnote: allow non Org mode files to have no footnote tag
* lisp/org-footnote.el (org-footnote-tag-for-non-org-mode-files):
  notify the opportunity to set the variable to the empty string.
(org-footnote-normalize, org-footnote-create-definition): carefully
  check for inserted newlines and presence of the footnote
  tag.
2011-08-16 23:20:33 +02:00
Nicolas Goaziou cb906e4406 org-footnote: re-use global regexps when possible
* lisp/org-footnote.el (org-footnote-at-definition-p): re-use
  org-footnote-definition-re.
2011-08-16 23:03:04 +02:00