GNU bug report logs - #60034
comment character for org and python includes a space

Previous Next

Package: emacs;

Reported by: Heime <heimeborgia <at> protonmail.com>

Date: Tue, 13 Dec 2022 15:29:02 UTC

Severity: normal

Tags: notabug, wontfix

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 60034 <at> debbugs.gnu.org (full text, mbox):

From: Heime <heimeborgia <at> protonmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 60034 <at> debbugs.gnu.org
Subject: Re: bug#60034: comment character for org and python includes a space
Date: Wed, 14 Dec 2022 02:35:40 +0000
------- Original Message -------
On Tuesday, December 13th, 2022 at 6:36 PM, Stefan Kangas <stefankangas <at> gmail.com> wrote:


> tags 60034 + moreinfo
> thanks
> 
> Heime via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" bug-gnu-emacs <at> gnu.org writes:
> 
> > How is it that the comment character for org and python include a space "# ", when
> > for all other languages it is only a single character?
> 
> 
> Could you explain which variable(s) you are looking at?
> 
> Are you reporting a bug in the behavior of python-mode and org-mode? If
> so, what is it?

It is about "comment-start".  I am constructing a "regexp" for use with hi-lock mode to highlight certain comments.

For elisp I am matching ";; [Text] More"

The regex is adapted for the particular programming mode.  Another difficulty has been that in "c-mode", "comment-start" returns "/*" with no possibility to get the alternative "//". 

(defun tegor ()
  "TODO."
  (interactive)

  (let ( (fm (format "%s%s" comment-start comment-start)) )

    (message "fm: %s" fm)
    (message "kmcategor: %s"
       (format "%s%s%s" "^\s*" fm "\s\\(\\[.+\\]\\).*$"))))







This bug report was last modified 1 year and 252 days ago.

Previous Next


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