Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug: viper-record-kbd-macro

5 views
Skip to first unread message

Thorsten Bonow

unread,
Oct 29, 2005, 8:49:52 AM10/29/05
to

--

Hi,

my viper keyboard macros have stopped working (don't know since when):

(viper-record-kbd-macro "gg" 'vi-state [(control f) (meta x) h i p p i e - e x p
a n d return i] t)

gives my the following error:

Debugger entered--Lisp error: (wrong-type-argument natnump nil)
ad-Orig-self-insert-command(nil) (if (interactive-p) (call-interactively
(quote ad-Orig-self-insert-command)) (ad-Orig-self-insert-command count))
(setq ad-return-value (if (interactive-p) (call-interactively ...)
(ad-Orig-self-insert-command count))) (if (and (eq viper-current-state ...)
(interactive-p)) (beep 1) (setq ad-return-value (if ... ... ...))) (let
(ad-return-value) (if (and ... ...) (beep 1) (setq ad-return-value ...))
ad-return-value) (lambda (count) "$ad-doc: self-insert-command$" (interactive
(quote ...)) (let (ad-return-value) (if ... ... ...) ad-return-value))(nil)
call-interactively(self-insert-command) read-minibuffer-internal("M-x ")
byte-code("..." [standard-output standard-input prompt recursion-depth
minibuffer-depth t read-minibuffer-internal] 2) read-from-minibuffer("M-x "
nil #<keymap minibuffer-must-match-map size 9 0xdae> nil read-command-history
nil nil) completing-read("M-x " [ccl-encode-thai-xtis ispell-dictionary-alist
0 0 0 0 loop-bindings hm--html-mode 0 0 iso-8859-4-unix 0 dired-mode-hook 0 0
0 w3-hotlist-rename-entry 0 0 ex-cmd-obsolete abbrev-start-location activation
0 0 0 elib 0 0 eudc-autoloads bit-vector modeline-scrolling-method 0 \ !
backup-inhibited verilog-mode $ latin-unity-representations-feasible-region &
ad-verify-cache-id toolbar-vector-copy \) where-is + \, -
Electric-command-history-redo-expression / plusminus yow ...] commandp t nil
read-command-history nil) read-command("M-x ") execute-extended-command(nil)
call-interactively(execute-extended-command) execute-kbd-macro([(control f)
(meta x) h i p p i e - e x p a n d return i] nil)
viper-exec-mapped-kbd-macro(nil)
call-interactively(viper-exec-mapped-kbd-macro) recursive-edit()
byte-code("..." [buffer-read-only noninteractive debugger-buffer middlestart
debugger-args debugger-batch-max-lines pop-to-buffer debugger-mode
debugger-setup-buffer count-lines 2 "...\n" message buffer-string kill-emacs
debug backtrace-debug 3 t debugger-reenable "" nil recursive-edit
standard-output] 3) debug(error (error "Last line in buffer")) signal(error
("Last line in buffer")) cerror("Last line in buffer") apply(cerror "Last line
in buffer" nil) error("Last line in buffer") viper-next-line-at-bol(nil)
call-interactively(viper-next-line-at-bol)

I tried it on my up to date Debian Unstable XEmacs

XEmacs 21.4 (patch 17) "Jumbo Shrimp" [Lucid] (i386-debian-linux, Mule) of Sat
May 28 2005 on penell

called with xemacs -vanilla and then "M-x viper", evaluated my macro in
*scratch* and called it...

The same error occurs on my self compiled

XEmacs 21.5 (beta22) "cucumber" (+CVS-20050913) [Lucid] (i686-pc-linux, Mule) of
Sun Oct 2 2005 on herrrossi

The bug does not debend on calling hippie-expand, I even tried the example from
the Viper manual:

(viper-record-kbd-macro "gg" 'vi-state [l up (meta x) n e x t - l i n e return]
t)

Compared with up to date GNU Emacs from CVS, they still work there, so the macro
definition should be OK.

Any help is appreciated...

Thanks

Toto

--
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow

[Memorable Quotes from Doc Hollywood (1991)]

(After coming out of the lake naked in
front of Dr. Stone.)

Vialula: You can blink now!

dave

unread,
Nov 24, 2005, 7:44:08 AM11/24/05
to
Hi Thorsten,
can't present the reason why, only a workaround.

We stumbled on this "wrong-type-argument natnump nil"-error after
installing xemacs 21.4.17 (from source) along with the newest
packages-sumo; I also tried the current beta (21.5-b23) with the same
result: No matter whether recording a macro using viper (mapped to
xemacs-stuff anyway) or the xemacs-stuff itself (start-kbd-macro etc.),
replaying the macro resulted in "wrong-type-argument natnump nil".

But when replacing the current packages with an older version (provided
with sunstudio10's xemacs 21.4.12 - don't know which sumo that would
be...) everything is fine again. Wasted enough (of my client's) time on
it already, so I won't trace the exact change in the packages
responsible for this, but I'm sure interested to know...

hth, dave

Thorsten Bonow

unread,
Nov 24, 2005, 9:51:53 AM11/24/05
to
>>>>> "dave" == dave <de...@dpit.de> writes:

dave> [...]

dave> But when replacing the current packages with an older version
dave> (provided with sunstudio10's xemacs 21.4.12 - don't know which sumo
dave> that would be...) everything is fine again. Wasted enough (of my
dave> client's) time on it already, so I won't trace the exact change in the
dave> packages responsible for this, but I'm sure interested to know...

dave> hth, dave

Hi, thanks for your help!

I thought I was the only one still using viper on XEmacs :-)

At least I've got a starting point now. Hope to find the time to check through
the packages in order to narrow it down...

Toto

--
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow

Like I've always said: You can pick your friends and
you can pick your nose, but you can't wipe your
friends off on your saddle.

Friedman, Kinky

Thorsten Bonow

unread,
Jan 7, 2006, 4:00:02 PM1/7/06
to
>>>>> "Toto" == Thorsten Bonow <thorste...@post.rwth-aachen.de> writes:

>>>>> "dave" == dave <de...@dpit.de> writes:

[...]

dave> But when replacing the current packages with an older version
dave> (provided with sunstudio10's xemacs 21.4.12 - don't know which sumo
dave> that would be...) everything is fine again. Wasted enough (of my
dave> client's) time on it already, so I won't trace the exact change in the
dave> packages responsible for this, but I'm sure interested to know...

[...]

Toto> At least I've got a starting point now. Hope to find the time to check
Toto> through the packages in order to narrow it down...

Hi, if someone else besides Dave and me is using XEmacs together with viper
:-), I found at least a workaround for my problem: Switching to viper keyboard
mappings:

This doesn't work any more on XEmacs:

(viper-record-kbd-macro "gg" 'vi-state [(control f) (meta x) h i p p i e - e x p a n d return i] t)

(viper-record-kbd-macro "ff" 'vi-state [(control f) (meta x) t e m p o - c o m p l e t e - t a g return i] t)
(viper-record-kbd-macro "ee" 'vi-state [(meta x) m y - e c b - g o t o - o t h e r - e d i t - w i n d o w return] t)
(viper-record-kbd-macro "qq" 'vi-state [(meta x) s e m a n t i c - i a - c o m p l e t e - s y m b o l return] t)

So I replaced it with this:

(defun my-viper-hippie-expand ()
"Wrapper function for `hippie-expand' to use with viper."
(interactive)
;; forward-char is used because when switching to viper's command-mode, cursor
;; is moved back.
(forward-char 1)
(hippie-expand nil))
(define-key viper-vi-global-user-map "gg" 'my-viper-hippie-expand)
(defun my-viper-tempo-complete-tag ()
"Wrapper function for `tempo-complete-tag' to use with viper."
(interactive)
;; forward-char is used because when switching to viper's command-mode, cursor
;; is moved back.
(forward-char 1)
(tempo-complete-tag))
(define-key viper-vi-global-user-map "ff" 'my-viper-tempo-complete-tag)
(define-key viper-vi-global-user-map "qq" 'semantic-ia-complete-symbol)
(define-key viper-vi-global-user-map "ee" 'my-ecb-goto-other-edit-window)

The only problem left is that my old macros used to switch to insert mode after
execution---I could just go ahead and type. The key mappings leave viper in
command-state. Since I can still use the macros under GNU Emacs, let's see how
long it takes to drive me crazy. Any help appreciated.

Toto


--
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow

Variation coupled with natural selection is the most widely
accepted theory that explains evolution. Evidence for
evolution itself is so overwhelming that those who deny its
reality can do so only through nonscientific arguments. They
have every right to hold such views. They just can't teach
them as science in the science class.

Steve Mirsky: Antigravity

Scientific American, February 2005, page 82

0 new messages