From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: kill-append and buffer-undo-list Date: Tue, 10 Jun 2014 01:48:39 +0300 Organization: JURTA Message-ID: <87d2eh8zso.fsf@mail.jurta.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402354544 4901 80.91.229.3 (9 Jun 2014 22:55:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Jun 2014 22:55:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sam Steingold Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 10 00:55:37 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Wu8TX-0008Jp-MB for ged-emacs-devel@m.gmane.org; Tue, 10 Jun 2014 00:55:35 +0200 Original-Received: from localhost ([::1]:35513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu8TW-0006LW-Vy for ged-emacs-devel@m.gmane.org; Mon, 09 Jun 2014 18:55:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu8TL-0006LK-Fq for emacs-devel@gnu.org; Mon, 09 Jun 2014 18:55:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wu8TE-0003Kn-1T for emacs-devel@gnu.org; Mon, 09 Jun 2014 18:55:23 -0400 Original-Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:55705 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu8TD-0003K5-Sy; Mon, 09 Jun 2014 18:55:15 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 5D143302BA6A53; Mon, 9 Jun 2014 15:55:13 -0700 (PDT) In-Reply-To: (Sam Steingold's message of "Mon, 09 Jun 2014 16:17:33 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 69.163.216.107 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172426 Archived-At: > When text it killed with repeated C-k, they are appended in the > kill-ring (as if it were done by a single C-w or C-u XXX C-k) but not in > buffer-undo-list (i.e., an undo will reinsert just one line). > It is not obvious to me that this is the "correct" behavior > (although I am sure many people, myself included, rely on it). > > Any objections to making that optional? I think better would be to make this an option of the undo feature itself. Currently only `self-insert-command' commands are grouped into undo as a unit of 20 consecutive self-inserting commands. A new option would allow specifying a command name to group, and also a number of consecutive commands to accept as a group before adding a boundary between them. A possible value for such an option: (defcustom undo-group '((self-insert-command . 20) (kill-line . 20) ...)) Or maybe better to specify the same using symbol properties: (put 'self-insert-command 'undo-group 20) (put 'kill-line 'undo-group 20)