Merge branch 'master' into org-id-uuid

Conflicts:
	lisp/ChangeLog
This commit is contained in:
David Maus 2010-05-17 16:32:31 +02:00
commit 2cea3f7744
6 changed files with 231 additions and 181 deletions

View File

@ -1911,7 +1911,7 @@ marked with vertical lines. Here is an example:
@end example @end example
It is also sufficient to just insert the column group starters after It is also sufficient to just insert the column group starters after
every vertical line you'd like to have: every vertical line you would like to have:
@example @example
| N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) | | N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) |
@ -8726,10 +8726,10 @@ La@TeX{}, see the variable @code{org-entities} for the complete list.
@samp{...} are all converted into special commands creating hyphens of @samp{...} are all converted into special commands creating hyphens of
different lengths or a compact set of dots. different lengths or a compact set of dots.
If you'd like to see entities displayed as utf8 characters, use the following If you would like to see entities displayed as utf8 characters, use the
command@footnote{You can urn this on by default bu setting the variable following command@footnote{You can turn this on by default by setting the
@code{prg-pretty-entities}, or on a per-file base with the @code{#+STARTUP} variable @code{org-pretty-entities}, or on a per-file base with the
option @code{entitiespretty}.}: @code{#+STARTUP} option @code{entitiespretty}.}:
@table @kbd @table @kbd
@kindex C-c C-x \ @kindex C-c C-x \
@ -9723,12 +9723,12 @@ options that can be used in the optional argument of the
@code{figure} environment, add something like @samp{placement=[h!]} to the @code{figure} environment, add something like @samp{placement=[h!]} to the
Attributes. Attributes.
If you'd like to let text flow around the image, add the word @samp{wrap} to If you would like to let text flow around the image, add the word @samp{wrap}
the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left
half of the page. To fine-tune, the @code{placement} field will be the half of the page. To fine-tune, the @code{placement} field will be the set
set of additional arguments needed by the @code{wrapfigure} environment. of additional arguments needed by the @code{wrapfigure} environment. Note
Note that if you change the size of the image, you need to use compatible that if you change the size of the image, you need to use compatible settings
settings for @code{\includegraphics} and @code{wrapfigure}. for @code{\includegraphics} and @code{wrapfigure}.
@cindex #+CAPTION @cindex #+CAPTION
@cindex #+LABEL @cindex #+LABEL
@ -9928,7 +9928,7 @@ system. Check variables @code{org-export-docbook-xslt-proc-command} and
The stylesheet argument @code{%s} in variable The stylesheet argument @code{%s} in variable
@code{org-export-docbook-xslt-proc-command} is replaced by the value of @code{org-export-docbook-xslt-proc-command} is replaced by the value of
variable @code{org-export-docbook-xslt-stylesheet}, which needs to be set by variable @code{org-export-docbook-xslt-stylesheet}, which needs to be set by
the user. You can also overrule this global setting on a per-file bases by the user. You can also overrule this global setting on a per-file basis by
adding an in-buffer setting @code{#+XSLT:} to the Org file. adding an in-buffer setting @code{#+XSLT:} to the Org file.
@kindex C-c C-e v D @kindex C-c C-e v D
@ -10616,7 +10616,7 @@ excluded.
To ensure that links are preserved, care should be taken to replicate To ensure that links are preserved, care should be taken to replicate
your directory structure on the web server, and to use relative file your directory structure on the web server, and to use relative file
paths. For example, if your Org files are kept in @file{~/org} and your paths. For example, if your Org files are kept in @file{~/org} and your
publishable images in @file{~/images}, you'd link to an image with publishable images in @file{~/images}, you would link to an image with
@c @c
@example @example
file:../images/myimage.png file:../images/myimage.png

View File

@ -1,3 +1,27 @@
2010-05-17 Carsten Dominik <carsten.dominik@gmail.com>
* org-clock.el (org-clock-sum): Don't include running clock if
the time block is wrong.
2010-05-16 John Wiegley <jwiegley@gmail.com>
* org-clock.el (org-clock-clock-in, org-clock-in): Added
parameter `start-time'.
(org-clock-resolve-clock): Added parameter `clock-out-time'.
If set, and resolve-to is a past time, then the clock out
event occurs at `clock-out-time' rather than at `resolve-to'.
In this case, `resolve-to' becomes the clock in time.
(org-clock-jump-to-current-clock): Created new global command
to reveal the current clock.
(org-clock-resolve): Added new commands g/G and j/J, and a
help window describing all commands and their meaning.
(org-clock-resolve-expert): New customization variable.
(org-find-open-clocks): Fixed a bug that caused discovered
clocks not to match up with the currently active clock.
(org-resolve-clocks): Changed the argument
`also-non-dangling-p' to `only-dangling-p', since due to a bug
this was the default behavior all along.
2010-05-16 David Maus <dmaus@ictsoc.de> 2010-05-16 David Maus <dmaus@ictsoc.de>
* org-id.el (org-id-uuid): New function. Return string with * org-id.el (org-id-uuid): New function. Return string with

View File

@ -5946,9 +5946,8 @@ so that the date SD will be in that range."
(defun org-agenda-entry-text-mode (&optional arg) (defun org-agenda-entry-text-mode (&optional arg)
"Toggle entry text mode in an agenda buffer." "Toggle entry text mode in an agenda buffer."
(interactive "P") (interactive "P")
(if (integerp arg) (setq org-agenda-entry-text-mode (or (integerp arg)
(setq org-agenda-entry-text-mode t) (not org-agenda-entry-text-mode)))
(setq org-agenda-entry-text-mode (not org-agenda-entry-text-mode)))
(org-agenda-entry-text-hide) (org-agenda-entry-text-hide)
(and org-agenda-entry-text-mode (and org-agenda-entry-text-mode
(let ((org-agenda-entry-text-maxlines (let ((org-agenda-entry-text-maxlines

View File

@ -244,6 +244,11 @@ string as argument."
:group 'org-clock :group 'org-clock
:type 'boolean) :type 'boolean)
(defcustom org-clock-resolve-expert nil
"Non-nil means do not show the splash buffer with the clock resolver."
:group 'org-clock
:type 'boolean)
(defvar org-clock-in-prepare-hook nil (defvar org-clock-in-prepare-hook nil
"Hook run when preparing the clock. "Hook run when preparing the clock.
This hook is run before anything happens to the task that This hook is run before anything happens to the task that
@ -587,7 +592,7 @@ Use alsa's aplay tool if available."
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward "CLOCK: \\(\\[.*?\\]\\)$" nil t) (while (re-search-forward "CLOCK: \\(\\[.*?\\]\\)$" nil t)
(push (cons (copy-marker (1- (match-end 1)) t) (push (cons (copy-marker (match-end 1) t)
(org-time-string-to-time (match-string 1))) clocks)))) (org-time-string-to-time (match-string 1))) clocks))))
clocks)) clocks))
@ -624,12 +629,12 @@ This macro also protects the current active clock from being altered."
(put 'org-with-clock 'lisp-indent-function 1) (put 'org-with-clock 'lisp-indent-function 1)
(defsubst org-clock-clock-in (clock &optional resume) (defsubst org-clock-clock-in (clock &optional resume start-time)
"Clock in to the clock located by CLOCK. "Clock in to the clock located by CLOCK.
If necessary, clock-out of the currently active clock." If necessary, clock-out of the currently active clock."
(org-with-clock-position clock (org-with-clock-position clock
(let ((org-clock-in-resume (or resume org-clock-in-resume))) (let ((org-clock-in-resume (or resume org-clock-in-resume)))
(org-clock-in)))) (org-clock-in nil start-time))))
(defsubst org-clock-clock-out (clock &optional fail-quietly at-time) (defsubst org-clock-clock-out (clock &optional fail-quietly at-time)
"Clock out of the clock located by CLOCK." "Clock out of the clock located by CLOCK."
@ -655,39 +660,10 @@ If necessary, clock-out of the currently active clock."
(defvar org-clock-resolving-clocks nil) (defvar org-clock-resolving-clocks nil)
(defvar org-clock-resolving-clocks-due-to-idleness nil) (defvar org-clock-resolving-clocks-due-to-idleness nil)
(defun org-clock-resolve-clock (clock resolve-to &optional close-p (defun org-clock-resolve-clock (clock resolve-to clock-out-time
restart-p fail-quietly) &optional close-p restart-p fail-quietly)
"Resolve `CLOCK' given the time `RESOLVE-TO', and the present. "Resolve `CLOCK' given the time `RESOLVE-TO', and the present.
`CLOCK' is a cons cell of the form (MARKER START-TIME). `CLOCK' is a cons cell of the form (MARKER START-TIME)."
This routine can do one of many things:
if `RESOLVE-TO' is nil
if `CLOSE-P' is non-nil, give an error
if this clock is the active clock, cancel it
else delete the clock line (as if it never happened)
if `RESTART-P' is non-nil, start a new clock
else if `RESOLVE-TO' is the symbol `now'
if `RESTART-P' is non-nil, give an error
if `CLOSE-P' is non-nil, clock out the entry and
if this clock is the active clock, stop it
else if this clock is the active clock, do nothing
else if there is no active clock, resume this clock
else ask to cancel the active clock, and if so,
resume this clock after cancelling it
else if `RESOLVE-TO' is some date in the future
give an error about `RESOLVE-TO' being invalid
else if `RESOLVE-TO' is some date in the past
if `RESTART-P' is non-nil, give an error
if `CLOSE-P' is non-nil, enter a closing time and
if this clock is the active clock, stop it
else if this clock is the active clock, enter a
closing time, stop the current clock, then
start a new clock for the same item
else just enter a closing time for this clock
and then start a new clock for the same item"
(let ((org-clock-resolving-clocks t)) (let ((org-clock-resolving-clocks t))
(cond (cond
((null resolve-to) ((null resolve-to)
@ -709,11 +685,41 @@ This routine can do one of many things:
(t (t
(if restart-p (if restart-p
(error "RESTART-P is not valid here")) (error "RESTART-P is not valid here"))
(org-clock-clock-out clock fail-quietly resolve-to) (org-clock-clock-out clock fail-quietly (or clock-out-time
resolve-to))
(unless org-clock-clocking-in (unless org-clock-clocking-in
(if close-p (if close-p
(setq org-clock-leftover-time resolve-to) (setq org-clock-leftover-time (and (null clock-out-time)
(org-clock-clock-in clock))))))) resolve-to))
(org-clock-clock-in clock nil (and clock-out-time
resolve-to))))))))
(defun org-clock-jump-to-current-clock (&optional effective-clock)
(interactive)
(let ((clock (or effective-clock (cons org-clock-marker
org-clock-start-time))))
(unless (marker-buffer (car clock))
(error "No clock is currently running"))
(org-with-clock clock (org-clock-goto))
(with-current-buffer (marker-buffer (car clock))
(goto-char (car clock))
(if org-clock-into-drawer
(let ((logbook
(if (stringp org-clock-into-drawer)
(concat ":" org-clock-into-drawer ":")
":LOGBOOK:")))
(ignore-errors
(outline-flag-region
(save-excursion
(outline-back-to-heading t)
(search-forward logbook)
(goto-char (match-beginning 0)))
(save-excursion
(outline-back-to-heading t)
(search-forward logbook)
(search-forward ":END:")
(goto-char (match-end 0)))
nil)))))))
(defun org-clock-resolve (clock &optional prompt-fn last-valid fail-quietly) (defun org-clock-resolve (clock &optional prompt-fn last-valid fail-quietly)
"Resolve an open org-mode clock. "Resolve an open org-mode clock.
@ -739,50 +745,66 @@ was started."
(save-window-excursion (save-window-excursion
(save-excursion (save-excursion
(unless org-clock-resolving-clocks-due-to-idleness (unless org-clock-resolving-clocks-due-to-idleness
(org-with-clock clock (org-clock-goto)) (org-clock-jump-to-current-clock clock))
(with-current-buffer (marker-buffer (car clock)) (unless org-clock-resolve-expert
(goto-char (car clock)) (with-output-to-temp-buffer "*Org Clock*"
(if org-clock-into-drawer (princ "Select a Clock Resolution Command:
(let ((logbook
(if (stringp org-clock-into-drawer) i/q/C-g Ignore this question; the same as keeping all the idle time.
(concat ":" org-clock-into-drawer ":")
":LOGBOOK:"))) k/K Keep X minutes of the idle time (default is all). If this
(ignore-errors amount is less than the default, you will be clocked out
(outline-flag-region that many minutes after the time that idling began, and then
(save-excursion clocked back in at the present time.
(outline-back-to-heading t) g/G Indicate that you \"got back\" X minutes ago. This is quite
(search-forward logbook) different from 'k': it clocks you out from the beginning of
(goto-char (match-beginning 0))) the idle period and clock you back in X minutes ago.
(save-excursion s/S Subtract the idle time from the current clock. This is the
(outline-back-to-heading t) same as keeping 0 minutes.
(search-forward logbook) C Cancel the open timer altogether. It will be as though you
(search-forward ":END:") never clocked in.
(goto-char (match-end 0))) j/J Jump to the current clock, to make manual adjustments.
nil))))))
For all these options, using uppercase makes your final state
to be CLOCKED OUT.")))
(org-fit-window-to-buffer (get-buffer-window "*Org Clock*"))
(let (char-pressed) (let (char-pressed)
(when (featurep 'xemacs) (when (featurep 'xemacs)
(message (concat (funcall prompt-fn clock) (message (concat (funcall prompt-fn clock)
" [(kK)eep (sS)ubtract (C)ancel]? ")) " [jkKgGsScCiq]? "))
(setq char-pressed (read-char-exclusive))) (setq char-pressed (read-char-exclusive)))
(while (or (null char-pressed) (while (or (null char-pressed)
(and (not (memq char-pressed '(?k ?K ?s ?S ?C ?i))) (and (not (memq char-pressed
'(?k ?K ?g ?G ?s ?S ?C
?j ?J ?i ?q)))
(or (ding) t))) (or (ding) t)))
(setq char-pressed (setq char-pressed
(read-char (concat (funcall prompt-fn clock) (read-char (concat (funcall prompt-fn clock)
" [(kK)p (sS)ub (C)ncl (i)gn]? ") " [jkKgGSscCiq]? ")
nil 45))) nil 45)))
(and (not (eq char-pressed ?i)) char-pressed))))) (and (not (memq char-pressed '(?i ?q))) char-pressed)))))
(default (floor (/ (org-float-time (default
(floor (/ (org-float-time
(time-subtract (current-time) last-valid)) 60))) (time-subtract (current-time) last-valid)) 60)))
(keep (and (memq ch '(?k ?K)) (keep
(and (memq ch '(?k ?K))
(read-number "Keep how many minutes? " default))) (read-number "Keep how many minutes? " default)))
(gotback
(and (memq ch '(?g ?G))
(read-number "Got back how many minutes ago? " default)))
(subtractp (memq ch '(?s ?S))) (subtractp (memq ch '(?s ?S)))
(barely-started-p (< (- (org-float-time last-valid) (barely-started-p (< (- (org-float-time last-valid)
(org-float-time (cdr clock))) 45)) (org-float-time (cdr clock))) 45))
(start-over (and subtractp barely-started-p))) (start-over (and subtractp barely-started-p)))
(if (or (null ch) (cond
(not (memq ch '(?k ?K ?s ?S ?C)))) ((memq ch '(?j ?J))
(message "") (if (eq ch ?J)
(org-clock-resolve-clock clock 'now nil t nil fail-quietly))
(org-clock-jump-to-current-clock clock))
((or (null ch)
(not (memq ch '(?k ?K ?g ?G ?s ?S ?C))))
(message ""))
(t
(org-clock-resolve-clock (org-clock-resolve-clock
clock (cond clock (cond
((or (eq ch ?C) ((or (eq ch ?C)
@ -791,21 +813,29 @@ was started."
;; time... ;; time...
start-over) start-over)
nil) nil)
(subtractp ((or subtractp
(and gotback (= gotback 0)))
last-valid) last-valid)
((= keep default) ((or (and keep (= keep default))
(and gotback (= gotback default)))
'now) 'now)
(keep
(time-add last-valid (seconds-to-time (* 60 keep))))
(gotback
(time-subtract (current-time)
(seconds-to-time (* 60 gotback))))
(t (t
(time-add last-valid (seconds-to-time (* 60 keep))))) (error "Unexpected, please report this as a bug")))
(memq ch '(?K ?S)) (and gotback last-valid)
(memq ch '(?K ?G ?S))
(and start-over (and start-over
(not (memq ch '(?K ?S ?C)))) (not (memq ch '(?K ?G ?S ?C))))
fail-quietly)))) fail-quietly)))))
(defun org-resolve-clocks (&optional also-non-dangling-p prompt-fn last-valid) (defun org-resolve-clocks (&optional only-dangling-p prompt-fn last-valid)
"Resolve all currently open org-mode clocks. "Resolve all currently open org-mode clocks.
If `also-non-dangling-p' is non-nil, also ask to resolve If `only-dangling-p' is non-nil, only ask to resolve dangling
non-dangling (i.e., currently open and valid) clocks." \(i.e., not currently open and valid) clocks."
(interactive "P") (interactive "P")
(unless org-clock-resolving-clocks (unless org-clock-resolving-clocks
(let ((org-clock-resolving-clocks t)) (let ((org-clock-resolving-clocks t))
@ -814,7 +844,7 @@ non-dangling (i.e., currently open and valid) clocks."
(dolist (clock clocks) (dolist (clock clocks)
(let ((dangling (or (not (org-clock-is-active)) (let ((dangling (or (not (org-clock-is-active))
(/= (car clock) org-clock-marker)))) (/= (car clock) org-clock-marker))))
(unless (and (not dangling) (not also-non-dangling-p)) (if (or (not only-dangling-p) dangling)
(org-clock-resolve (org-clock-resolve
clock clock
(or prompt-fn (or prompt-fn
@ -881,7 +911,7 @@ so long."
60.0)))) 60.0))))
org-clock-user-idle-start))))) org-clock-user-idle-start)))))
(defun org-clock-in (&optional select) (defun org-clock-in (&optional select start-time)
"Start the clock on the current item. "Start the clock on the current item.
If necessary, clock-out of the currently active clock. If necessary, clock-out of the currently active clock.
With prefix arg SELECT, offer a list of recently clocked tasks to With prefix arg SELECT, offer a list of recently clocked tasks to
@ -1026,6 +1056,7 @@ the clocking selection, associated with the letter `d'."
(/ (- (org-float-time (current-time)) (/ (- (org-float-time (current-time))
(org-float-time leftover)) 60))) (org-float-time leftover)) 60)))
leftover) leftover)
start-time
(current-time))) (current-time)))
(setq ts (org-insert-time-stamp org-clock-start-time (setq ts (org-insert-time-stamp org-clock-start-time
'with-hm 'inactive)))) 'with-hm 'inactive))))
@ -1265,7 +1296,7 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
(org-clock-delete-current)))))) (org-clock-delete-current))))))
(defun org-clock-cancel () (defun org-clock-cancel ()
"Cancel the running clock be removing the start timestamp." "Cancel the running clock by removing the start timestamp."
(interactive) (interactive)
(when (not (org-clocking-p)) (when (not (org-clocking-p))
(setq global-mode-string (setq global-mode-string
@ -1367,7 +1398,11 @@ nil are excluded from the clock summation."
;; Add the currently clocking item time to the total ;; Add the currently clocking item time to the total
(when (and org-clock-report-include-clocking-task (when (and org-clock-report-include-clocking-task
(equal (org-clocking-buffer) (current-buffer)) (equal (org-clocking-buffer) (current-buffer))
(equal (marker-position org-clock-hd-marker) (point))) (equal (marker-position org-clock-hd-marker) (point))
tstart
tend
(>= (org-float-time org-clock-start-time) tstart)
(<= (org-float-time org-clock-start-time) tend))
(let ((time (floor (- (org-float-time) (let ((time (floor (- (org-float-time)
(org-float-time org-clock-start-time)) 60))) (org-float-time org-clock-start-time)) 60)))
(setq t1 (+ t1 time)))) (setq t1 (+ t1 time))))

View File

@ -1,7 +1,6 @@
;;; org-docview.el --- support for links to doc-view-mode buffers ;;; org-docview.el --- support for links to doc-view-mode buffers
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
;; Free Software Foundation, Inc.
;; Author: Jan Böcker <jan.boecker at jboecker dot de> ;; Author: Jan Böcker <jan.boecker at jboecker dot de>
;; Keywords: outlines, hypermedia, calendar, wp ;; Keywords: outlines, hypermedia, calendar, wp

View File

@ -3434,10 +3434,6 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
;; active, this binding is ignored inside tables and replaced with a ;; active, this binding is ignored inside tables and replaced with a
;; modified self-insert. ;; modified self-insert.
(defvar orgtbl-mode nil
"Variable controlling `orgtbl-mode', a minor mode enabling the `org-mode'
table editor in arbitrary modes.")
(make-variable-buffer-local 'orgtbl-mode)
(defvar orgtbl-mode-map (make-keymap) (defvar orgtbl-mode-map (make-keymap)
"Keymap for `orgtbl-mode'.") "Keymap for `orgtbl-mode'.")
@ -3459,22 +3455,25 @@ table editor in arbitrary modes.")
0 (quote 'org-table) 'prepend)) 0 (quote 'org-table) 'prepend))
"Extra font-lock-keywords to be added when orgtbl-mode is active.") "Extra font-lock-keywords to be added when orgtbl-mode is active.")
;; Install it as a minor mode.
(put 'orgtbl-mode :included t)
(put 'orgtbl-mode :menu-tag "Org Table Mode")
;;;###autoload ;;;###autoload
(defun orgtbl-mode (&optional arg) (define-minor-mode orgtbl-mode
"The `org-mode' table editor as a minor mode for use in other modes." "The `org-mode' table editor as a minor mode for use in other modes."
(interactive) :lighter " OrgTbl" :keymap orgtbl-mode-map
(org-load-modules-maybe) (org-load-modules-maybe)
(if (org-mode-p) (cond
((org-mode-p)
;; Exit without error, in case some hook functions calls this ;; Exit without error, in case some hook functions calls this
;; by accident in org-mode. ;; by accident in org-mode.
(message "Orgtbl-mode is not useful in org-mode, command ignored") (message "Orgtbl-mode is not useful in org-mode, command ignored"))
(setq orgtbl-mode (orgtbl-mode
(if arg (> (prefix-numeric-value arg) 0) (not orgtbl-mode))) (and (orgtbl-setup) (defun orgtbl-setup () nil)) ;; FIXME: Yuck!?!
(if orgtbl-mode
(progn
(and (orgtbl-setup) (defun orgtbl-setup () nil))
;; Make sure we are first in minor-mode-map-alist ;; Make sure we are first in minor-mode-map-alist
(let ((c (assq 'orgtbl-mode minor-mode-map-alist))) (let ((c (assq 'orgtbl-mode minor-mode-map-alist)))
;; FIXME: maybe it should use emulation-mode-map-alists?
(and c (setq minor-mode-map-alist (and c (setq minor-mode-map-alist
(cons c (delq c minor-mode-map-alist))))) (cons c (delq c minor-mode-map-alist)))))
(org-set-local (quote org-table-may-need-update) t) (org-set-local (quote org-table-may-need-update) t)
@ -3491,8 +3490,8 @@ table editor in arbitrary modes.")
(when (fboundp 'font-lock-add-keywords) (when (fboundp 'font-lock-add-keywords)
(font-lock-add-keywords nil orgtbl-extra-font-lock-keywords) (font-lock-add-keywords nil orgtbl-extra-font-lock-keywords)
(org-restart-font-lock)) (org-restart-font-lock))
(easy-menu-add orgtbl-mode-menu) (easy-menu-add orgtbl-mode-menu))
(run-hooks 'orgtbl-mode-hook)) (t
(setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp) (setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp)
(org-table-cleanup-narrow-column-properties) (org-table-cleanup-narrow-column-properties)
(org-remove-from-invisibility-spec '(org-cwidth)) (org-remove-from-invisibility-spec '(org-cwidth))
@ -3516,11 +3515,6 @@ table editor in arbitrary modes.")
(while (setq s (text-property-any s (point-max) 'invisible 'org-cwidth)) (while (setq s (text-property-any s (point-max) 'invisible 'org-cwidth))
(remove-text-properties s (1+ s) '(invisible t))))) (remove-text-properties s (1+ s) '(invisible t)))))
;; Install it as a minor mode.
(put 'orgtbl-mode :included t)
(put 'orgtbl-mode :menu-tag "Org Table Mode")
(add-minor-mode 'orgtbl-mode " OrgTbl" orgtbl-mode-map)
(defun orgtbl-make-binding (fun n &rest keys) (defun orgtbl-make-binding (fun n &rest keys)
"Create a function for binding in the table minor mode. "Create a function for binding in the table minor mode.
FUN is the command to call inside a table. N is used to create a unique FUN is the command to call inside a table. N is used to create a unique
@ -3555,34 +3549,33 @@ to execute outside of tables."
"Setup orgtbl keymaps." "Setup orgtbl keymaps."
(let ((nfunc 0) (let ((nfunc 0)
(bindings (bindings
(list '(([(meta shift left)] org-table-delete-column)
'([(meta shift left)] org-table-delete-column) ([(meta left)] org-table-move-column-left)
'([(meta left)] org-table-move-column-left) ([(meta right)] org-table-move-column-right)
'([(meta right)] org-table-move-column-right) ([(meta shift right)] org-table-insert-column)
'([(meta shift right)] org-table-insert-column) ([(meta shift up)] org-table-kill-row)
'([(meta shift up)] org-table-kill-row) ([(meta shift down)] org-table-insert-row)
'([(meta shift down)] org-table-insert-row) ([(meta up)] org-table-move-row-up)
'([(meta up)] org-table-move-row-up) ([(meta down)] org-table-move-row-down)
'([(meta down)] org-table-move-row-down) ("\C-c\C-w" org-table-cut-region)
'("\C-c\C-w" org-table-cut-region) ("\C-c\M-w" org-table-copy-region)
'("\C-c\M-w" org-table-copy-region) ("\C-c\C-y" org-table-paste-rectangle)
'("\C-c\C-y" org-table-paste-rectangle) ("\C-c-" org-table-insert-hline)
'("\C-c-" org-table-insert-hline) ("\C-c}" org-table-toggle-coordinate-overlays)
'("\C-c}" org-table-toggle-coordinate-overlays) ("\C-c{" org-table-toggle-formula-debugger)
'("\C-c{" org-table-toggle-formula-debugger) ("\C-m" org-table-next-row)
'("\C-m" org-table-next-row) ([(shift return)] org-table-copy-down)
'([(shift return)] org-table-copy-down) ("\C-c?" org-table-field-info)
'("\C-c?" org-table-field-info) ("\C-c " org-table-blank-field)
'("\C-c " org-table-blank-field) ("\C-c+" org-table-sum)
'("\C-c+" org-table-sum) ("\C-c=" org-table-eval-formula)
'("\C-c=" org-table-eval-formula) ("\C-c'" org-table-edit-formulas)
'("\C-c'" org-table-edit-formulas) ("\C-c`" org-table-edit-field)
'("\C-c`" org-table-edit-field) ("\C-c*" org-table-recalculate)
'("\C-c*" org-table-recalculate) ("\C-c^" org-table-sort-lines)
'("\C-c^" org-table-sort-lines) ("\M-a" org-table-beginning-of-field)
'("\M-a" org-table-beginning-of-field) ("\M-e" org-table-end-of-field)
'("\M-e" org-table-end-of-field) ([(control ?#)] org-table-rotate-recalc-marks)))
'([(control ?#)] org-table-rotate-recalc-marks)))
elt key fun cmd) elt key fun cmd)
(while (setq elt (pop bindings)) (while (setq elt (pop bindings))
(setq nfunc (1+ nfunc)) (setq nfunc (1+ nfunc))