[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25905: 25.1; Can't find regexp and replace in SVG files
From: |
Lars Ingebrigtsen |
Subject: |
bug#25905: 25.1; Can't find regexp and replace in SVG files |
Date: |
Sun, 13 Dec 2020 13:42:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 12.12.2020 21:56, Lars Ingebrigtsen wrote:
>> But I wonder whether this problem should nevertheless have a general
>> solution. That is, should this command have a variation that works on
>> literal files instead? Perhaps a prefix of `C-u' to make the query
>> replace use find-file-literally?
>
> Perhaps there could be a whitelist of such modes instead, with
> commands that can be used to switch buffer contents to "replacable"
> form?
>
> At least in this particular example, it's hard for me to imagine users
> *not* wanting the replacements work by default. So it makes sense as
> the default behavior.
That's true. There's probably not a lot of these formats -- svg,
xpm... uhm... the pnm formats, possibly? that are "text-like" enough
that people would want to perform search-replaces on them, so writing a
whitelist would probably not be a big job.
So this command would use that whitelist to bind those formats to
fundamental-mode? Or it could be on auto-mode-alist form:
(defvar query-replace-overriding-mode-alist
'(("\\.svgz?\\'" . image-mode-as-text)
("\\.x[bp]m\\'" . image-mode-as-text)
("\\.p[bpgn]m\\'" . image-mode-as-text)))
That would make this trivial to implement. Comments?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Lars Ingebrigtsen, 2020/12/12
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Juri Linkov, 2020/12/12
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Dmitry Gutov, 2020/12/12
- bug#25905: 25.1; Can't find regexp and replace in SVG files,
Lars Ingebrigtsen <=
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Dmitry Gutov, 2020/12/13
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Juri Linkov, 2020/12/13
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Lars Ingebrigtsen, 2020/12/14
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Juri Linkov, 2020/12/14
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Lars Ingebrigtsen, 2020/12/15
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Juri Linkov, 2020/12/15
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Juri Linkov, 2020/12/17
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Juri Linkov, 2020/12/18
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Lars Ingebrigtsen, 2020/12/18
- bug#25905: 25.1; Can't find regexp and replace in SVG files, Juri Linkov, 2020/12/19