Commit Graph

322 Commits

Author SHA1 Message Date
Bastien Guerry 65440264de Update contrib/README and some comments/messages
* org-faces.el (org-column): Update docstring.
* org-colview.el: Update error message.
2013-03-04 18:36:34 +01:00
Bastien Guerry 372a3ecda8 New compatibility macro `org-with-silent-modifications'
* org-macs.el: Don't define `with-silent-modifications' for
emacsen that don't have it.

* org-compat.el (org-with-silent-modifications): New
compatibility macro.

* org.el (org-refresh-category-properties)
(org-refresh-properties, org-entry-blocked-p)
(org-agenda-prepare-buffers):
* org-indent.el (org-indent-remove-properties)
(org-indent-add-properties):
* org-colview.el (org-columns-display-here)
(org-columns-remove-overlays, org-columns-quit)
(org-columns-edit-value, org-columns-compute-all)
(org-columns-compute, org-agenda-colview-compute):
* org-clock.el (org-clock-sum): Use the compatibility macro
`org-with-silent-modifications' instead of
`with-silent-modifications'.

Thanks to Achim for a preliminary patch.
2013-02-25 11:44:27 +01:00
Bastien Guerry 43c8aa02cc Use `with-silent-modifications' instead of `org-unmodified' when it makes sense
* org-macs.el: Add a comment on when to use `org-unmodified'
and when to use `with-silent-modifications'.

* org-colview.el (org-columns-display-here)
(org-columns-remove-overlays, org-columns-quit)
(org-columns-edit-value, org-columns-compute-all)
(org-columns-compute, org-agenda-colview-compute):
* org-clock.el (org-clock-sum):
* org.el (org-refresh-category-properties)
(org-refresh-properties, org-entry-blocked-p)
(org-agenda-prepare-buffers): Use `with-silent-modifications'
instead of `org-unmodified'.

Thanks to Stefan Monnier for reminding me about `with-silent-modifications'!
2013-02-23 14:57:51 +01:00
Bastien Guerry 5fc740a230 Merge branch 'maint' 2013-01-08 15:04:40 +01:00
Bastien Guerry 72bc144c15 Update Copyright lines to match Emacs format. 2013-01-08 15:04:32 +01:00
Bastien Guerry 60b23bdeac Merge branch 'maint'
Conflicts:
	contrib/lisp/htmlize.el
	etc/schema/od-manifest-schema-v1.2-os.rnc
	etc/schema/od-schema-v1.2-os.rnc
	lisp/org-exp-blocks.el
2013-01-01 16:06:17 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry 5de94e46e4 Merge branch 'maint' 2012-12-20 13:16:47 +01:00
Dmitry Antipov bfb9f9d10f Use (point-marker) instead of (move-marker (make-marker) (point))
* org-agenda.el (org-agenda-get-restriction-and-command): Use `point-marker'.
* org-capture.el (org-capture-place-template): Likewise.
* org-colview-xemacs.el (org-dblock-write:columnview): Likewise.
* org-colview.el (org-dblock-write:columnview): Likewise.
* org-mobile.el (org-mobile-locate-entry): Likewise.
* org-table.el (org-table-convert-region): Likewise.
* org.el (org-update-statistics-cookies): Likewise.
* contrib/lisp/org-invoice.el (org-dblock-write:invoice): Likewise.
2012-12-20 13:16:41 +01:00
Nicolas Goaziou 4c7dcd0830 Silence byte compiler
* contrib/lisp/org-invoice.el (org-invoice-info-to-table,
  org-invoice-list-to-table): Silence byte compiler.
* lisp/org-agenda.el (org-agenda-show-clocking-issues,
  org-agenda-format-item): Silence byte compiler.
* lisp/org-colview-xemacs.el (org-agenda-columns): Silence byte
  compiler.
* lisp/org-colview.el (org-agenda-columns): Silence byte compiler.
* lisp/org.el (org-properties-postprocess-alist): Silence byte
  compiler.

Function renaming was necessary as of
a00a7b2918.
2012-11-17 15:51:26 +01:00
Toby S. Cubitt a00a7b2918 Allow more flexible customization of clocksum format
* lisp/org.el (org-time-clocksum-format, org-time-clocksum-fractional-format):
in addition to a single format string, the clocksum formats can now be
plists specifying separate formats for different time units.

* lisp/org.el (org-minutes-to-clocksum-string): new function to
replace org-minutes-to-hh:mm-string, which converts a number of
minutes to a string according to the customization options.

* lisp/org-colview.el (org-columns-number-to-string): use new
org-minutes-to-clocksum-string function to format clocksum durations.

* lisp/org-clock.el: always call new org-minutes-to-clocksum-string
function when formatting time durations, instead of calling
org-minutes-to-hh:mm-string or passing org-time-clocksum-format
directly to format.
2012-11-17 15:39:07 +01:00
Bastien Guerry 4f0b3bfe0c Merge branch 'maint' 2012-10-02 13:07:09 +02:00
Bastien Guerry 30f1a62878 Update autoloads.
* org.el: Don't dynamically autoload already autoloaded
functions.
(org-clock-update-time-maybe): Move to org-clock.el.

* org-exp.el (org-insert-export-options-template): Remove
autoload cookie.

* org-clock.el (org-resolve-clocks, org-clock-in)
(org-clock-out, org-clock-cancel, org-clock-goto)
(org-clock-sum, org-clock-display, org-clock-report)
(org-dblock-write:clocktable): Add autoload cookie.
(org-clock-update-time-maybe): Moved from org.el.

* org-beamer.el (org-beamer-sectioning, org-beamer-mode): Ditto.

* org-ascii.el (org-export-ascii-preprocess): Ditto.

* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag): Add
autoload cookie.

* org-colview.el (org-columns, org-dblock-write:columnview)
(org-insert-columns-dblock, org-agenda-columns): Ditto.

* org-table.el (org-table-create-with-table.el)
(org-table-create-or-convert-from-region, org-table-create)
(org-table-convert-region, org-table-import)
(org-table-export, org-table-align)
(org-table-justify-field-maybe, org-table-next-field)
(org-table-previous-field, org-table-next-row)
(org-table-copy-down, org-table-field-info)
(org-table-current-dline, org-table-goto-column)
(org-table-insert-column, org-table-delete-column)
(org-table-move-column-right, org-table-move-column-left)
(org-table-move-column, org-table-move-row-down)
(org-table-move-row-up, org-table-move-row)
(org-table-insert-row, org-table-insert-hline)
(org-table-hline-and-move, org-table-kill-row)
(org-table-sort-lines, org-table-cut-region)
(org-table-copy-region, org-table-paste-rectangle)
(org-table-convert, org-table-wrap-region)
(org-table-edit-field, org-table-sum)
(org-table-get-stored-formulas)
(org-table-maybe-eval-formula)
(org-table-rotate-recalc-marks)
(org-table-maybe-recalculate-line, org-table-eval-formula)
(org-table-recalculate, org-table-iterate)
(org-table-edit-formulas)
(org-table-toggle-coordinate-overlays)
(org-table-toggle-formula-debugger, orgtbl-to-generic)
(orgtbl-to-tsv, orgtbl-to-csv, orgtbl-to-latex)
(orgtbl-to-html, orgtbl-to-texinfo, orgtbl-to-orgtbl): Ditto.
2012-10-02 10:52:17 +02:00
Bastien Guerry fe7f964b49 Merge branch 'maint' 2012-09-28 17:47:53 +02:00
Bastien Guerry 222eae4033 Fix error messages: don't use a dot at the end 2012-09-28 17:47:48 +02:00
Bastien Guerry 2939333e89 Merge branch 'maint' 2012-08-31 07:57:13 +02:00
Bastien Guerry eed50349bc org-colview.el: Fix several bugs
* org-colview.el (org-columns-goto-top-level): Correctly move
the marker `org-columns-top-level-marker'.
(org-agenda-columns): Don't set
`org-agenda-overriding-columns-format' as a buffer variable,
as we only need it dynamically.
(org-agenda-colview-summarize): Fix a bug in returning the
match string.

(The problem with `org-columns-goto-top-level' was introduced
by the commit 8d9e83.)

Thanks to Hannes Schulz and Jacob Riko who reported this.
2012-08-31 07:56:58 +02:00
Bastien Guerry cdbc2d4799 Allow using S-<left/right> to update CLOCKSUM from the column view
* org-colview.el (org-columns-next-allowed-value): Add the
CLOCKSUM property to the list of properties that can be
changed interactively from the column view.

* org.el (org-entry-put): Allow to set the CLOCKSUM property
by updating the most recent clock.  This is useful in the
column view when you want to use S-<left/right> to update the
last clock of the entry at point.

Thanks to Rainer Stengele who suggested something along those
lines.
2012-08-30 16:42:13 +02:00
Jay McCarthy ade209b7c5 org-colview.el: Make sure to add a face to a string that has no face
* org-colview.el (org-columns-new-overlay): Make sure to add a
face to a string that has no face.

TINYCHANGE

See the description of the bug here:
http://thread.gmane.org/gmane.emacs.orgmode/58984
2012-08-21 20:05:34 +02:00
Bastien Guerry 16ea0364a4 Call `buffer-substring-no-properties' and remove `org-no-properties'
* org-colview-xemacs.el (org-columns-display-here): Use
`buffer-substring-no-properties' and remove `org-no-properties'.

* org-colview.el (org-columns-display-here): Ditto.

* org-table.el (org-table-eval-formula): Ditto.

* org.el (org-entry-properties): Ditto.
2012-08-15 09:22:51 +02:00
Bastien Guerry 74e9a23c01 Fix a bug in `org-columns-get-format-and-top-level' and a compiler warning.
* org-colview.el (org-columns-get-format-and-top-level): Fix bug.
(org-columns-get-format): Fix compiler warning.
2012-08-12 23:00:55 +02:00
Ippei FURUHASHI 601e783405 org-colview.el: Add new ways of specifying the columnview format
* org-colview.el (org-columns): New argument `columns-fmt-string'.
* org-colview.el (org-columns-get-format-end-top-level): Split
into `org-columns-get-format' and `org-columns-goto-top-level'.
* lisp/org-colview.el (org-dblock-write:columnview): Add a new parameter
:format which specifies the column view format for the output of the
columnview dynamic block.

This patch allows to interactively set a column view like this:

  M-: (org-columns "%66ITEM(Task) %6Effort(Estim.){:}") RET

or to specify a column view in columnview dynamic blocks:

TINYCHANGE
2012-08-12 11:48:44 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Bastien Guerry 2cd4333398 Fix two compiler warnings. 2012-08-05 18:59:51 +02:00
Bastien Guerry de271e3751 Introduce a new special property CLOCKSUM_T for today's clocked time.
* org.el (org-special-properties): New special property
CLOCKSUM_T.
(org-entry-properties): Handle the new special property.

* org-colview.el (org-columns): Handle a new special property
CLOCKSUM_T.
(org-agenda-colview-summarize, org-agenda-colview-compute):
Ditto.

* org-clock.el (org-clock-sum-today): New function.
(org-clock-sum): New argument PROPNAME to set a custom text
property instead of :org-clock-minutes.

* org.texi (Special properties, Column attributes)
(Agenda column view): Document the new special property
CLOCKSUM_T.

Thanks to Brian Wood who asked a question wrt this.
2012-08-05 11:12:04 +02:00
Bastien Guerry 805891523c Fix bugs about computing durations in the column view.
* org-colview.el (org-columns-string-to-number): When
computing the values for the colview, match durations and
convert them to HH:MM values.

* org.el (org-duration-string-to-minutes): Match non-round
numbers.  Add a new optional parameter to allow returning the
output as a string.

Thanks to Sébastien for reporting these bugs.
2012-05-01 17:47:13 +02:00
Bastien Guerry 1c203d8d19 Match #+name/#+tblname/#+tblfm along with uppercase twins.
* org.el: Use (case-fold-search t).
(org-edit-special, org-ctrl-c-ctrl-c): Ditto.

* org-table.el:
(org-table-store-formulas, org-table-get-stored-formulas)
(org-table-fix-formulas, org-table-edit-formulas)
(org-old-auto-fill-inhibit-regexp, orgtbl-ctrl-c-ctrl-c)
(orgtbl-toggle-comment, org-table-get-remote-range): Ditto.

* org-footnote.el:
(org-footnote-goto-local-insertion-point): Ditto.

* org-exp.el: Ditto.

* org-colview.el:
(org-dblock-write:columnview, org-dblock-write:columnview):
Ditto.

* org-colview-xemacs.el:
(org-dblock-write:columnview): Ditto.

* org-clock.el (org-clocktable-write-default): Ditto.

* org-capture.el (org-capture-place-table-line): Ditto.

* ob.el (org-babel-data-names, org-babel-goto-named-src-block)
(org-babel-src-block-names)
(org-babel-where-is-src-block-result, org-babel-result-end)
(org-babel-where-is-src-block-head)
(org-babel-find-named-result, org-babel-result-names): Ditto.
2012-04-23 12:48:33 +02:00
Bastien Guerry d5c0af72cf Use (derived-mode-p 'org-mode) instead of (eq major-mode 'org-mode).
* org.el (org-show-hierarchy-above, org-cycle)
(org-global-cycle, org-files-list, org-store-link)
(org-link-search, org-open-file, org-display-outline-path)
(org-refile-get-location, org-update-all-dblocks)
(org-change-tag-in-region, org-entry-properties)
(org-save-all-org-buffers, org-revert-all-org-buffers)
(org-buffer-list, org-cdlatex-mode)
(org-install-agenda-files-menu, org-end-of-subtree)
(org-speedbar-set-agenda-restriction): Use (derived-mode-p
'org-mode) instead of (eq major-mode 'org-mode).

* org-timer.el (org-timer-set-timer): Ditto.

* org-table.el (orgtbl-mode, org-table-align, orgtbl-mode): Ditto.

* org-src.el (org-edit-src-exit, org-edit-src-code)
(org-edit-fixed-width-region, org-edit-src-exit): Ditto.

* org-remember.el (org-remember-handler): Ditto.

* org-mouse.el (dnd-open-file, org-mouse-insert-item): Ditto.

* org-macs.el (org-get-limited-outline-regexp): Ditto.

* org-lparse.el (org-replace-region-by): Ditto.

* org-latex.el (org-latex-to-pdf-process)
(org-replace-region-by-latex): Ditto.

* org-indent.el (org-indent-indent-buffer): Ditto.

* org-id.el (org-id-store-link, org-id-update-id-locations)
(org-id-store-link): Ditto.

* org-html.el (org-export-html-preprocess)
(org-replace-region-by-html): Ditto.

* org-footnote.el (org-footnote-normalize)
(org-footnote-goto-definition)
(org-footnote-create-definition, org-footnote-normalize): Ditto.

* org-docbook.el (org-replace-region-by-docbook): Ditto.

* org-ctags.el (find-tag): Ditto.

* org-colview.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-colview-xemacs.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-capture.el (org-capture-insert-template-here)
(org-capture, org-capture-finalize)
(org-capture-set-target-location)
(org-capture-insert-template-here): Ditto.

* org-ascii.el (org-replace-region-by-ascii):  Ditto.

* org-archive.el (org-archive-subtree): Ditto.

* org-agenda.el (org-agenda)
(org-agenda-get-restriction-and-command)
(org-agenda-get-some-entry-text, org-search-view)
(org-tags-view, org-agenda-get-day-entries)
(org-agenda-format-item, org-agenda-goto, org-agenda-kill)
(org-agenda-archive-with, org-agenda-switch-to): Ditto.
2012-04-21 00:43:16 +02:00
Bastien Guerry 5c38bf0ef7 Fix copyright and authors lines. 2012-04-02 00:53:28 +02:00
Ilya Shlyakhter e8337f6920 Colview bugfix: A headline with just a TODO keyword and blank headline content would crash
* lisp/org-colview.el (org-columns-cleanup-item): Handle case of empty
headline

* lisp/org-colview-xemacs.el (org-columns-cleanup-item): Handle case of empty
headline

TINYCHANGE
2012-03-25 01:49:14 +01:00
Bastien Guerry 8dc05ad5f4 org-colview.el: Also consider inline tasks when computing the sum.
* org-colview.el (org-columns-compute): Also consider inline
tasks when computing the sum.

TINYCHANGE

Thanks to Myles English for spotting this and for his patch,
this one is a slightly modified version of his.
2012-03-23 22:04:36 +01:00
Bastien Guerry 652e5e0ecf Bugfix: use the date as the value for the ITEM column when displaying a summary.
* org-colview.el (org-columns-display-here): Bugfix: use the date as the
value for the ITEM column when displaying a summary.

Thanks to Rasmus Rempling for reporting this and to Nick Dokos for digging
further.
2012-03-21 23:57:29 +01:00
Bastien Guerry 6e306f65ff Fix copyright years in maint. 2012-03-17 16:31:04 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 38c5045725 Fix copyright years. 2012-03-17 14:36:25 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Bastien Guerry b73075a8d2 Code cleanup up: rename org-on-*-p to org-at-*-p.
Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.

Also define two aliases.
2012-01-02 19:52:35 +01:00
Bastien Guerry fcdeeb9101 Fix typos fixed in Emacs trunk.
* org-freemind.el (org-freemind-write-mm-buffer): Fix typo.

* org-colview.el (org-columns-edit-value) (org-columns-next-allowed-value):
  Fix typos.

* org-bibtex.el (org-bibtex-autogen-keys): Fix typo.

* org-clock.el (org-clock-special-range): Fix typo.

Thanks to Paul Eggert for these fixes.
2011-11-28 15:11:52 +01:00
Bastien Guerry 728611fa77 Fix compiler warnings. 2011-10-28 17:26:22 +02:00
Nicolas Goaziou dfcb6faef1 Provide more consistent regexps for headlines
* lisp/org-agenda.el (org-search-view): Simplify regexp.
(org-agenda-get-todos): Use new format string.
* lisp/org-archive.el (org-archive-all-done): Simplify regexp.
* lisp/org-ascii.el (org-export-as-ascii): More accurate regexp.
* lisp/org-colview-xemacs.el (org-columns-capture-view): Use new
  format string and new string.
* lisp/org-colview.el (org-columns-capture-view): Use new format
  string and new string.
* lisp/org-docbook.el (org-export-as-docbook): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-exp.el (org-export-protect-quoted-subtrees): More accurate
  regexp.  Also use new regexp to match generic headlines.
* lisp/org-html.el (org-export-as-html): More accurate regexp.  Also
  use new regexp to match generic headlines.
* lisp/org-mouse.el (org-mouse-match-todo-keyword): Removed unused
  and now erroneous function.
* lisp/org.el (org-heading-regexp, org-heading-keyword-regexp-format):
  New variables.
(org-set-regexps-and-options): Create regexps according to the
following rule: use spaces only to separate elements from an headline,
while allowing mixed tabs and spaces for any indentation job.
(org-nl-done-regexp, org-looking-at-done-regexp): Removed variables.
(org-set-font-lock-defaults): Fontify again headlines with a keyword
and no other text.  Use new format strings.
(org-get-heading, org-toggle-comment, org-prepare-agenda-buffers,
org-toggle-fixed-width-section): Use new format string.
(org-todo): More accurate regexps.
(org-point-at-end-of-empty-headline): Simplify regexp.
(org-insert-heading): Headline can sometimes be nil.

This patch attempts to reduce the number of hard-coded headlines, by
providing two format strings and one generic string to cover most of
the cases of headline construction.
2011-10-23 09:30:13 +02:00
Tassilo Horn 4bbdfd229d Replace org-mode-p with usual (eq major-mode 'org-mode) check
Additionally, replace one

  (or (org-mode-p) (derived-mode-p 'org-mode))

with

  (derived-mode-p 'org-mode)

cause that is reflexive anyway (returns true, if the current mode is
org-mode).

Delete one check testing for org-mode or org derived mode
2011-10-22 11:29:24 +02:00
Bastien Guerry cdbf7ed876 Revert "Move three functions and add appropriate require/declarations."
This reverts commit 8c3ecbe39a.
2011-08-19 22:11:15 +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 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 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 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00