Mercurial > emacs
diff lisp/org/org-table.el @ 100458:ba23e35d3eaf
2008-12-17 Carsten Dominik <carsten.dominik@gmail.com>
* Fix typos in comments and docstrings throughout Org-mode.
* org.el (org-get-outline-path): Fix bug if level is not given.
* org-agenda.el (org-finalize-agenda): Fix typo with variable
name.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Wed, 17 Dec 2008 12:34:50 +0000 |
parents | cea079b68b76 |
children | 1c595f3cc8f8 |
line wrap: on
line diff
--- a/lisp/org/org-table.el Wed Dec 17 12:32:48 2008 +0000 +++ b/lisp/org/org-table.el Wed Dec 17 12:34:50 2008 +0000 @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.15a +;; Version: 6.15d ;; ;; This file is part of GNU Emacs. ;; @@ -25,7 +25,7 @@ ;; ;;; Commentary: -;; This file contains the table editor and spreadsheed for Org-mode. +;; This file contains the table editor and spreadsheet for Org-mode. ;; Watch out: Here we are talking about two different kind of tables. ;; Most of the code is for the tables created with the Org-mode table editor. @@ -169,7 +169,7 @@ :group 'org-table) (defcustom org-table-use-standard-references t - "Should org-mode work with table refrences like B3 instead of @3$2? + "Should org-mode work with table references like B3 instead of @3$2? Possible values are: nil never use them from accept as input, do not present for editing @@ -386,7 +386,7 @@ nil When nil, the command tries to be smart and figure out the separator in the following way: - when each line contains a TAB, assume TAB-separated material - - when each line contains a comme, assume CSV material + - when each line contains a comma, assume CSV material - else, assume one or more SPACE characters as separator." (interactive "rP") (let* ((beg (min beg0 end0)) @@ -1001,7 +1001,7 @@ (defun org-table-current-dline () "Find out what table data line we are in. -Only datalins count for this." +Only datalines count for this." (interactive) (if (interactive-p) (org-table-check-inside-data-field)) (save-excursion @@ -1676,14 +1676,14 @@ (cond ((and (string-match "0" s) (string-match "\\`[-+ \t0.edED]+\\'" s)) 0) - ((string-match "\\`[ \t]+\\'" s) nil) + ((string-match "\\`[ \t]+\\'" s) nil) ((string-match "\\`\\([0-9]+\\):\\([0-9]+\\)\\(:\\([0-9]+\\)\\)?\\'" s) (let ((h (string-to-number (or (match-string 1 s) "0"))) (m (string-to-number (or (match-string 2 s) "0"))) (s (string-to-number (or (match-string 4 s) "0")))) (if (boundp 'org-timecnt) (setq org-timecnt (1+ org-timecnt))) (* 1.0 (+ h (/ m 60.0) (/ s 3600.0))))) - ((equal n 0) nil) + ((equal n 0) nil) (t n)))) (defun org-table-current-field-formula (&optional key noerror) @@ -1807,12 +1807,12 @@ eq (match-string 3 string) eq-alist (cons (cons scol eq) eq-alist)) (if (member scol seen) - (if noerror - (progn - (message "Double definition `$%s=' in TBLFM line, please fix by hand" scol) - (ding) - (sit-for 2)) - (error "Double definition `$%s=' in TBLFM line, please fix by hand" scol)) + (if noerror + (progn + (message "Double definition `$%s=' in TBLFM line, please fix by hand" scol) + (ding) + (sit-for 2)) + (error "Double definition `$%s=' in TBLFM line, please fix by hand" scol)) (push scol seen)))))) (nreverse eq-alist))) @@ -2206,7 +2206,7 @@ prop value))) (defun org-table-get-range (desc &optional tbeg col highlight) - "Get a calc vector from a column, accorting to descriptor DESC. + "Get a calc vector from a column, according to descriptor DESC. Optional arguments TBEG and COL can give the beginning of the table and the current column, to avoid unnecessary parsing. HIGHLIGHT means, just highlight the range." @@ -2527,7 +2527,7 @@ (org-defkey map "\C-c\C-s" 'org-table-fedit-finish) (org-defkey map "\C-c\C-c" 'org-table-fedit-finish) (org-defkey map "\C-c\C-q" 'org-table-fedit-abort) - (org-defkey map "\C-c?" 'org-table-show-reference) + (org-defkey map "\C-c?" 'org-table-show-reference) (org-defkey map [(meta shift up)] 'org-table-fedit-line-up) (org-defkey map [(meta shift down)] 'org-table-fedit-line-down) (org-defkey map [(shift up)] 'org-table-fedit-ref-up) @@ -2538,8 +2538,8 @@ (org-defkey map [(meta down)] 'org-table-fedit-scroll) (org-defkey map [(meta tab)] 'lisp-complete-symbol) (org-defkey map "\M-\C-i" 'lisp-complete-symbol) - (org-defkey map [(tab)] 'org-table-fedit-lisp-indent) - (org-defkey map "\C-i" 'org-table-fedit-lisp-indent) + (org-defkey map [(tab)] 'org-table-fedit-lisp-indent) + (org-defkey map "\C-i" 'org-table-fedit-lisp-indent) (org-defkey map "\C-c\C-r" 'org-table-fedit-toggle-ref-type) (org-defkey map "\C-c}" 'org-table-fedit-toggle-coordinates) map)) @@ -2583,7 +2583,7 @@ (org-table-get-specials) (let ((key (org-table-current-field-formula 'key 'noerror)) (eql (sort (org-table-get-stored-formulas 'noerror) - 'org-table-formula-less-p)) + 'org-table-formula-less-p)) (pos (move-marker (make-marker) (point))) (startline 1) (wc (current-window-configuration)) @@ -2707,7 +2707,7 @@ s)) (defun org-table-fedit-convert-buffer (function) - "Convert all references in this buffer, using FUNTION." + "Convert all references in this buffer, using FUNCTION." (let ((line (org-current-line))) (goto-char (point-min)) (while (not (eobp)) @@ -2802,7 +2802,7 @@ (t (error "Cannot shift reference")))))) (defun org-table-fedit-toggle-coordinates () - "Toggle the display of coordinates in the refrenced table." + "Toggle the display of coordinates in the referenced table." (interactive) (let ((pos (marker-position org-pos))) (with-current-buffer (marker-buffer org-pos) @@ -2904,8 +2904,8 @@ (org-table-remove-rectangle-highlight) (catch 'exit (let ((pos (if local (point) org-pos)) - (face2 'highlight) - (org-inhibit-highlight-removal t) + (face2 'highlight) + (org-inhibit-highlight-removal t) (win (selected-window)) (org-show-positions nil) var name e what match dest) @@ -3017,15 +3017,15 @@ (t (error "Undefined name $%s" var))))) (goto-char pos) (when (and org-show-positions - (not (memq this-command '(org-table-fedit-scroll - org-table-fedit-scroll-down)))) + (not (memq this-command '(org-table-fedit-scroll + org-table-fedit-scroll-down)))) (push pos org-show-positions) (push org-table-current-begin-pos org-show-positions) (let ((min (apply 'min org-show-positions)) (max (apply 'max org-show-positions))) - (goto-char min) (recenter 0) - (goto-char max) - (or (pos-visible-in-window-p max) (recenter -1)))) + (goto-char min) (recenter 0) + (goto-char max) + (or (pos-visible-in-window-p max) (recenter -1)))) (select-window win)))) (defun org-table-force-dataline () @@ -3053,7 +3053,7 @@ (org-table-fedit-move 'next-line)) (defun org-table-fedit-move (command) - "Move the cursor in the window shoinw the table. + "Move the cursor in the window showing the table. Use COMMAND to do the motion, repeat if necessary to end up in a data line." (let ((org-table-allow-automatic-line-recalculation nil) (pos org-pos) (win (selected-window)) p) @@ -3120,7 +3120,7 @@ (setq org-table-rectangle-overlays nil))) (defvar org-table-coordinate-overlays nil - "Collects the cooordinate grid overlays, so that they can be removed.") + "Collects the coordinate grid overlays, so that they can be removed.") (make-variable-buffer-local 'org-table-coordinate-overlays) (defun org-table-overlay-coordinates () @@ -3321,29 +3321,29 @@ (bindings (list '([(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 shift right)] org-table-insert-column) '([(meta shift up)] org-table-kill-row) '([(meta shift down)] org-table-insert-row) - '([(meta up)] org-table-move-row-up) - '([(meta down)] org-table-move-row-down) - '("\C-c\C-w" org-table-cut-region) - '("\C-c\M-w" org-table-copy-region) - '("\C-c\C-y" org-table-paste-rectangle) - '("\C-c-" org-table-insert-hline) - '("\C-c}" org-table-toggle-coordinate-overlays) - '("\C-c{" org-table-toggle-formula-debugger) - '("\C-m" org-table-next-row) - '([(shift return)] org-table-copy-down) - '("\C-c?" org-table-field-info) - '("\C-c " org-table-blank-field) - '("\C-c+" org-table-sum) - '("\C-c=" org-table-eval-formula) - '("\C-c'" org-table-edit-formulas) - '("\C-c`" org-table-edit-field) - '("\C-c*" org-table-recalculate) - '("\C-c^" org-table-sort-lines) + '([(meta up)] org-table-move-row-up) + '([(meta down)] org-table-move-row-down) + '("\C-c\C-w" org-table-cut-region) + '("\C-c\M-w" org-table-copy-region) + '("\C-c\C-y" org-table-paste-rectangle) + '("\C-c-" org-table-insert-hline) + '("\C-c}" org-table-toggle-coordinate-overlays) + '("\C-c{" org-table-toggle-formula-debugger) + '("\C-m" org-table-next-row) + '([(shift return)] org-table-copy-down) + '("\C-c?" org-table-field-info) + '("\C-c " org-table-blank-field) + '("\C-c+" org-table-sum) + '("\C-c=" org-table-eval-formula) + '("\C-c'" org-table-edit-formulas) + '("\C-c`" org-table-edit-field) + '("\C-c*" org-table-recalculate) + '("\C-c^" org-table-sort-lines) '([(control ?#)] org-table-rotate-recalc-marks))) elt key fun cmd) (while (setq elt (pop bindings)) @@ -3619,7 +3619,7 @@ lines))) (defun orgtbl-send-table (&optional maybe) - "Send a tranformed version of this table to the receiver position. + "Send a transformed version of this table to the receiver position. With argument MAYBE, fail quietly if no transformation is defined for this table." (interactive) @@ -3764,9 +3764,9 @@ (orgtbl-apply-fmt efmt (match-string 1 f) (match-string 2 f)) f))) - (orgtbl-apply-fmt (or (orgtbl-get-fmt *orgtbl-fmt* i) - *orgtbl-default-fmt*) - f))) + (orgtbl-apply-fmt (or (orgtbl-get-fmt *orgtbl-fmt* i) + *orgtbl-default-fmt*) + f))) line))) (push (if *orgtbl-lfmt* (orgtbl-apply-fmt *orgtbl-lfmt* line) @@ -3901,8 +3901,8 @@ (unless splicep (when (plist-member params :tend) - (let ((tend (orgtbl-eval-str (plist-get params :tend)))) - (if tend (push tend *orgtbl-rtn*))))) + (let ((tend (orgtbl-eval-str (plist-get params :tend)))) + (if tend (push tend *orgtbl-rtn*))))) (mapconcat 'identity (nreverse (if remove-nil-linesp (remq nil *orgtbl-rtn*) @@ -4032,11 +4032,11 @@ provide ORGTBL directives for the generated table." (let* ((params2 (list - :tstart nil :tend nil - :hline "|---" - :sep " | " - :lstart "| " - :lend " |")) + :tstart nil :tend nil + :hline "|---" + :sep " | " + :lstart "| " + :lend " |")) (params (org-combine-plists params2 params))) (orgtbl-to-generic table params)))