GNU bug report logs - #17558
24.4.50; global-subword-mode breaks ERC

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Fri, 23 May 2014 09:20:02 UTC

Severity: normal

Tags: fixed

Merged with 20347

Found in versions 24.4.50, 25.0.50

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Colascione <dancol <at> dancol.org>
To: Drew Adams <drew.adams <at> oracle.com>, Glenn Morris <rgm <at> gnu.org>,  Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: Dima Kogan <dima <at> secretsauce.net>, 17558 <at> debbugs.gnu.org
Subject: bug#17558: 24.4.50; global-subword-mode breaks ERC
Date: Mon, 27 Apr 2015 16:30:15 -0700
[Message part 1 (text/plain, inline)]
On 04/27/2015 04:24 PM, Drew Adams wrote:
>>>> Indeed, with the new implementation of subword-mode, most of the
>>>> word-operating commands should be marked as "interactive use
>>>> only", since their behavior is too unreliable for use in Lisp code.
>>>
>>> Sounds to me like it will be a PITA to review/replace every
>>> non-interactive usage of those commands.
>>> Are people certain they want to go down this road?
>>
>> I am. It's the only way we can make sure that interactive commands
>> that move by words *indirectly* do the right thing in the presence of
>> user customizations.
> 
> Mille excuses - I have not been following this thread.
> 
> Just what is meant by "non-interactive use of `forward-word'
> and `backward-word'"?  Any call to either of them in Lisp code?
> And what is meant by "*indirectly*".

Lisp code has no right to expect that "words" mean anything in
particular. The scheme for detecting word boundaries is a user
customization point. find-word-boundary-function-table has been
supported for a while now, if not heavily used.

> Will you be telling users (e.g. in NEWS) precisely *how* they
> need to modify existing non-interactive calls to those functions?
> Saying that they should be used only interactively from now on
> does not tell users how to fix existing code that calls them.

Code can either use sexp movement or bind
find-word-boundary-function-table (which has been in Emacs for ages, by
the way) to a value they expect.

> And just what is unsafe about calling these two functions from
> Lisp?

Nothing: what's unsafe is expecting that users haven't customized word
boundaries.

> 
> Sorry, but this is not clear to me.  (And why not create new
> functions/commands, instead of changing the meaning/behavior
> of these longstanding ones?)

Because lots of packages invoke word movement commands on the user's
behalf, expecting that movement happens by words. By changing word
boundaries, we make subword mode work as expected everywhere instead of
making everyone that deals with word movement handle the possibility of
subword-mode separately.

The behavior of forward-word hasn't changed. We now make use of an Emacs
core feature that was not heavily used before. Code that relied on this
core feature going unused has always been broken. It's worth mentioning
in NEWS, sure, but I'm against just rebinding the movement commands.

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 9 years and 161 days ago.

Previous Next


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