unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell")
@ 2011-07-22 10:45 Stefano Zacchiroli
       [not found] ` <handler.9146.B.131133154717743.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Stefano Zacchiroli @ 2011-07-22 10:45 UTC (permalink / raw)
  To: 9146

I'm using Emacs with viper mode and often with a console-only
emacsclient. Since a couple of weeks, viper mode is broken with
emacs snapshot. Every time I try to use M-x (or other M-something)
is impossible with Viper, I immediately obtain a "viper bell"
message in the minibuffer line and the M-x key does not get delivered
to Emacs.

I've been able to reproduce the bug with "emacs -Q -nw", then loading
Viper mode with "M-x viper-mode" (which does work before loading Viper).
From that moment on, "M-x" does not work anymore.


In GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.5)
 of 2011-07-21 on cigue, modified by Debian
 (emacs-snapshot package, version 1:20110721-1)
configured using `configure  '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.0.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/x86_64-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk' '--with-imagemagick=yes' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: it_IT.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC [ > 1 ; 2 8 0 1 ; 0 c ESC x v i p TAB e r - m o 
TAB RET i a s f g s a f g ESC ESC x ESC x ESC x ESC 
x ESC x ESC x C-_ ESC x C-g ESC [ 2 1 ~ h s

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Loading viper...
Loading /home/zack/.viper...done
Loading viper...done
Viper bell [6 times]
Undo!
Viper bell
Quit
delete-backward-char: Text is read-only [2 times]

Load-path shadows:
/usr/share/emacs/24.0.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/24.0.50/site-lisp/puppet-el/puppet-mode hides /usr/share/emacs/site-lisp/puppet-mode
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.0.50/lisp/textmodes/rst

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug tmm electric edmacro kmacro viper viper-ex viper-macs
viper-mous viper-cmd viper-keym ring viper-util viper-init advice
help-fns advice-preload help-mode easymenu view time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer loaddefs button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Quando anche i santi ti voltano le spalle, |  .  |. I've fans everywhere
ti resta John Fante -- V. Capossela .......| ..: |.......... -- C. Adams





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: Acknowledgement (24.0.50; M-x broken in console mode with viper (always gives: "viper bell"))
       [not found] ` <handler.9146.B.131133154717743.ack@debbugs.gnu.org>
@ 2011-09-28  7:25   ` Stefano Zacchiroli
  2011-09-28 16:44     ` bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell") Glenn Morris
  2011-11-04 22:43     ` bug#9146: M-x broken in console mode with viper (always gives: "viper bell")) Stefan Monnier
  0 siblings, 2 replies; 12+ messages in thread
From: Stefano Zacchiroli @ 2011-09-28  7:25 UTC (permalink / raw)
  To: 9146

On Fri, Jul 22, 2011 at 10:46:02AM +0000, GNU bug Tracking System wrote:
> If you wish to submit further information on this problem, please
> send it to 9146@debbugs.gnu.org.

Heya, any news about this?  I test it routinely with new development
snapshots and I can still reproduce it. I'm starting to fear emacs 24
can be released with this bug, de facto making viper mode unusable for
emacsclient console users.

I'll be happy to investigate it a bit more, but I'd appreciate if the
maintainers can check that I'm not the only one being able to reproduce
this.

Many thanks in advance,
Cheers.
-- 
Stefano Zacchiroli     zack@{upsilon.cc,pps.jussieu.fr,debian.org} . o .
Maître de conférences   ......   http://upsilon.cc/zack   ......   . . o
Debian Project Leader    .......   @zack on identi.ca   .......    o o o
« the first rule of tautology club is the first rule of tautology club »





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell")
  2011-09-28  7:25   ` bug#9146: Acknowledgement (24.0.50; M-x broken in console mode with viper (always gives: "viper bell")) Stefano Zacchiroli
@ 2011-09-28 16:44     ` Glenn Morris
  2011-09-28 16:48       ` Glenn Morris
  2011-11-04 22:43     ` bug#9146: M-x broken in console mode with viper (always gives: "viper bell")) Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2011-09-28 16:44 UTC (permalink / raw)
  To: Stefano Zacchiroli; +Cc: 9146


I can reproduce it, but I don't know how to fix it.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell")
  2011-09-28 16:44     ` bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell") Glenn Morris
@ 2011-09-28 16:48       ` Glenn Morris
  2011-09-30  8:50         ` Stefano Zacchiroli
  0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2011-09-28 16:48 UTC (permalink / raw)
  To: Stefano Zacchiroli; +Cc: 9146


PS bisecting to find out when it started happening may be useful.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell")
  2011-09-28 16:48       ` Glenn Morris
@ 2011-09-30  8:50         ` Stefano Zacchiroli
  2011-09-30  9:14           ` Julien Danjou
  0 siblings, 1 reply; 12+ messages in thread
From: Stefano Zacchiroli @ 2011-09-30  8:50 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Julien Danjou, 9146

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

On Wed, Sep 28, 2011 at 12:48:06PM -0400, Glenn Morris wrote:
> PS bisecting to find out when it started happening may be useful.

I'll be glad to help, although I don't think I'll have in the near
future time to do the various builds myself. I'm using emacs development
branch through the unofficial "emacs-snapshot" Debian packages
maintained by Julien Danjou (Cc:-ed).

Julien: is there an archive of past emacs-snapshot packages? If so, I'll
be happy to go through them, as a first approximation of bisection.

TIA,
Cheers.
-- 
Stefano Zacchiroli     zack@{upsilon.cc,pps.jussieu.fr,debian.org} . o .
Maître de conférences   ......   http://upsilon.cc/zack   ......   . . o
Debian Project Leader    .......   @zack on identi.ca   .......    o o o
« the first rule of tautology club is the first rule of tautology club »

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell")
  2011-09-30  8:50         ` Stefano Zacchiroli
@ 2011-09-30  9:14           ` Julien Danjou
  0 siblings, 0 replies; 12+ messages in thread
From: Julien Danjou @ 2011-09-30  9:14 UTC (permalink / raw)
  To: Stefano Zacchiroli; +Cc: 9146, Julien Danjou

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

On Fri, Sep 30 2011, Stefano Zacchiroli wrote:

> I'll be glad to help, although I don't think I'll have in the near
> future time to do the various builds myself. I'm using emacs development
> branch through the unofficial "emacs-snapshot" Debian packages
> maintained by Julien Danjou (Cc:-ed).
>
> Julien: is there an archive of past emacs-snapshot packages? If so, I'll
> be happy to go through them, as a first approximation of bisection.

Nop, but I've the versions from 1:20110917-1 on my computer if needed.
But I've nothing before.

If you want to do a git bisect with a build yourself, it really should
not be harder than cloning the repo from Alioth and calling debuild.

     http://anonscm.debian.org/gitweb/?p=users/acid/emacs-snapshot.git;a=summary

-- 
Julien Danjou

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: M-x broken in console mode with viper (always gives: "viper bell"))
  2011-09-28  7:25   ` bug#9146: Acknowledgement (24.0.50; M-x broken in console mode with viper (always gives: "viper bell")) Stefano Zacchiroli
  2011-09-28 16:44     ` bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell") Glenn Morris
@ 2011-11-04 22:43     ` Stefan Monnier
  2012-02-27 10:12       ` Chong Yidong
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2011-11-04 22:43 UTC (permalink / raw)
  To: Michael Kifer, Stefano Zacchiroli; +Cc: 9146

OK I can reproduce your problem and have tracked it down to a change of
mine in the keymap.c code.

The problem is that viper-intercept-ESC-key relies on a quirk of
the function key-binding which I fixed in Emacs-24.

More specifically, in Emacs-23, the following happened:

   (local-set-key "\e" 'toto)
   (key-binding "\ex")  =>  execute-extended-command

I.e. key-binding returned a binding that is not actually valid because
it's hidden by a shorter key-sequence in a keymap of higher precedence.
This has been fixed in Emacs-24 where it now returns nil in this case.

In the case of viper-intercept-ESC-key, the problematic keybinding is
not in the local-map but in a minor-mode-map installed by Viper and the
command is (of course) viper-intercept-ESC-key, but the problem is
the same.

IOW viper-intercept-ESC-key needs to be changed to call key-binding in
a context where Viper's minor-mode map(s) have been temporarily disabled
so the ESC binding to viper-intercept-ESC-key doesn't hide the thing
we're looking for.


        Stefan





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: M-x broken in console mode with viper (always gives: "viper bell"))
  2011-11-04 22:43     ` bug#9146: M-x broken in console mode with viper (always gives: "viper bell")) Stefan Monnier
@ 2012-02-27 10:12       ` Chong Yidong
  2012-02-27 12:08         ` Stefano Zacchiroli
  2012-02-28  1:32         ` Michael Kifer
  0 siblings, 2 replies; 12+ messages in thread
From: Chong Yidong @ 2012-02-27 10:12 UTC (permalink / raw)
  To: Stefano Zacchiroli; +Cc: Michael Kifer, 9146

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> IOW viper-intercept-ESC-key needs to be changed to call key-binding in
> a context where Viper's minor-mode map(s) have been temporarily disabled
> so the ESC binding to viper-intercept-ESC-key doesn't hide the thing
> we're looking for.

Since no one else has stepped up to the plate, I took a crack at this.

Stefano, could you test if the following patch does the right thing?


*** lisp/emulation/viper-cmd.el	2012-01-19 07:21:25 +0000
--- lisp/emulation/viper-cmd.el	2012-02-27 10:10:42 +0000
***************
*** 1086,1093 ****
  (defun viper-intercept-ESC-key ()
    "Function that implements ESC key in Viper emulation of Vi."
    (interactive)
!   (let ((cmd (or (key-binding (viper-envelop-ESC-key))
! 		 (lambda () (interactive) (error "Viper bell")))))
  
      ;; call the actual function to execute ESC (if no other symbols followed)
      ;; or the key bound to the ESC sequence (if the sequence was issued
--- 1086,1098 ----
  (defun viper-intercept-ESC-key ()
    "Function that implements ESC key in Viper emulation of Vi."
    (interactive)
!   (let* ((event (viper-envelop-ESC-key))
! 	 (cmd (cond ((equal event viper-ESC-key)
! 		     'viper-intercept-ESC-key)
! 		    ((let ((emulation-mode-map-alists nil))
! 		       (key-binding event)))
! 		    (t
! 		     (error "Viper bell")))))
  
      ;; call the actual function to execute ESC (if no other symbols followed)
      ;; or the key bound to the ESC sequence (if the sequence was issued






^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: M-x broken in console mode with viper (always gives: "viper bell"))
  2012-02-27 10:12       ` Chong Yidong
@ 2012-02-27 12:08         ` Stefano Zacchiroli
  2012-02-27 13:14           ` Chong Yidong
  2012-02-28  1:32         ` Michael Kifer
  1 sibling, 1 reply; 12+ messages in thread
From: Stefano Zacchiroli @ 2012-02-27 12:08 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Michael Kifer, 9146

On Mon, Feb 27, 2012 at 06:12:43PM +0800, Chong Yidong wrote:
> > IOW viper-intercept-ESC-key needs to be changed to call key-binding in
> > a context where Viper's minor-mode map(s) have been temporarily disabled
> > so the ESC binding to viper-intercept-ESC-key doesn't hide the thing
> > we're looking for.
> 
> Since no one else has stepped up to the plate, I took a crack at this.
> 
> Stefano, could you test if the following patch does the right thing?

That seems to have done the trick for me.
Applying the patch M-x works properly again.

-- 
Stefano Zacchiroli     zack@{upsilon.cc,pps.jussieu.fr,debian.org} . o .
Maître de conférences   ......   http://upsilon.cc/zack   ......   . . o
Debian Project Leader    .......   @zack on identi.ca   .......    o o o
« the first rule of tautology club is the first rule of tautology club »





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: M-x broken in console mode with viper (always gives: "viper bell"))
  2012-02-27 12:08         ` Stefano Zacchiroli
@ 2012-02-27 13:14           ` Chong Yidong
  2012-02-27 14:17             ` Stefano Zacchiroli
  0 siblings, 1 reply; 12+ messages in thread
From: Chong Yidong @ 2012-02-27 13:14 UTC (permalink / raw)
  To: Stefano Zacchiroli; +Cc: Michael Kifer, 9146

Stefano Zacchiroli <zack@upsilon.cc> writes:

> That seems to have done the trick for me.
> Applying the patch M-x works properly again.

Committed to trunk.  Thanks for testing.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: M-x broken in console mode with viper (always gives: "viper bell"))
  2012-02-27 13:14           ` Chong Yidong
@ 2012-02-27 14:17             ` Stefano Zacchiroli
  0 siblings, 0 replies; 12+ messages in thread
From: Stefano Zacchiroli @ 2012-02-27 14:17 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Michael Kifer, 9146

On Mon, Feb 27, 2012 at 09:14:40PM +0800, Chong Yidong wrote:
> Stefano Zacchiroli <zack@upsilon.cc> writes:
> 
> > That seems to have done the trick for me.
> > Applying the patch M-x works properly again.
> 
> Committed to trunk.  Thanks for testing.

Great, thank you for the fix!

Cheers.
-- 
Stefano Zacchiroli     zack@{upsilon.cc,pps.jussieu.fr,debian.org} . o .
Maître de conférences   ......   http://upsilon.cc/zack   ......   . . o
Debian Project Leader    .......   @zack on identi.ca   .......    o o o
« the first rule of tautology club is the first rule of tautology club »





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#9146: M-x broken in console mode with viper (always gives: "viper bell"))
  2012-02-27 10:12       ` Chong Yidong
  2012-02-27 12:08         ` Stefano Zacchiroli
@ 2012-02-28  1:32         ` Michael Kifer
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Kifer @ 2012-02-28  1:32 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Stefano Zacchiroli, 9146

Thanks Chong. I meant to get to this all these months, but my stack of things
to do kept getting deeper and deeper...
michael


On Mon, 27 Feb 2012 18:12:43 +0800
Chong Yidong <cyd@gnu.org> wrote:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 
> > IOW viper-intercept-ESC-key needs to be changed to call key-binding in
> > a context where Viper's minor-mode map(s) have been temporarily disabled
> > so the ESC binding to viper-intercept-ESC-key doesn't hide the thing
> > we're looking for.
> 
> Since no one else has stepped up to the plate, I took a crack at this.
> 
> Stefano, could you test if the following patch does the right thing?
> 
> 
> *** lisp/emulation/viper-cmd.el	2012-01-19 07:21:25 +0000
> --- lisp/emulation/viper-cmd.el	2012-02-27 10:10:42 +0000
> ***************
> *** 1086,1093 ****
>   (defun viper-intercept-ESC-key ()
>     "Function that implements ESC key in Viper emulation of Vi."
>     (interactive)
> !   (let ((cmd (or (key-binding (viper-envelop-ESC-key))
> ! 		 (lambda () (interactive) (error "Viper bell")))))
>   
>       ;; call the actual function to execute ESC (if no other symbols
> followed) ;; or the key bound to the ESC sequence (if the sequence was issued
> --- 1086,1098 ----
>   (defun viper-intercept-ESC-key ()
>     "Function that implements ESC key in Viper emulation of Vi."
>     (interactive)
> !   (let* ((event (viper-envelop-ESC-key))
> ! 	 (cmd (cond ((equal event viper-ESC-key)
> ! 		     'viper-intercept-ESC-key)
> ! 		    ((let ((emulation-mode-map-alists nil))
> ! 		       (key-binding event)))
> ! 		    (t
> ! 		     (error "Viper bell")))))
>   
>       ;; call the actual function to execute ESC (if no other symbols
> followed) ;; or the key bound to the ESC sequence (if the sequence was issued
> 





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-02-28  1:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 10:45 bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell") Stefano Zacchiroli
     [not found] ` <handler.9146.B.131133154717743.ack@debbugs.gnu.org>
2011-09-28  7:25   ` bug#9146: Acknowledgement (24.0.50; M-x broken in console mode with viper (always gives: "viper bell")) Stefano Zacchiroli
2011-09-28 16:44     ` bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell") Glenn Morris
2011-09-28 16:48       ` Glenn Morris
2011-09-30  8:50         ` Stefano Zacchiroli
2011-09-30  9:14           ` Julien Danjou
2011-11-04 22:43     ` bug#9146: M-x broken in console mode with viper (always gives: "viper bell")) Stefan Monnier
2012-02-27 10:12       ` Chong Yidong
2012-02-27 12:08         ` Stefano Zacchiroli
2012-02-27 13:14           ` Chong Yidong
2012-02-27 14:17             ` Stefano Zacchiroli
2012-02-28  1:32         ` Michael Kifer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).