diff options
Diffstat (limited to 'lisp/org/org-table.el')
-rw-r--r-- | lisp/org/org-table.el | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 6408f48ccbd..bf0f503da2e 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2004-2024 Free Software Foundation, Inc. ;; Author: Carsten Dominik <carsten.dominik@gmail.com> -;; Keywords: outlines, hypermedia, calendar, wp +;; Keywords: outlines, hypermedia, calendar, text ;; URL: https://orgmode.org ;; ;; This file is part of GNU Emacs. @@ -417,7 +417,7 @@ It is probably good to never set this variable to nil, for the sake of portability of tables." :group 'org-table-calculation :type '(choice - (const :tag "Allow to cross" t) + (const :tag "Allow crossing hline" t) (const :tag "Stick to hline" nil) (const :tag "Error on attempt to cross" error))) @@ -2862,7 +2862,7 @@ list, `literal' is for the format specifier L." (if lispp (if (eq lispp 'literal) elements - (if (and (eq elements "") (not keep-empty)) + (if (and (equal elements "") (not keep-empty)) "" (prin1-to-string (if numbers (string-to-number elements) elements)))) @@ -3900,7 +3900,7 @@ When non-nil, return the overlay narrowing the field." ;; Aligning table from the first row will not shrink again the ;; second row, which was not visible initially. ;; - ;; However, fixing it requires to check every row, which may be + ;; However, fixing it requires checking every row, which may be ;; slow on large tables. Moreover, the hindrance of this ;; pathological case is very limited. (beginning-of-line) @@ -6134,9 +6134,13 @@ supported." (with-temp-buffer (insert (orgtbl-to-orgtbl table params)) (org-table-align) - (replace-regexp-in-string - "-|" "-+" - (replace-regexp-in-string "|-" "+-" (buffer-substring 1 (buffer-size)))))) + (goto-char (point-min)) + (while (search-forward "-|" nil t) + (replace-match "-+")) + (goto-char (point-min)) + (while (search-forward "|-" nil t) + (replace-match "+-")) + (buffer-string))) (defun orgtbl-to-unicode (table params) "Convert the `orgtbl-mode' TABLE into a table with unicode characters. |