[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ExecuteMetaData with [ ] instead of { }
From: |
Uwe Brauer |
Subject: |
Re: ExecuteMetaData with [ ] instead of { } |
Date: |
Wed, 24 Aug 2022 17:01:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> "AE" == Arash Esbati <arash@gnu.org> writes:
> Uwe Brauer <oub@mat.ucm.es> writes:
>> Well
>>
>> (defun my-catch-counter-inc ()
>> "Increment `my-catch-counter' and return the new value."
>> (when (= my-catch-counter 0)
>> (save-excursion
>> (goto-char (point-min))
>> (while (re-search-forward (concat "^\\%<\\*\\(" my-catch-chars "*?\\)>$")
> Wouldn't it be easier to write the regexp above like this:
> "%<\\*\\([^>]+\\)>$"
Ah, I am actually quite bad with regexp.
I tried the reg-builder or rx but even cannot deal with these.
I give it a try
>> (point-max) t)
>> (let ((fn (string-to-number (match-string 1))))
>> (when (> fn my-catch-counter)
>> (setq my-catch-counter fn))))))
>> (setq my-catch-counter (1+my-catch-counter)))
> ^
> Does this version throws an error? There is a space missing after `1+':
Arg, I tried
1 + my-catch-counter
And
1+my-catch-counter
Your solution did not occur to me. I give it a try.
BTW, I need to resend the patch, besides your changes I forgot the entry in the
Makefile.in
Uwe
smime.p7s
Description: S/MIME cryptographic signature
- Re: ExecuteMetaData with [ ] instead of { }, (continued)
- Re: ExecuteMetaData with [ ] instead of { }, Uwe Brauer, 2022/08/18
- Re: ExecuteMetaData with [ ] instead of { }, Arash Esbati, 2022/08/18
- Re: ExecuteMetaData with [ ] instead of { }, Uwe Brauer, 2022/08/18
- Re: ExecuteMetaData with [ ] instead of { }, Uwe Brauer, 2022/08/19
- Re: ExecuteMetaData with [ ] instead of { }, Arash Esbati, 2022/08/23
- Re: ExecuteMetaData with [ ] instead of { }, Uwe Brauer, 2022/08/23
- Re: ExecuteMetaData with [ ] instead of { }, Arash Esbati, 2022/08/23
- Re: ExecuteMetaData with [ ] instead of { }, Uwe Brauer, 2022/08/23
- Re: ExecuteMetaData with [ ] instead of { }, Uwe Brauer, 2022/08/23
- Re: ExecuteMetaData with [ ] instead of { }, Arash Esbati, 2022/08/24
- Re: ExecuteMetaData with [ ] instead of { },
Uwe Brauer <=