From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.bugs Subject: bug#13273: 24.3.50; [PATCH] enhancement request: repeatable `visual-line-mode' line movements Date: Fri, 28 Dec 2012 19:06:56 +0100 Organization: EUR Message-ID: <87623mgif3.fsf@gmail.com> References: <3C4C2163F22D425BBB0EE69834231C56@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356718037 29819 80.91.229.3 (28 Dec 2012 18:07:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Dec 2012 18:07:17 +0000 (UTC) Cc: 13273@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 28 19:07:33 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ToeLE-0006Ep-S5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Dec 2012 19:07:33 +0100 Original-Received: from localhost ([::1]:42301 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToeL0-00057R-7z for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Dec 2012 13:07:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToeKu-00055J-H4 for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2012 13:07:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ToeKq-0005KA-Bb for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2012 13:07:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToeKq-0005K2-8d for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2012 13:07:08 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1ToeLh-0008H8-Sf for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2012 13:08:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <3C4C2163F22D425BBB0EE69834231C56@us.oracle.com> Resent-From: Vitalie Spinu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Dec 2012 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13273 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13273-submit@debbugs.gnu.org id=B13273.135671807731800 (code B ref 13273); Fri, 28 Dec 2012 18:08:01 +0000 Original-Received: (at 13273) by debbugs.gnu.org; 28 Dec 2012 18:07:57 +0000 Original-Received: from localhost ([127.0.0.1]:35066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ToeLd-0008Gq-4W for submit@debbugs.gnu.org; Fri, 28 Dec 2012 13:07:57 -0500 Original-Received: from mail-we0-f182.google.com ([74.125.82.182]:44596) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ToeLa-0008Gg-5S for 13273@debbugs.gnu.org; Fri, 28 Dec 2012 13:07:55 -0500 Original-Received: by mail-we0-f182.google.com with SMTP id u54so5115177wey.13 for <13273@debbugs.gnu.org>; Fri, 28 Dec 2012 10:06:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:organization:references:date :message-id:user-agent:mime-version:content-type; bh=6Mr4+wmruw/f9MoIx+xcWdL52M0WJZNt73Fzl37ASp0=; b=j+5c6gn7+BE0/MQl/XNG78WVgaEv2CyO//xJ1PAeTvHV/+lDvtblnRgov9e94rPaMJ Q2WuqsmFM26g4WBAaWgb98p8QiVbh3LVAdjSLdy64T8xoJW99EesbbpyOrSShzJ7whs8 AIaHyArsn5GWEcu7CXCKNzlnLMPBUMsJmGEl3V05SlYG1ptH3zgSA0tS0PSl7neg55ID DcOTHjyHFZWHke+sYakQPH9P18lB455sVyFJch9pZwB9Yp0wQ96e0J0DBc/yXD8unHXT NcbWY/AMU69deBwDKKM1I9Douu1/XE6YkrWdNJ2e1YnbbDn++hnqAaOfTqIIxau0xWWu W1MA== X-Received: by 10.180.99.72 with SMTP id eo8mr46615889wib.34.1356718019322; Fri, 28 Dec 2012 10:06:59 -0800 (PST) Original-Received: from localhost (i108036.upc-i.chello.nl. [62.195.108.36]) by mx.google.com with ESMTPS id bd6sm31986842wib.10.2012.12.28.10.06.57 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Dec 2012 10:06:58 -0800 (PST) User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.2.91 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69109 Archived-At: >> "Drew Adams" >> on Mon, 24 Dec 2012 14:27:14 -0800 wrote: [...] > diff -c c\:/foo/simple.el c\:/foo/simple-patched-2012-12-24.el > *** c:/foo/simple.el Mon Dec 24 13:48:06 2012 > --- c:/foo/simple-patched-2012-12-24.el Mon Dec 24 14:13:14 2012 > *************** > *** 819,824 **** > --- 819,854 ---- > (overlay-recenter (point)) > (recenter -3)))) > + (defun end-of-line (&optional n) > + "Move cursor to end of current line or end of next line if repeated. > + If called interactively with no prefix arg: > + If the previous command was also `end-of-line' then move to the > + end of the next line. Else move to the end of the current line. > + Otherwise, move to the end of the Nth next line (Nth previous line > + if N <0 )." > + (interactive > + (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 0))) > + (unless n (setq n 0)) ; non-interactive with no arg > + (if (and (eq this-command last-command) (not current-prefix-arg)) > + (forward-line 1) > + (forward-line n)) > + (let ((inhibit-field-text-motion t)) (end-of-line))) > + > + (defun beginning-of-line (&optional n) > + "Move cursor to beginning of current line or next line if repeated. > + If called interactively with no prefix arg: > + If the previous command was also `beginning-of-line' then move to the > + beginning of the previous line. Else move to the beginning of the > + current line. > + Otherwise, move to the beginning of the Nth previous line (Nth next > + line if N < 0)." > + (interactive > + (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 0))) > + (unless n (setq n 0)) ; non-interactive with no arg > + (if (and (eq this-command last-command) (not current-prefix-arg)) > + (forward-line -1) > + (forward-line (- n)))) > + This stuff doesn't work at all for me. Huge amount of misbehavior. A couple of them, backward-paragraph hangs emacs, typing after fill-column infloops. 'C-h k key' doesn't work, for example C-h k C-a shows C-a in the minibuffer and waits ... Many other editing commands stall emacs. When writing this mail I got Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-eval-depth'") with 600 lines backtrace. [...] > *************** > *** 5098,5105 **** > (defvar visual-line-mode-map > (let ((map (make-sparse-keymap))) > (define-key map [remap kill-line] 'kill-visual-line) > ! (define-key map [remap move-beginning-of-line] 'beginning-of-visual-line) > ! (define-key map [remap move-end-of-line] 'end-of-visual-line) > ;; These keybindings interfere with xterm function keys. Are > ;; there any other suitable bindings? > ;; (define-key map "\M-[" 'previous-logical-line) > --- 5145,5154 ---- > (defvar visual-line-mode-map > (let ((map (make-sparse-keymap))) > (define-key map [remap kill-line] 'kill-visual-line) > ! (define-key map [home] 'beginning-of-line) > ! (define-key map [end] 'end-of-line) > ! (define-key map "\C-a" 'beginning-of-visual-line) > ! (define-key map "\C-e" 'end-of-visual-line) > ;; These keybindings interfere with xterm function keys. Are > ;; there any other suitable bindings? > ;; (define-key map "\M-[" 'previous-logical-line) [remap move-beginning-of-line] wasn't there for nothing, or was it? Sorry, but I think it should be something much less intrusive and only concerning beginning-of-visual-line and end-of-visible-line. (^^^^--- Ah yes, fill-paragraph now produces this ... after C-g ... restarting my emacs ...) Best, Vitalie