GNU bug report logs - #24759
25.1.50; electric-quote-mode

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Fri, 21 Oct 2016 19:39:02 UTC

Severity: minor

Found in version 25.1.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 24759 <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 24759 <at> debbugs.gnu.org
Subject: Re: bug#24759: 25.1.50; electric-quote-mode
Date: Sat, 22 Oct 2016 12:36:38 +0200
>> > And if electric-quote-mode wants to be more user-friendly, it could
>> > ask, upon the first insertion of any electric quote character into a
>> > buffer, whether the user would like to her buffer-file-coding-system
>> > switched to UTF-8.
>>
>> I'd like such a feature, but I'd rather make it general (not specific
>> to electric-quote-mode).  That is, whenever a buffer gets a character
>> (whether typed, yanked, electrically inserted, ...) which is not
>> representable in the current buffer-file-coding-system, Emacs could
>> offer the user to switch the coding system to UTF-8 (or another one
>> which can represent all the characters currently present in the
>> buffer), like happens when the buffer is about to be saved to a file.
>
> IMO, this would be too annoying and detrimental to performance in many
> cases.  I think you underestimate how much 'insert' is used in Emacs,
> without the user knowing anything about that.  In most such cases, the
> buffer into which the character is entered will never be saved to any
> file.
>
> My proposal was specifically for the case where keyboard input caused
> these characters be inserted after conversion by electric-quote-mode,
> which hopefully restricts the applicable use cases to those where the
> user is typing at the keyboard.

OK.  In that case I withdraw my general approach.

> Date: Sat, 22 Oct 2016 09:49:00 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 24759 <at> debbugs.gnu.org
>
> So I actually question the need for any test in electric--insertable-p.
> What bad things, besides the prompt at save-buffer time, will happen
> if we remove the test, and insert the characters unconditionally?

FWIW: I'd also prefer to remove that check from electric-quote-mode,
so that the quote conversion would always happen (if the minor mode is
enabled in the current buffer), regardless of
buffer-file-coding-system.

Thanks.

-- 
Dani Moncayo




This bug report was last modified 8 years and 271 days ago.

Previous Next


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