From: Stefan Kangas <stefankangas@gmail.com>
To: Heime <heimeborgia@protonmail.com>
Cc: 60034@debbugs.gnu.org, Stefan Monnier <monnier@gnu.org>
Subject: bug#60034: comment character for org and python includes a space
Date: Sun, 10 Sep 2023 11:47:47 -0700 [thread overview]
Message-ID: <CADwFkm=BM6cPgBE90WSBFb8SvRjJ05YBkKVRezM5kGPKXeTYWg@mail.gmail.com> (raw)
In-Reply-To: <xykI_IcS2JKL3Se01b71iV1RCx49kVIvLYDqQ2yl5iisJac8zJ9FJIrhdZfU4g0cxSqFP4uM61q85MD5Nx7WNY2_KTKjzky4XKsVG1TjhG8=@protonmail.com> (Heime's message of "Wed, 14 Dec 2022 02:35:40 +0000")
Heime <heimeborgia@protonmail.com> writes:
>> Heime via "Bug reports for GNU Emacs, the Swiss army knife of text
>> editors" bug-gnu-emacs@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.
It seems like we do it both ways in our sources, so I'm not sure if it
matters, or what is the correct way. It's not documented in the
`comment-start' docstring either.
Perhaps it's better to just leave it out unless it is a part of the
language grammar, but I don't know if it would have any adverse effects.
Stefan, what do you think?
> Another difficulty has been that in "c-mode", "comment-start" returns
> "/*" with no possibility to get the alternative "//".
Please report this as a separate bug report, and include the use case
you're looking at with all the details.
> (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\\(\\[.+\\]\\).*$"))))
next prev parent reply other threads:[~2023-09-10 18:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 15:27 bug#60034: comment character for org and python includes a space Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13 18:36 ` Stefan Kangas
2022-12-14 2:35 ` Heime via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-10 18:47 ` Stefan Kangas [this message]
2023-09-11 2:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-11 8:24 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkm=BM6cPgBE90WSBFb8SvRjJ05YBkKVRezM5kGPKXeTYWg@mail.gmail.com' \
--to=stefankangas@gmail.com \
--cc=60034@debbugs.gnu.org \
--cc=heimeborgia@protonmail.com \
--cc=monnier@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.