From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: odt@dtrx.de (Olaf Dietrich) Newsgroups: gmane.emacs.help Subject: Re: viper-mode: "r " does not work as expected Date: 29 Apr 2005 07:28:10 GMT Organization: -- Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1114759474 17205 80.91.229.2 (29 Apr 2005 07:24:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2005 07:24:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 29 09:24:32 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DRPqv-0000Qo-Rv for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Apr 2005 09:23:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DRPxD-00047x-9w for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Apr 2005 03:30:27 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!news-stu1.dfn.de!news.belwue.de!informatik.tu-muenchen.de!lrz.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 49 Original-NNTP-Posting-Host: hydra3.fw.med.uni-muenchen.de Original-X-Trace: wsc10.lrz-muenchen.de 1114759690 11171 138.245.10.3 (29 Apr 2005 07:28:10 GMT) Original-X-Complaints-To: news@lrz-muenchen.de Original-NNTP-Posting-Date: 29 Apr 2005 07:28:10 GMT User-Agent: tin/1.7.9-20050415 ("Hellisay") (UNIX) (Linux/2.6.8.olaf10 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:130561 Original-To: help-gnu-emacs@gnu.org 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:26132 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26132 Kevin Rodgers : > Olaf Dietrich wrote: >> >> Inserting a new line break in an existing line by "r " >> (more exactly: replacing the current character by a newline) >> does not work; instead, '^M' appears as replacement text. >> >> (The alternative "r C-j" _does_ work, but is not what my fingers >> are used to do in vi.) > > The version of viper-cmd.el distributed with Emacs 21.3 has this snippet > in the viper-replace-char-subr function: > > (if (eq char ?\C-m) (setq char ?\n)) This line is in my viper-cmd.el as well: | (defun viper-replace-char-subr (com arg) | (let ((inhibit-quit t) | char) | (viper-set-complex-command-for-undo) | (or (eq viper-intermediate-command 'viper-repeat) | (viper-special-read-and-insert-char)) | | (if (eq char ?\C-m) (setq char ?\n)) ... viper.el says: | (defconst viper-version "3.11.1 of September 9, 2001" | "The current version of Viper") > So perhaps you're using an old version of viper -- > what do `M-x locate-library RET viper' | Library is file ..../emacs/21.4/lisp/emulation/viper.elc (The path appears correct.) > and `M-x list-load-path-shadows' tell you? | No Emacs Lisp load-path shadowings were found Does this make any sense? Thanks, Olaf