emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/org.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/org.el
Date: Tue, 19 Jul 2005 19:37:04 -0400

Index: emacs/lisp/textmodes/org.el
diff -c emacs/lisp/textmodes/org.el:1.31 emacs/lisp/textmodes/org.el:1.32
*** emacs/lisp/textmodes/org.el:1.31    Tue Jul 19 16:54:26 2005
--- emacs/lisp/textmodes/org.el Tue Jul 19 23:37:03 2005
***************
*** 6996,7004 ****
       (t n))))
  
  (defun org-table-get-vertical-vector (desc &optional tbeg col)
!   "Get a calc vector from a column, accorting to desctiptor 
! Optional arguments TBEG and COL can give the beginning of the table and
! the current column, to avoid unnecessary parsing."
    (save-excursion
      (or tbeg (setq tbeg (org-table-begin)))
      (or col (setq col (org-table-current-column)))
--- 6996,7004 ----
       (t n))))
  
  (defun org-table-get-vertical-vector (desc &optional tbeg col)
!   "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."
    (save-excursion
      (or tbeg (setq tbeg (org-table-begin)))
      (or col (setq col (org-table-current-column)))
***************
*** 7046,7052 ****
                     l ",") "]"))
         ((string-match "\\([0-9]+\\)" desc)
        (beginning-of-line 1)
!       (when (re-search-backward org-table-dataline-regexp tbeg t 
                                  (string-to-number (match-string 0 desc)))
          (org-table-goto-column col)
          (org-trim (org-table-get-field))))))))
--- 7046,7052 ----
                     l ",") "]"))
         ((string-match "\\([0-9]+\\)" desc)
        (beginning-of-line 1)
!       (when (re-search-backward org-table-dataline-regexp tbeg t
                                  (string-to-number (match-string 0 desc)))
          (org-table-goto-column col)
          (org-trim (org-table-get-field))))))))
***************
*** 7142,7148 ****
  ACTION can be `remove', `insert', `swap'.  For `swap', two column numbers are
  expected, for the other action only a single column number is needed."
    (let ((list (org-table-get-stored-formulas))
!       (nmax (length (org-split-string 
                       (buffer-substring (point-at-bol) (point-at-eol))
                       "|")))
        col col1 col2 scol si sc1 sc2)
--- 7142,7148 ----
  ACTION can be `remove', `insert', `swap'.  For `swap', two column numbers are
  expected, for the other action only a single column number is needed."
    (let ((list (org-table-get-stored-formulas))
!       (nmax (length (org-split-string
                       (buffer-substring (point-at-bol) (point-at-eol))
                       "|")))
        col col1 col2 scol si sc1 sc2)
***************
*** 7221,7227 ****
              fields (org-split-string (match-string 2) " *| *"))
        (save-excursion
          (beginning-of-line (if (equal c "_") 2 0))
!         (setq line (org-current-line) col 1)    
          (and (looking-at "^[ \t]*|[^|]*\\(|.*\\)")
               (setq fields1 (org-split-string (match-string 1) " *| *"))))
        (while (and fields1 (setq field (pop fields)))
--- 7221,7227 ----
              fields (org-split-string (match-string 2) " *| *"))
        (save-excursion
          (beginning-of-line (if (equal c "_") 2 0))
!         (setq line (org-current-line) col 1)
          (and (looking-at "^[ \t]*|[^|]*\\(|.*\\)")
               (setq fields1 (org-split-string (match-string 1) " *| *"))))
        (while (and fields1 (setq field (pop fields)))
***************
*** 7557,7566 ****
      (goto-line thisline)
      (org-table-goto-column thiscol)
      (or noalign (and org-table-may-need-update (org-table-align))
!       (and all (message "Re-applying formulas...done" cnt)))))
  
  (defun org-table-formula-substitute-names (f)
!   "Replace $const with values in stirng F."
    (let ((start 0) a n1 n2 nn1 nn2 s (f1 f))
      ;; First, check for column names
      (while (setq start (string-match org-table-column-name-regexp f start))
--- 7557,7566 ----
      (goto-line thisline)
      (org-table-goto-column thiscol)
      (or noalign (and org-table-may-need-update (org-table-align))
!       (and all (message "Re-applying formulas...done")))))
  
  (defun org-table-formula-substitute-names (f)
!   "Replace $const with values in string F."
    (let ((start 0) a n1 n2 nn1 nn2 s (f1 f))
      ;; First, check for column names
      (while (setq start (string-match org-table-column-name-regexp f start))
***************
*** 7621,7627 ****
      (set (make-local-variable 'org-pos) pos)
      (set (make-local-variable 'org-window-configuration) wc)
      (use-local-map org-edit-formulas-map)
!     (setq s "# Edit formulas and finish with `C-c C-c'. 
  # Use `C-u C-c C-c' to also appy them immediately to the entire table.
  # Use `C-c ?' to get information about $name at point.
  # To cancel editing, press `C-c C-q'.\n")
--- 7621,7627 ----
      (set (make-local-variable 'org-pos) pos)
      (set (make-local-variable 'org-window-configuration) wc)
      (use-local-map org-edit-formulas-map)
!     (setq s "# Edit formulas and finish with `C-c C-c'.
  # Use `C-u C-c C-c' to also appy them immediately to the entire table.
  # Use `C-c ?' to get information about $name at point.
  # To cancel editing, press `C-c C-q'.\n")
***************
*** 7659,7665 ****
        (switch-to-buffer-other-window (marker-buffer pos))
        (goto-char pos)
        (goto-char (org-table-begin))
!       (if (re-search-forward (concat "^[ \t]*| *! *.*?| *\\(" var "\\) *|") 
                             (org-table-end) t)
          (progn
            (goto-char (match-beginning 1))
--- 7659,7665 ----
        (switch-to-buffer-other-window (marker-buffer pos))
        (goto-char pos)
        (goto-char (org-table-begin))
!       (if (re-search-forward (concat "^[ \t]*| *! *.*?| *\\(" var "\\) *|")
                             (org-table-end) t)
          (progn
            (goto-char (match-beginning 1))
***************
*** 7714,7720 ****
      (org-table-store-formulas eql)
      (move-marker pos nil)
      (kill-buffer "*Edit Formulas*")
!     (if arg 
        (org-table-recalculate 'all)
        (message "New formulas installed - press C-u C-c C-c to apply."))))
  
--- 7714,7720 ----
      (org-table-store-formulas eql)
      (move-marker pos nil)
      (kill-buffer "*Edit Formulas*")
!     (if arg
        (org-table-recalculate 'all)
        (message "New formulas installed - press C-u C-c C-c to apply."))))
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]