GNU bug report logs - #20564
24.5; bug in csv-set-comment-start

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Wed, 13 May 2015 05:43:02 UTC

Severity: normal

Found in version 24.5

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Liu <sdl.web <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#20564: closed (24.5; bug in csv-set-comment-start)
Date: Sun, 24 May 2015 10:54:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 24 May 2015 18:52:39 +0800
with message-id <m1382m2qo8.fsf <at> gmail.com>
and subject line Re: bug#20564: 24.5; bug in csv-set-comment-start
has caused the debbugs.gnu.org bug report #20564,
regarding 24.5; bug in csv-set-comment-start
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
20564: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20564
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; bug in csv-set-comment-start
Date: Wed, 13 May 2015 13:42:33 +0800
Using csv-mode version: 1.3.

    (defun csv-set-comment-start (string)
      "Set comment start for this CSV mode buffer to STRING.
    It must be either a string or nil."
      (interactive
       (list (edit-and-eval-command
              "Comment start (string or nil): " csv-comment-start)))
      ;; Paragraph means a group of contiguous records:
      (setq csv-comment-start string)
      (set (make-local-variable 'paragraph-separate) "[:space:]*$") ; White space.
      (set (make-local-variable 'paragraph-start) "\n");Must include \n explicitly!
      (if string
          (progn
            (setq paragraph-separate (concat paragraph-separate "\\|" string)
                  paragraph-start (concat paragraph-start "\\|" string))
            (set (make-local-variable 'comment-start) string)
            (modify-syntax-entry
             (string-to-char string) "<" csv-mode-syntax-table)
            (modify-syntax-entry ?\n ">" csv-mode-syntax-table))
        (with-syntax-table text-mode-syntax-table
          (modify-syntax-entry (string-to-char string)
                               (string (char-syntax (string-to-char string)))
                               csv-mode-syntax-table)
          (modify-syntax-entry ?\n
                               (string (char-syntax ?\n))
                               csv-mode-syntax-table))))
    

The ELSE branch of the IF form doesn't make any sense and generates an
error on NIL, i.e. (csv-set-comment-start nil)

Another question is why set a comment syntax. I checked RFC 4180 and
nothing is said on comment syntax.

Leo


[Message part 3 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: 20564-done <at> debbugs.gnu.org
Subject: Re: bug#20564: 24.5; bug in csv-set-comment-start
Date: Sun, 24 May 2015 18:52:39 +0800
csv-mode: 1.4

On 2015-05-13 13:42 +0800, Leo Liu wrote:
> The ELSE branch of the IF form doesn't make any sense and generates an
> error on NIL, i.e. (csv-set-comment-start nil)


This bug report was last modified 10 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.