[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Regexp with comment character of buffer
From: |
Heime |
Subject: |
Re: Regexp with comment character of buffer |
Date: |
Mon, 12 Aug 2024 12:36:26 +0000 |
On Tuesday, August 13th, 2024 at 12:26 AM, Yuri Khan <yuri.v.khan@gmail.com>
wrote:
> On Mon, 12 Aug 2024 at 18:41, Heime heimeborgia@protonmail.com wrote:
>
> > > > How can I change the regexp so that instead of the beginning ;;;
> > > > I use the comment character of the current buffer, replicated three
> > > > times ?
> > > >
> > > > (let ( (heading-regexp "^;;;\\s-+\\([HM][[:digit:]]\\)\\s-")
>
> > Have done the following. Do I really need all this or are there better ways
> > ?
> >
> > (let* ((comment-char (regexp-quote (string-trim comment-start)))
> > (three-comment-chars (make-string 3 (string-to-char comment-char)))
>
>
> Does that work for you? (If not, go back to solving the problem.)
>
> Does that work in all scenarios that are important to you? (If not, go
> back to solving the problem in a more general way.)
>
> What aspects of the working solution seem unsatisfactory to you?
>
> What hypothetical capabilities would you require in order to improve
> those aspects?
Is a string-trim required for comment-start ?
- Regexp with comment character of buffer, Heime, 2024/08/12
- Re: Regexp with comment character of buffer, Yuri Khan, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12
- Re: Regexp with comment character of buffer, Yuri Khan, 2024/08/12
- Re: Regexp with comment character of buffer,
Heime <=
- Re: Regexp with comment character of buffer, Yuri Khan, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12
- Re: Regexp with comment character of buffer, Yuri Khan, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12
- Re: Regexp with comment character of buffer, Heime, 2024/08/12