[implementations-list] [Vimpulse] Bug: something's worng when pasting whole lines:
;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. If the cursor is at the beginning of the buffer and for example I do jVjyP the result is ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer.;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. Alessandro Piras
Another annoying glitch about copy/pasting visual-line selected lines: 1 2 3 suppose the cursor is at the beginning of the buffer: Vjyjjp leads to 1 2 1 2 3 where it should be 1 2 1 2 3 the result is the same if i use P instead of p, where it should be 1 2 1 2 3 Alessandro Piras On 18 May 2010 14:48, Alessandro Piras <[email protected]> wrote:
;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer.
If the cursor is at the beginning of the buffer and for example I do jVjyP the result is ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer.;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer.
Alessandro Piras
Am Dienstag, 18. Mai 2010 schrieb Alessandro Piras:
Another annoying glitch about copy/pasting visual-line selected lines:
I had similar problems with vim-mode. The reason is the special case of newlines at the eof and in empty lines. In your first example, the last line in the buffer does not end in a newline charactor so viper does not recognize the text as "linewise" (I think). In the second example the cursor is placed on the newline-character of the empty line. This is special because this is the only situation where viper allows to place the cursor on the newline-character (usually it's on a regular charactor) and the paste-command should be aware of this case. In vim-mode I solved the problem using the yank-handler feature of the newer Emacsen (GNU Emacs 22, 23??). This also allowes to deal with pasting of blocks without any need to modify the paste-function (everything is set up during yanking). In fact, yank-handler allows a very clean implementation of all three cases (char, line, block) without any hacks. The biggest problem is that this feature is not available in XEmacs or ealier versions of GNU Emacs, but it's not hard to implement it. If you want to go this way, have a look at vim-commands.el (for the yanking/pasting stuff) and vim-compat.el (for the yank-handler modifications for earlier Emacsen) of the current vim-mode. Frank
From: [email protected] Date: Tue, 18 May 2010 16:33:16 +0200
In vim-mode I solved the problem using the yank-handler feature of the newer Emacsen (GNU Emacs 22, 23??). This also allowes to deal with pasting of blocks without any need to modify the paste-function (everything is set up during yanking).
Yes, this is the "right" way to do it. What Viper does is to check if the text to be pasted ends with a newline, which might fail at the end of the buffer. (But that doesn't seem to be the problem here.) I should probably reimplement block pasting in terms of yank-handler, and maybe redefine the `viper-[Pp]ut-back' functions, too. But then there's XEmacs ...
The biggest problem is that this feature is not available in XEmacs or ealier versions of GNU Emacs, but it's not hard to implement it.
TBH, if it weren't for the fact that Viper supports XEmacs already, I would never have bothered with XEmacs compatibility. And I think Vimpulse would have been better off without it. Every time I encounter some XEmacs idiosyncracy needing special treatment, Vimpulse's code inevitably grows exponentially, no matter how hard I try to do things "cleanly" with reuseable functions that do what I want depending on the circumstances. There's a lot to be said for throwing away old code (including XEmacs). Vegard _________________________________________________________________ Nye Windows 7: PCen som passer for deg. Finn ut mer. http://windows.microsoft.com/shop
Hi Vegard, I just pulled the last vimpulse and the problems persist, totally same as before. This is my emacs version: "GNU Emacs 23.1.92.1 (i386-mingw-nt6.1.7600) of 2010-02-03 on LENNART-69DE564 (patched)" I also tried it disabling everything but vimpulse ;; .emacs (add-to-list 'load-path "C:/Users/ale/emacs/site-lisp") (require 'vimpulse) Could you try to do the same? It could be its a problem with my emacs. Alessandro Piras On 18 May 2010 18:14, Vegard Øye <[email protected]> wrote:
From: [email protected] Date: Tue, 18 May 2010 16:33:16 +0200
In vim-mode I solved the problem using the yank-handler feature of the newer Emacsen (GNU Emacs 22, 23??). This also allowes to deal with pasting of blocks without any need to modify the paste-function (everything is set up during yanking).
Yes, this is the "right" way to do it. What Viper does is to check if the text to be pasted ends with a newline, which might fail at the end of the buffer. (But that doesn't seem to be the problem here.)
I should probably reimplement block pasting in terms of yank-handler, and maybe redefine the `viper-[Pp]ut-back' functions, too. But then there's XEmacs ...
The biggest problem is that this feature is not available in XEmacs or ealier versions of GNU Emacs, but it's not hard to implement it.
TBH, if it weren't for the fact that Viper supports XEmacs already, I would never have bothered with XEmacs compatibility. And I think Vimpulse would have been better off without it. Every time I encounter some XEmacs idiosyncracy needing special treatment, Vimpulse's code inevitably grows exponentially, no matter how hard I try to do things "cleanly" with reuseable functions that do what I want depending on the circumstances.
There's a lot to be said for throwing away old code (including XEmacs).
Vegard
_________________________________________________________________ Nye Windows 7: PCen som passer for deg. Finn ut mer. http://windows.microsoft.com/shop _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
On Tue, May 18, 2010 at 11:53:18PM +0100, Alessandro Piras wrote:
Hi Vegard, I just pulled the last vimpulse and the problems persist, totally same as before. This is my emacs version: "GNU Emacs 23.1.92.1 (i386-mingw-nt6.1.7600) of 2010-02-03 on LENNART-69DE564 (patched)"
I also tried it disabling everything but vimpulse ;; .emacs (add-to-list 'load-path "C:/Users/ale/emacs/site-lisp") (require 'vimpulse) Could you try to do the same? It could be its a problem with my emacs. Alessandro Piras
FWIW, I just did, and can't reproduce any of the problems you described in this thread (i.e. the actual behaviour is the same as the correct versions you gave). You might want to try some other Emacs (isn't the 23.2 release available for Windows, for example?). Štěpán
I tried 23.2.1 from the gnu website instead of the patched emacsw32, the problem persists. Also tried emacsw32, version 24.0.50, patched, same problem. On 19 May 2010 09:00, Štěpán Němec <[email protected]> wrote:
On Tue, May 18, 2010 at 11:53:18PM +0100, Alessandro Piras wrote:
Hi Vegard, I just pulled the last vimpulse and the problems persist, totally same as before. This is my emacs version: "GNU Emacs 23.1.92.1 (i386-mingw-nt6.1.7600) of 2010-02-03 on LENNART-69DE564 (patched)"
I also tried it disabling everything but vimpulse ;; .emacs (add-to-list 'load-path "C:/Users/ale/emacs/site-lisp") (require 'vimpulse) Could you try to do the same? It could be its a problem with my emacs. Alessandro Piras
FWIW, I just did, and can't reproduce any of the problems you described in this thread (i.e. the actual behaviour is the same as the correct versions you gave).
You might want to try some other Emacs (isn't the 23.2 release available for Windows, for example?).
Štěpán
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
On Wed, May 19, 2010 at 10:40:19AM +0100, Alessandro Piras wrote:
I tried 23.2.1 from the gnu website instead of the patched emacsw32, the problem persists. Also tried emacsw32, version 24.0.50, patched, same problem.
o_O interesting... Another idea: are you sure you're loading the correct version of Vimpulse, i.e. does your (add-to-list 'load-path "C:/Users/ale/emacs/site-lisp") really do what you think it does? Štěpán -- A: Because it makes threads hard to read. B: Why? A: Top-posting is evil.
From: [email protected] Date: Tue, 18 May 2010 23:53:18 +0100
This is my emacs version: "GNU Emacs 23.1.92.1 (i386-mingw-nt6.1.7600) of 2010-02-03 on LENNART-69DE564 (patched)"
I also tried it disabling everything but vimpulse ;; .emacs (add-to-list 'load-path "C:/Users/ale/emacs/site-lisp") (require 'vimpulse) Could you try to do the same? It could be its a problem with my emacs.
Sure, I still have my copy of 23.1 lying around. I copied the latest Vimpulse files to it, started it from the command line with -q and evaluated (require 'vimpulse) in the *scratch* buffer. Still nothing. Here's a wild guess: what is your P key bound to (C-h k P)? Vegard _________________________________________________________________ Nye Windows 7: PCen som passer for deg. Finn ut mer. http://windows.microsoft.com/shop
I got it working. It seems it was some stale vimpulse .el or .elc file that was generating problem. I deleted all the vimpulse files I could find on the system and now it seems to work correctly :) Thanks for your help :) On 19 May 2010 11:33, Vegard Øye <[email protected]> wrote:
From: [email protected] Date: Tue, 18 May 2010 23:53:18 +0100
This is my emacs version: "GNU Emacs 23.1.92.1 (i386-mingw-nt6.1.7600) of 2010-02-03 on LENNART-69DE564 (patched)"
I also tried it disabling everything but vimpulse ;; .emacs (add-to-list 'load-path "C:/Users/ale/emacs/site-lisp") (require 'vimpulse) Could you try to do the same? It could be its a problem with my emacs.
Sure, I still have my copy of 23.1 lying around. I copied the latest Vimpulse files to it, started it from the command line with -q and evaluated (require 'vimpulse) in the *scratch* buffer. Still nothing.
Here's a wild guess: what is your P key bound to (C-h k P)?
Vegard
_________________________________________________________________ Nye Windows 7: PCen som passer for deg. Finn ut mer. http://windows.microsoft.com/shop _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
From: [email protected] Date: Tue, 18 May 2010 14:55:33 +0100
If the cursor is at the beginning of the buffer and for example I do jVjyP the result is ;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer.;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer.
Another annoying glitch about copy/pasting visual-line selected lines: 1 2
3 suppose the cursor is at the beginning of the buffer: Vjyjjp leads to 1 2 1 2 3
I'm sorry, but I can't replicate either of this. I get the correct behavior in both cases. Are you sure you are using the latest version of Vimpulse? Vegard _________________________________________________________________ Få nye Windows Live™ Messenger. http://download.live.com/messenger
participants (4)
-
Alessandro Piras -
Frank Fischer -
Vegard Øye -
Štěpán Němec