Jason Spiro | 1 Dec 04:20 2009
Picon

Whether Vimpulse may intentionally work differently than Vim (was: [PATCH] Vimpulse: vi* and va* ...)

2009/11/29 Jos? A. Romero L. <escherdragon at gmail.com> wrote:
> [...]
> [...] I've divided the original patch into
> 3 smaller ones: one for removing the extra definitions of ?the ?function
> vimpulse-visual-replace-region, and two for the vi*/va* stuff, the first
> one with standard gvim behavior, and the second one with a ?function ?of
> my ?own invention that IMO makes that behavior more useful.
> [...]

I always tried to make sure Vimpulse worked as much like Vim as
possible.  If somebody thought Vim behavior could be improved, then I
wanted them to email the Vim mailing list and get the change made in
Vim.  Once the change was made in Vim, then the same change could be
made in Vimpulse.

This would provide two advantages.

*  People who use both Vim and Vimpulse could use the same keys in both.

*  It would be possible to one day copy and paste from the Vim
documentation into the Vimpulse documentation, maybe by an automated
Vimpulse .txt-format-help-file-generation script.

But now that Alessandro is maintainer, it is his choice whether to
continue to enforce this policy or not.

José A. Romero L. | 1 Dec 09:19 2009
Picon

Whether Vimpulse may intentionally work differently than Vim (was: [PATCH] Vimpulse: vi* and va* ...)

2009/12/1 Jason Spiro <jasonspiro3 at gmail.com>:
> 2009/11/29 Jos? A. Romero L. <escherdragon at gmail.com> wrote:
>> [...]
>> [...] I've divided the original patch into
>> 3 smaller ones: one for removing the extra definitions of ?the ?function
(...)
> I always tried to make sure Vimpulse worked as much like Vim as
> possible. ?If somebody thought Vim behavior could be improved, then I
> wanted them to email the Vim mailing list and get the change made in
> Vim. ?Once the change was made in Vim, then the same change could be
> made in Vimpulse.
(...)

That's  why I put the non-vim stuff in a separate patch. Take it only
if you like it.  IMHO  Vim  is  there  to  be  superseded,  not  just
imitated, but that's only MHO ;-)

Cheers,
--

-- 
Jos? A. Romero L.
escherdragon at gmail.com
"The opposite of war is not peace, it's creation."
(Jonathan Larson)

Vegard Øye | 1 Dec 20:09 2009
Picon

[PATCH] Small fixes


I have made a few fixes, attached to this e-mail as a patch
(patch.txt). They are:

* AUTOMATIC LOADING OF CL.EL: if cl.el isn't loaded already (Common
? Lisp extensions for Emacs), one gets error messages bemoaning
? undefined functions like `destructuring-bind'. Added (require 'cl)
? to fix this.

* FIXED `TRAILING-NEWLINES' PARAMETER: corrected a small typo in the
? function `vimpulse-get-bounds-with-whitespace'. See
? http://www.emacswiki.org/emacs/vimpulse for details.

I also took the liberty to remove any trailing whitespace
(M-x delete-trailing-whitespace), which made the patch a bit larger
than it otherwise would have been.

The patch was made with the GnuWin32 version of diff, running on
Windows XP, with the command

??? diff vimpulse-old.el vimpulse.el> patch.txt

where vimpulse-old.el is version 0.3.0 of Vimpulse, downloaded from
http://www.emacswiki.org/emacs/vimpulse.el.

Tested on GNU Emacs 23.1.

Vegard ?ye
 		 	   		  
_________________________________________________________________
(Continue reading)

John J. Foerch | 1 Dec 21:06 2009
Picon
Picon

[PATCH] Small fixes

On Tue, Dec 01, 2009 at 07:09:37PM +0000, Vegard ?ye wrote:
> 
> * AUTOMATIC LOADING OF CL.EL: if cl.el isn't loaded already (Common
> ? Lisp extensions for Emacs), one gets error messages bemoaning
> ? undefined functions like `destructuring-bind'. Added (require 'cl)
> ? to fix this.
> 

Just a note about cl.el: I believe the GNU Emacs policy is still that
cl.el is to be regarded as a compile-time emulation layer only, and it
should never be loaded at runtime.  They will not accept any code into
official Emacs that requires cl.el at runtime.  As an elisp coder myself,
I have found that cl.el is occasionally convenient, rarely needed, and
often over-used.  When I write libraries I avoid it altogether not only
because of the GNU policy, but also because it can introduce subtle bugs
because of alternate definitions of functions like `push', and once one
library has loaded cl.el at runtime, your Emacs is "infected" with it, and
problems related to it in other libraries become harder to debug.

Although I'm not directly involved in vimpulse, I would recommend looking
at the situation where cl.el is used and evaluating whether it is truly
necessary in the first place.

--

-- 
John Foerch

Vegard Øye | 1 Dec 22:38 2009
Picon

[PATCH] Small fixes


> Date: Tue, 1 Dec 2009 15:06:13 -0500
> From: jjfoerch at earthlink.net
> To: implementations-list at lists.ourproject.org
> Subject: Re: [implementations-list] [PATCH] Small fixes
>
> Although I'm not directly involved in vimpulse, I would recommend
> looking at the situation where cl.el is used and evaluating whether
> it is truly necessary in the first place.

The `destructuring-bind' messages are recent; I never had them with
older versions of Vimpulse. So presumably, not much rewriting is
necessary to revert to Vanilla Elisp.

`M-x occur' lists 7 matches for `destructuring-bind' in vimpulse.el.

It wouldn't make any difference to the Emacs maintainers if one purged
(require 'cl) from the code and just included a reference to it in the
installation instructions, right?
 		 	   		  
_________________________________________________________________
Windows 7: Se direkte-TV fra den b?rbare PCen. Finn ut mer.
http://windows.microsoft.com/windows-7

John J. Foerch | 1 Dec 22:55 2009
Picon
Picon

[PATCH] Small fixes

On Tue, Dec 01, 2009 at 09:38:48PM +0000, Vegard ?ye wrote:
> 
> > Date: Tue, 1 Dec 2009 15:06:13 -0500
> > From: jjfoerch at earthlink.net
> > To: implementations-list at lists.ourproject.org
> > Subject: Re: [implementations-list] [PATCH] Small fixes
> >
> > Although I'm not directly involved in vimpulse, I would recommend
> > looking at the situation where cl.el is used and evaluating whether
> > it is truly necessary in the first place.
> 
> The `destructuring-bind' messages are recent; I never had them with
> older versions of Vimpulse. So presumably, not much rewriting is
> necessary to revert to Vanilla Elisp.
> 
> `M-x occur' lists 7 matches for `destructuring-bind' in vimpulse.el.
> 
> It wouldn't make any difference to the Emacs maintainers if one purged
> (require 'cl) from the code and just included a reference to it in the
> installation instructions, right?

The right way to use cl.el is:

   (eval-when-compile (require 'cl))

--

-- 
John Foerch

Vegard Øye | 1 Dec 23:09 2009
Picon

[PATCH] Small fixes


> Date: Tue, 1 Dec 2009 16:55:06 -0500
> From: jjfoerch at earthlink.net
> To: implementations-list at lists.ourproject.org
> Subject: Re: [implementations-list] [PATCH] Small fixes
>
> The right way to use cl.el is:
>
> (eval-when-compile (require 'cl))

Ah, I see. So replace my (require 'cl) with that, and the problem is
temporarily sorted. Here's what it says in the CL manual:

?? *Please note:* the "CL" functions are not standard parts of the
?? Emacs Lisp name space, so it is legitimate for users to define them
?? with other, conflicting meanings. To avoid conflicting with those
?? user activities, we have a policy that packages installed in Emacs
?? must not load "CL" at run time. (It is ok for them to load "CL" at
?? compile time only, with `eval-when-compile', and use the macros it
?? provides.) If you are writing packages that you plan to distribute
?? and invite widespread use for, you might want to observe the same
?? rule.

As one webpage puts it, "This sucks, because about half of the useful
things in CL are functions and not macros." But as it happens,
`destructuring-bind' is a macro. :)
 		 	   		  
_________________________________________________________________
Windows 7: Se direkte-TV fra den b?rbare PCen. Finn ut mer.
http://windows.microsoft.com/windows-7
(Continue reading)

Vegard Øye | 5 Dec 17:29 2009
Picon

vimpulse-modal.el --- modal key bindings


The :map, :imap and :vmap commands of Vim let one make two key
mappings starting with the same sequence of characters without one
overwriting the other. For example:

??? :imap aa foo
??? :imap aaa bar

When Vim has read "aa" in Insert mode, it will wait for another
character to decide whether to insert "foo" or "bar". If the user
types "a", "bar" is inserted; if another letter, "foo" plus that
letter.

Compare with the analogous use of Emacs' `global-set-key' function:

??? (global-set-key "aa" 'foo)
??? (global-set-key "aaa" 'bar)

Here, the first binding is simply overwritten by the more specific
second. The end result is that "aaa" is bound to `bar', while any
other sequence starting with "aa" is not bound to anything.

The attached code provides a set of Vim-like or "modal" functions for
making new keybindings "on top of" previous bindings. They are
`vimpulse-map', `vimpulse-imap' and `vimpulse-vmap', which mimic Vim's
commands, and `vimpulse-define-key', a generic function for specifying
the keymap. To load it, issue

??? (require 'vimpulse-modal)

(Continue reading)

Vegard Øye | 6 Dec 20:53 2009
Picon

vimpulse-modal.el --- modal key bindings


Seems the attachment didn't make it through. I've uploaded the code here:

http://hekta.org/~vegardoy/vimpulse-modal.el
 		 	   		  
_________________________________________________________________
F? nye Windows Live? Messenger.
http://download.live.com/messenger

Jason Spiro | 8 Dec 06:54 2009
Picon

vimpulse-modal.el --- modal key bindings

On Sun, Dec 6, 2009 at 2:53 PM, Vegard ?ye <vegard_oye at hotmail.com> wrote:
>
> Seems the attachment didn't make it through. I've uploaded the code here:
>
> http://hekta.org/~vegardoy/vimpulse-modal.el

Thank you very much.  Please test on XEmacs, and also on Emacs 22 if
possible.  Then please submit this patch as a new issue in the bug
tracker with [PATCH] in the summary line.  Reply and tell us you have
done so.  Then wait and see what Alessandro decides to do about it.

Do you agree that later on, if and when Vimpulse gets merged into
Emacs, you will sign and send in the FSF copyright assignment form?

Cheers,
-Jason

--

-- 
Jason Spiro: software/web developer, packager, trainer, IT consultant.
I support Linux, UNIX, Windows, and more. Contact me to discuss your needs.
+1 (416) 992-3445 / www.jspiro.com


Gmane