unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: 60034@debbugs.gnu.org
Subject: bug#60034: comment character for org and python includes a space
Date: Wed, 14 Dec 2022 02:35:40 +0000	[thread overview]
Message-ID: <xykI_IcS2JKL3Se01b71iV1RCx49kVIvLYDqQ2yl5iisJac8zJ9FJIrhdZfU4g0cxSqFP4uM61q85MD5Nx7WNY2_KTKjzky4XKsVG1TjhG8=@protonmail.com> (raw)
In-Reply-To: <CADwFkmmbzbFUhFK0DwaiU5Cd-mMv2z0D_WVqv2XcSEXGnVe6kA@mail.gmail.com>

------- Original Message -------
On Tuesday, December 13th, 2022 at 6:36 PM, Stefan Kangas <stefankangas@gmail.com> wrote:


> tags 60034 + moreinfo
> thanks
> 
> 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.  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\\(\\[.+\\]\\).*$"))))








  reply	other threads:[~2022-12-14  2:35 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 [this message]
2023-09-10 18:47     ` Stefan Kangas
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='xykI_IcS2JKL3Se01b71iV1RCx49kVIvLYDqQ2yl5iisJac8zJ9FJIrhdZfU4g0cxSqFP4uM61q85MD5Nx7WNY2_KTKjzky4XKsVG1TjhG8=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=60034@debbugs.gnu.org \
    --cc=heimeborgia@protonmail.com \
    --cc=stefankangas@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).