emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/csv-mode c7cbb79: Fix problem when using columns contai


From: Lars Ingebrigtsen
Subject: [elpa] externals/csv-mode c7cbb79: Fix problem when using columns containing % in csv-mode header lines
Date: Fri, 10 Sep 2021 07:26:17 -0400 (EDT)

branch: externals/csv-mode
commit c7cbb79cc96812b1bb7b53111de2a55e742e6026
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix problem when using columns containing % in csv-mode header lines
    
    * csv-mode.el (csv--compute-header-string): Quote percentages
    before using them (otherwise they'll be interpreted as format
    directives) (bug#50498).
---
 csv-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/csv-mode.el b/csv-mode.el
index ecc33a7..8ba7161 100644
--- a/csv-mode.el
+++ b/csv-mode.el
@@ -1370,7 +1370,8 @@ If there is already a header line, then unset the header 
line."
       (jit-lock-fontify-now (point) (line-end-position))
       ;; Not sure why it is sometimes nil!
       (move-to-column (or csv--header-hscroll 0))
-      (let ((str (buffer-substring (point) (line-end-position)))
+      (let ((str (replace-regexp-in-string
+                 "%" "%%" (buffer-substring (point) (line-end-position))))
             (i 0))
         (while (and i (< i (length str)))
           (let ((prop (get-text-property i 'display str)))



reply via email to

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