From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Le Wang Newsgroups: gmane.emacs.help Subject: Re: delete-selection-mode on viper Date: Fri, 7 Jan 2011 16:17:58 +0800 Message-ID: References: <3A628C44DD01480A8E8363F90D1ED093@us.oracle.com> <216122.77444.qm@web63008.mail.re1.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e65b52e48d1a5f04993d41ee X-Trace: dough.gmane.org 1294388327 2845 80.91.229.12 (7 Jan 2011 08:18:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Jan 2011 08:18:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Maindoor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 07 09:18:40 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pb7Wx-0005kH-OB for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Jan 2011 09:18:40 +0100 Original-Received: from localhost ([127.0.0.1]:48885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pb7Wx-00054Q-1D for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Jan 2011 03:18:39 -0500 Original-Received: from [140.186.70.92] (port=40596 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pb7WL-00052x-9M for help-gnu-emacs@gnu.org; Fri, 07 Jan 2011 03:18:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pb7WJ-0000Fv-Vw for help-gnu-emacs@gnu.org; Fri, 07 Jan 2011 03:18:01 -0500 Original-Received: from mail-ew0-f41.google.com ([209.85.215.41]:65213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pb7WJ-0000Fi-Jr for help-gnu-emacs@gnu.org; Fri, 07 Jan 2011 03:17:59 -0500 Original-Received: by ewy27 with SMTP id 27so8432825ewy.0 for ; Fri, 07 Jan 2011 00:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=x4LtIiIwMnLtfxRC8vT2XiY/kWiwbb5XI2r4OA+fp38=; b=mnjNpOqxtaM3sg5lKttAchYcyuY58li7vP6HXLBRthsctzdhP12HnfYQ3m0WqlL1RL tDnKI5F0WpLGqER92dvXeeB8CInaeBYkY+y5o1ZEfKYAAv4QmxpQvSUsytE7P43s2kyf KHzN44u0t6V6R2jivdI9M1LtxDpj6QsZWBJ9s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=WVXxPEfOFyKh6DCp4PIPRY3eIGMCwYauAAif9zK3Fyzo0pytEIcywcWWGVdsYGVjPC uqaz9xW585LCc1fhhtYpLQJ649qfBcIqYBEEEK+HGTyVLQb1Udzz2xozBLFnMLb5i5vB Qo+a3kTQE6Y87sn5XzdUgq8wOCscjbAz8B3lk= Original-Received: by 10.14.16.75 with SMTP id g51mr1554405eeg.45.1294388278663; Fri, 07 Jan 2011 00:17:58 -0800 (PST) Original-Received: by 10.14.119.11 with HTTP; Fri, 7 Jan 2011 00:17:58 -0800 (PST) In-Reply-To: <216122.77444.qm@web63008.mail.re1.yahoo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78285 Archived-At: --0016e65b52e48d1a5f04993d41ee Content-Type: text/plain; charset=ISO-8859-1 Here are steps I would take to try to trouble-shoot in Emacs. emacs -Q fdelete-selection-mode o Reading commentary at beginning of source ... This seems promising: ;; Commands which will delete the selection need a 'delete-selection ;; property on their symbols; commands which insert text but don't ;; have this property won't delete the selection. google "emacs how to set property on command" Find out put is a built-in function in `C source code'. (put SYMBOL PROPNAME VALUE) Store SYMBOL's PROPNAME property with value VALUE. It can be retrieved with `(get SYMBOL PROPNAME)'. Fire up viper mode (I don't use it). k[paste key cord] Jot down what the command name. Try something like: (put '[viper-paste-func] 'delete-selection t) See if it worked. If it did, add the "(put ..." line to your .emacs.el On Fri, Jan 7, 2011 at 9:29 AM, Maindoor wrote: > Hi, > > I am using viper in emacs, as I come from a vim background. > When using regular emacs delete-selection-mode works fine, > but when I use the viper mode, the paste does not work as > expected. I'm sure others would have faced this issue too, > any suggestions on how to workaround this ? > > Thanks, > > > > > -- Le --0016e65b52e48d1a5f04993d41ee Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Here are steps I would take to t= ry to trouble-shoot in Emacs.

emacs -Q
<C-h>fdelete-selection-mode
<= ;C-x>o<tab><enter>

Rea= ding commentary at beginning of source ...

This se= ems promising:

;; Commands which will delete the selection need a= 'delete-selection
;; property on their symbols; commands whi= ch insert text but don't
;; have this property won't dele= te the selection.

google "emacs how to set property on command= "

Find out

put is a built-in function in `C source code'.

(put SYMBOL PROPNAME VALUE)

Store SYMBOL's PROPNAME property with = value VALUE.
It can be retrieved with `(get SYMBOL PROPNAME)'.
=

Fire up viper mode (I don't use = it).

<C-h>k[paste key cord]

Jot= down what the command name. =A0Try something like:

(put '[viper-paste-func] =A0'delete-selection t)

<C-x><C-e&g= t;

See if it worked. =A0If it did, add the &q= uot;(put ..." line to your .emacs.el

On Fri, Jan 7, 2011 at 9:29 AM, Maindoor <sanjeevfiles@yahoo.com>= wrote:
Hi,

I am using viper in emacs, as I come from a vim background.
When using regular emacs delete-selection-mode works fine,
but when I use the viper mode, the paste does not work as
expected. I'm sure others would have faced this issue too,
any suggestions on how to workaround this ?

Thanks,







--
Le
--0016e65b52e48d1a5f04993d41ee--