Commit Graph

9239 Commits

Author SHA1 Message Date
Bastien Guerry b120a7b35d Add a note about :noweb-ref.
Thanks to Tomas Grigera for a preliminary patch.
2012-01-02 15:28:07 +01:00
Bastien Guerry 59bd41a907 More small fixes on `C-u C-c C-c' and checkboxes.
* org.el (org-ctrl-c-ctrl-c): Preserve symmetry when adding
and removing checkboxes with `C-u C-c C-c' on the first item
of a list.  Also, don't reinitialize checkboxes that are
already ticked.

Thanks to Nicolas Goaziou for these fixes.
2011-12-31 18:20:30 +01:00
Bastien Guerry 4752725b64 Revert "Fix problem with `org-ctrl-c-ctrl-c' on the checkbox of the first item."
This reverts commit 4789bb5a79.
2011-12-31 18:13:23 +01:00
Bastien Guerry 4fc96782dd Be a bit more flexible when matching time values in timestamps.
* org.el (org-ts-regexp0, org-ts-regexp1): Also match a time
value with only one digit for the hours.

Thanks to François Pinard for mentioning this.
2011-12-31 17:57:47 +01:00
Bastien Guerry f9293eae2a Document the new behavior of `C-u C-c C-c' on checkboxes.
* org.texi (Checkboxes): Document the new behavior of `C-u C-c
C-c' on checkboxes.
2011-12-31 17:47:53 +01:00
Bastien Guerry 4789bb5a79 Fix problem with `org-ctrl-c-ctrl-c' on the checkbox of the first item.
* org.el (org-ctrl-c-ctrl-c): Don't make `C-c C-c' special
when ticking the checkbox of the first item.
2011-12-31 17:41:23 +01:00
Nicolas Goaziou 8c19c76d2e org-list: Change behaviour of C-c C-c at a list item with an argument
* lisp/org-list.el (org-list-write-struct): Add an optional argument
  for structure changes happening outside the function.
* lisp/org.el (org-ctrl-c-ctrl-c): Now, C-u C-c C-c on the first item
  of a sub-list should toggle check-box presence of every item in the
  same sub-list.  Also fix check-box insertion on a single item.
2011-12-31 17:35:37 +01:00
Bastien Guerry 4f8d383769 Merge branch 'filter-by-cat' 2011-12-31 17:12:05 +01:00
Bastien Guerry 8c36e92f88 Implement category filtering.
* org-agenda.el (org-agenda-filter-preset): New alias.
(org-agenda-filter-by-category): New command.
(org-agenda-mode-map): Add the new command.
(org-agenda-custom-commands-local-options): Add category
filter preset.
(org-agenda-mark-filtered-text): Mark both tag and filter
overlays.
(org-agenda-category-filter-preset): New variable.
(org-finalize-agenda, org-agenda-redo)
(org-agenda-filter-make-matcher, org-agenda-filter-apply):
Handle both category and tag filters.
(org-agenda-filter-show-all-tag): Rename from
`org-agenda-filter-by-tag-show-all'.
(org-agenda-filter-show-all-cat): New function.
(org-agenda-set-mode-name): Show the category filter in the
modeline.

* org-faces.el (org-agenda-filter-category): New face.

* org.texi (Agenda commands): Update documentation about the
new category filtering feature.

This feature has been requested by several people -- thanks
to all of them for mentioning this possibility.
2011-12-31 17:10:44 +01:00
Carsten Dominik 5e11e51efe Make Org work with bbdb 3.0
* lisp/org-bbdb.el (org-bbdb-old): New variable.
(org-bbdb-store-link):
(org-bbdb-open): Check for `org-bbdb-old'.
(org-bbdb-open-old):
(org-bbdb-open-new): New functions.

Patch by Ivan Kanis
2011-12-31 17:04:27 +01:00
Carsten Dominik 4e0fe88f7e Merge branch 'master' of orgmode.org:org-mode 2011-12-31 15:24:14 +01:00
Carsten Dominik 23bdbffb4c Revert "Honour existing restrictions when regenerating the agenda"
This reverts commit 9b250f8e09.
2011-12-31 15:23:54 +01:00
Carsten Dominik 21e99fedc4 Revert "Honour existing restrictions when clocking in from the agenda"
This reverts commit fc1f01c54e.
2011-12-31 15:23:43 +01:00
Carsten Dominik a954f0e01a Revert "Honour existing restrictions when visiting tasks from the agenda"
This reverts commit 31d003ad28.
2011-12-31 15:23:23 +01:00
Bastien Guerry 112d128180 org-agenda.el: Small code cleanup.
* org-agenda.el (org-batch-agenda, org-batch-agenda-csv):
Remove deleted function `org-encode-for-stdout'.
2011-12-31 13:31:02 +01:00
Bastien Guerry e5d5a1e721 org.el: New command `org-check-dates-range'.
* org.el (org-check-dates-range): New command.
(org-sparse-tree): Use it.

Thanks to Marc-Oliver Ihm for discussions and code
about similar features.
2011-12-31 13:20:45 +01:00
Bastien Guerry 855213f481 Rename `org-write-agenda' to `org-agenda-write'.
* org-agenda.el (org-agenda-write): Rename from
`org-write-agenda'.
(org-agenda-mode-map, org-agenda-menu)
(org-batch-store-agenda-views): Use new name
`org-agenda-write'.
2011-12-31 12:45:05 +01:00
Bastien Guerry 72915f1c52 org.el: Honor 'start-level for `org-loop-over-headlines-in-active-region'.
* org.el (org-loop-over-headlines-in-active-region): Fix
docstring.
(org-todo, org-deadline, org-schedule): Honor the 'start-level
value of `org-loop-over-headlines-in-active-region'.
2011-12-31 12:08:54 +01:00
Bastien Guerry 79bf3ed861 Fix bug about looping over archiving commands.
* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag):
Bugfix: use 'region-start-level.
2011-12-31 12:06:43 +01:00
Bastien Guerry 6805c702ec org.el (org-show-context): Complete docstring.
* org.el (org-show-context): Complete docstring.

Thanks to Michael Heerdegen for mentioning this.
2011-12-31 11:47:50 +01:00
Bastien Guerry e9633aeb45 org-agenda.el: Use `read-char-exclusive' instead of `read-char'.
* org-agenda.el (org-agenda-filter-by-tag): Use
`read-char-exclusive' instead of `read-char'.
2011-12-31 11:45:54 +01:00
Bastien Guerry 64e8b941a8 Merge branch 'master' of orgmode.org:org-mode 2011-12-31 09:30:59 +01:00
Bastien Guerry d1b5b65c47 Merge branch '5-org-todo-loop' 2011-12-31 09:30:13 +01:00
Bastien Guerry a6c95474d3 Merge branch '3-org-archive-loop' 2011-12-31 09:29:28 +01:00
Bastien Guerry 6b5c0bd0b6 Merge branch '2-org-agenda-write-buffer-name' 2011-12-31 09:29:09 +01:00
Bastien Guerry 48ecbb4547 Merge branch '1-export-date-timestamp-format' 2011-12-31 09:28:45 +01:00
Carsten Dominik 4a0cb0dbd1 Fix bug in mapper function
* lisp/org.el (org-scan-tags): Make sure org-map-continue-from is nil
at each match
2011-12-31 09:26:56 +01:00
Bernt Hansen 31d003ad28 Honour existing restrictions when visiting tasks from the agenda
* lisp/org-agenda.el (org-agenda-switch-to): Widen org buffer only if point is
  outside the current restriction

Widen org buffer when visiting from agenda only if point is outside
current restriction.

Visiting a task with RET or TAB in the agenda should not affect the
org-mode buffer restriction unless the target task is not currently
visible due to the restriction.
2011-12-31 09:10:36 +01:00
Bernt Hansen fc1f01c54e Honour existing restrictions when clocking in from the agenda
* lisp/org-agenda.el (org-agenda-clock-in): Save restriction when clocking in from the agenda

Narrowed org buffers are now retained when clocking in from the agenda.
We only widen the buffer when the task to clock in is outside the existing
restriction.
2011-12-31 09:10:25 +01:00
Bernt Hansen 9b250f8e09 Honour existing restrictions when regenerating the agenda
* lisp/org.el: Honour existing restrictions when regenerating the agenda

Narrowed org buffers are now retained when regenerating the agenda
with org-agenda-redo
2011-12-31 09:10:05 +01:00
Carsten Dominik 746bd50327 Fix clock regexps
* lisp/org-clock.el (org-clock-in):
(org-clock-find-position): Remove erraneous space in regexp

Patch by Joe Vornehm Jr.

TINYCHANGE
2011-12-31 09:05:11 +01:00
Bastien Guerry c434f7171e Fix tiny typos.
Those have been fixed by Paul Eggert in Emacs first.
2011-12-31 08:59:49 +01:00
Bastien Guerry 3a1c4d89b8 Fix typos.
Fixes already done in Emacs by Paul Eggert.
2011-12-31 00:38:06 +01:00
Jambunathan K 59074ab3bb org-odt.el: Trivial change 2011-12-31 02:21:22 +05:30
Jambunathan K ca47d10e1f org-odt.el: Re-arrange code
Initialize`org-export-odt-schema-dir' *before* initializing
`org-odt-styles-dir'.  This re-arrangement prevents the warning message that
notifies the user of missing OpenDocument schema files not lurk around in
the echo area like a sore-thumb.
2011-12-31 01:11:41 +05:30
Jambunathan K 07f006e4fd Fix packaging of ODT exporter (org-7.8.02) in Gentoo
* org-odt.el (org-odt-lib-dir): Add docstring.
(org-odt-data-dir): New variable.  Use this variable to
control the locations from which the ODT exporter picks the
OpenDocument styles and schema files from.  Set this variable
explicitly only if the in-built heuristics for locating the
above files fails.
(org-odt-styles-dir-list, org-odt-schema-dir-list): New
variables.  Pay specific attention to (eval-when-compile ...)
form through which Makefile's $(datadir) - contained in
`org-odt-data-dir' - gets compiled in as a "hard coded"
constant.
(org-odt-styles-dir, org-export-odt-schema-dir): Add messages
to aid debugging.

* Makefile (etcdir): Remove this.
(stylesdir): Rename to datadir.
(datadir): Was stylesdir.
(STYLESFILES): Rename to DATAFILES.
(DATAFILES): Was STYLESFILES.  Offer a menu of files that is
available.  Package maintainers can use this list and their
own discretion to cherry-pick what they are willing to install
in their distribution.
(CP): Add recursive flag so that directories listed in
DATAFILES can be copied enbloc.
(install-lisp): Use conditional flag BATCH_EXTRA
(BATCH_EXTRA): "Target-specific variable value" that plumbs
the value of $(datadir) in to org-odt.el via
`org-odt-data-dir'.  See ChangeLog entries for
`org-odt-styles-dir-list' and `org-odt-schema-dir-list'.
(BATCH): Add BATCH_EXTRA.
(lisp/org-odt.elc): Force re-generation of this target every
time so that $(datadir) gets plumbed in to org-odt.el through
`org-odt-data-dir'.
(org-odt-data-dir): "FORCE" target.  Also a variable defined
in org-odt.el.
(install-etc): Rename this target to install-data.
(install-data): Was install-etc.

Fix for the following report:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00799.html

Ulrich Mueller <ulm@gentoo.org> writes:
  In Gentoo we have an issue with the location of the
  OpenDocument style files, reported to us in bug 396269 [1].

  When org-mode is installed as a separate Gentoo package, its
  lisp files are installed in
  /usr/share/emacs/site-lisp/org-mode/.  According to our
  policy, non-lisp files would go to
  /usr/share/emacs/etc/org-mode/. We would pass this as the
  "etcdir" parameter to "make install", so the odt style files
  would be installed in stylesdir =
  /usr/share/emacs/etc/org-mode/styles/.

  Now org-odt.el currently defines org-odt-styles-dir in a
  defconst, and it searches only in ../etc/styles/,
  ./etc/styles/, and ./etc/org/ relative to lispdir. Obviously
  it cannot find the files in the Gentoo location.

  [1] <https://bugs.gentoo.org/show_bug.cgi?id=396269>
2011-12-31 01:11:33 +05:30
Bastien Guerry 834d9514bd Handle 'start-level value of `org-loop-over-headlines-in-active-region' for archiving commands.
* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag)
(org-archive-set-tag): Handle the 'start-level value for
`org-loop-over-headlines-in-active-region'.
2011-12-30 11:13:45 +01:00
Bastien Guerry dec7efc414 New allowed value 'start-level for `org-loop-over-headlines-in-active-region'.
* org.el (org-scan-tags): New parameter `start-level' to
scan only through headlines of that level.
(org-map-entries): New allowed value `region-start-level' for
the `scope' parameter, to allow scanning through headlines of
the same level than the first headline in the region.
(org-loop-over-headlines-in-active-region): New allowed value
'start-level.

This change gives more flexibility when looping over the active
region for commands like `org-schedule', `org-deadline', etc.
By setting `org-loop-over-headlines-in-active-region' to
̀start-level', those command will act upon headlines that are
of the same level than the first one in the region.
2011-12-30 11:09:26 +01:00
Bastien Guerry 361261b048 Allow to loop over active region for more archive commands.
* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-archive-set-tag)
(org-toggle-archive-tag): Allow to loop over the active region
by using `org-loop-over-headlines-in-active-region'.
2011-12-30 08:52:05 +01:00
Bastien Guerry e621dfc36a Let `org-todo' loop over the active region.
* org.el (org-todo): Allow to loop over the active region by
using `org-loop-over-headlines-in-active-region'.
2011-12-30 07:09:47 +01:00
Eric Schulte 18708a2b5a Resolve :noweb-ref when set at the property level during noweb expansion
* lisp/ob.el (org-babel-expand-noweb-references): Rather than using a
  pure regexp solution to resolve noweb references, actually check the
  information of every code block in the buffer.  This will cause a
  slowdown in noweb reference expansion, but is necessary for correct
  behavior.
2011-12-29 12:51:03 -07:00
Nicolas Goaziou 44bd38556c contrib/lisp/org-element.el: Fix docstrings 2011-12-29 19:41:16 +01:00
Bastien Guerry 88ef5fe272 org.el (org-map-continue-from): Fix typo in docstring.
* org.el (org-map-continue-from): Fix typo in docstring.
2011-12-29 17:46:47 +01:00
Jambunathan K 966d1e2b93 OrgOdtContentTemplate.xml: table-cells are now top aligned by default
* etc/styles/OrgOdtContentTemplate.xml (OrgTblCell): Modify
style:vertical-align attribute to top.
(OrgTblCell*): Inherit from OrgTblCell.
(Custom*TableCell): Force style:vertical-align to top.

See http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00780.html
2011-12-29 16:30:24 +05:30
Bastien Guerry 81f907c9f9 New variable `org-agenda-write-buffer-name'.
* org-agenda.el (org-agenda-write-buffer-name): New variable.
(org-write-agenda): Use it.

Setting this variable through `org-agenda-exporter-settings' can
be useful -- thanks to Konstantin Ziegler for mentioning this need.
2011-12-28 18:07:35 +01:00
Bastien Guerry e9e249ea49 New option `org-export-date-timestamp-format'.
* org-exp.el (org-export-date-timestamp-format): New option to
define the way a timestamp in #+DATE will be exported.
(org-infile-export-plist): Use the new option.

Thanks to Torsten Wagner for this idea.
2011-12-28 17:12:25 +01:00
Bastien Guerry 371b0cf9aa org-drill.el: fix a few wrong :type spec.
* org-drill.el (org-drill-leech-method, org-drill-scope)
(org-drill-spaced-repetition-algorithm): Fix wrong :type spec.

Thanks to Joost Kremers for spotting this.
2011-12-26 15:40:02 +01:00
Bastien Guerry 80dd8f47f0 org-element.el: Added "This file is not part of GNU Emacs". 2011-12-26 15:34:36 +01:00
Bastien Guerry 39cac2bd2a org.el: Also match cumulating properties like ":prop+:".
* org.el (org-property-re): Also match cumulating properties
like ":prop+:".

Thanks to Christoph LANGE for spotting this.
2011-12-26 15:12:39 +01:00
Sebastien Vauban 8e1eeaa190 Fix old-way variable assignments. 2011-12-26 14:42:22 +01:00