GNU bug report logs - #36167
[PATCH] Replace manually crafted hex regexes with [[:xdigit:]]

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Date: Tue, 11 Jun 2019 12:00:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 36167 <at> debbugs.gnu.org
Subject: bug#36167: [PATCH] Replace [0-9a-fA-F] with [[:xdigit:]]
Date: Wed, 12 Jun 2019 03:29:29 +0300

В Вт, июн 11, 2019 at 15:30, Robert Pluim <rpluim <at> gmail.com> 
написал:
>>>>>>  On Tue, 11 Jun 2019 16:17:10 +0300, Konstantin Kharlamov 
>>>>>> <hi-angel <at> yandex.ru> said:
> 
>     Konstantin> * etc/schema/od-schema-v1.2-os.rnc: replace
>     Konstantin> [0-9a-fA-F] with [[:xdigit:]]
>     >>
>     >> This is the org schema file for OpenDocument export, not emacs
>     >> lisp. Does that support :xdigit: syntax?
> 
>     Konstantin> Oh, okay, thanks, I couldn't figure out what it is 
> because Wikipedia
>     Konstantin> says that .rnc is just a variation of XML, and README 
> just says it's
>     Konstantin> something to map some xml schemas to documents. So I 
> deemed these
>     Konstantin> regexps are too used by ELisp.
> 
>     Konstantin> Can I test it somehow? Either way, not a big deal, I 
> can just drop
>     Konstantin> that one.
> 
> If I remember correctly, the schema is copied into the resulting
> OpenDocument file, so itʼs probably safest not to touch it.
> 
>     Konstantin> * lisp/calc/calc-aent.el: replace [0-9a-fA-F] with
>     Konstantin> [[:xdigit:]]
>     >>
>     >> Normally, you'd mention the containing function in the 
> ChangeLog
>     >> entry. Using 'C-x 4 a' (ie 
> 'add-change-log-entry-other-window') with
>     >> point on the code youʼre changing does that for you.
> 
>     Konstantin> Ah, thanks. At this point I'll probably ask on 
> emacs-devel about
>     Konstantin> adding to prepare-commit-msg a code to pre-format the 
> changes, because
>     Konstantin> clearly that's a lot of manual work for something 
> that should be
>     Konstantin> automated.
> 
> Itʼs pretty automated:
> 
> - Do M-x vc-dir in your emacs repository to see which files are 
> changed
> - Do C-x 4 a to prepare the ChangeLog entries
> - Mark the files you want you commit
> - Commit from the vc-dir buffer. This will copy the earlier ChangeLog
>  entries into the commit message buffer

Okay, so, after I do the first 2 points, I end up in a buffer with the 
following content

> 2019-06-12    <constantine <at> constantine-N61Ja>
>
> 	*  (Stash):

I am not sure what to do next, because I guess this buffer supposed to 
have changed function names? I also tried first marking files in vc-dir 
with "m" key, and then doing the 2nd point, to no avail.

> Unless you meant completely automatically generating the ChangeLog
> entries, which is a wholly different can of worms.

Yeah. It would be very useful, because had you not write that this 
could be automated, I'd never guessed. And even now that you wrote 
about it, I still don't understand how to make it work. I guess I'm not 
an unique contributor in such position.

But I think possibility of such change may be better to discuss in a 
separate thread.






This bug report was last modified 5 years and 321 days ago.

Previous Next


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