From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Hori Newsgroups: gmane.emacs.devel Subject: Re: keybinding to duplicate the current line. Date: Sun, 17 Jan 2010 07:13:51 -0800 Message-ID: References: <27198868.post@talk.nabble.com> <87k4vgeppx.fsf@mithlond.arda> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00504502e26331617d047d5daf5b X-Trace: ger.gmane.org 1263741251 2127 80.91.229.12 (17 Jan 2010 15:14:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2010 15:14:11 +0000 (UTC) Cc: "alin.s" , Emacs-devel@gnu.org To: Teemu Likonen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 17 16:14:03 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWWpH-0000D5-19 for ged-emacs-devel@m.gmane.org; Sun, 17 Jan 2010 16:14:03 +0100 Original-Received: from localhost ([127.0.0.1]:50198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWWpH-0007Xj-RR for ged-emacs-devel@m.gmane.org; Sun, 17 Jan 2010 10:14:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWWpB-0007WJ-FB for emacs-devel@gnu.org; Sun, 17 Jan 2010 10:13:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWWp6-0007Px-QX for Emacs-devel@gnu.org; Sun, 17 Jan 2010 10:13:57 -0500 Original-Received: from [199.232.76.173] (port=54724 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWWp6-0007Pn-Mk for Emacs-devel@gnu.org; Sun, 17 Jan 2010 10:13:52 -0500 Original-Received: from mail-px0-f192.google.com ([209.85.216.192]:52826) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NWWp6-0007Ik-EE for Emacs-devel@gnu.org; Sun, 17 Jan 2010 10:13:52 -0500 Original-Received: by pxi30 with SMTP id 30so1459565pxi.14 for ; Sun, 17 Jan 2010 07:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=z5i0/JcLhZfeKO51aZ2q0SjILnGOE8S7TvudZaEqUrM=; b=ahlZeR8qfh8+upgqIS2BVpsnTOfowUt9eM4tBlgceh86nEe9qSZUJGM8NBl2bIaUCM jd2ykIeSG1xL3VxrDET0nNgN79PrVZQjiZLzHY8PUvlfc1QvPZmpZhFrX3pW8TOTgP3l 5Rdl3cUyrMJv16VnTsi7wrXeSH56aPBBjXZwY= 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=WWjwv7pz9b7Fa0PzZgwT0glFSmyFcEojIuz0T4RjFda6L1E9Vg6COR8CJdwQpFmpHh yOXJa5DayvaIr5rzJ4VMdPi/xoDzN9sMI4OLV6mXcyCBgA7uKo56Z1PusN/TygH8hoaB sI3nJMRnrRGQdevH0B5ixFlnDGlb0MomwzoX8= Original-Received: by 10.114.45.12 with SMTP id s12mr3432119was.74.1263741231521; Sun, 17 Jan 2010 07:13:51 -0800 (PST) In-Reply-To: <87k4vgeppx.fsf@mithlond.arda> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120153 Archived-At: --00504502e26331617d047d5daf5b Content-Type: text/plain; charset=ISO-8859-1 Oh please... How about sacrificing one keyseq and make your own keymap like this: (defvar foo-map (make-sparse-keymap)) (fset 'foo-map foo-map) (global-unset-key "\C-t") (global-set-key "\C-t" 'foo-map) (define-key foo-map "d" 'comment-and-duplicate-region) (define-key foo-map ...) (define-key foo-map ...) Believe me, such keybindings will save a huge amount of time in the long run. On Sun, Jan 17, 2010 at 7:05 AM, Teemu Likonen wrote: > On 2010-01-17 05:40 (-0800), alin s. wrote: > > > In order to duplicate it I have to press > > > > C-a C-SPACE C-e C-f M-w C-g C-y > > Quicker alternatives: > > C-a C-k C-k C-y C-y > C-a C-SPC C-n M-w C-y > > > --00504502e26331617d047d5daf5b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Oh please...

How about sacrificing one keyseq and make your own key= map like this:

(defvar foo-map (make-sparse-keymap))
(fset 'f= oo-map foo-map)
(global-unset-key "\C-t")
(global-set-key &= quot;\C-t"=A0 'foo-map)

(define-key foo-map "d" 'comment-and-duplicate-region) (define-key foo-map ...)
(define-key foo-map ...)

Believe me, such keybindings will save a hu= ge amount of time in the long run.

On Sun= , Jan 17, 2010 at 7:05 AM, Teemu Likonen <tlikonen@iki.fi> wrote:
On 2010-01-17 05:40 (-0800), alin s. wrote:

> In order to duplicate it I have to press
>
> C-a C-SPACE C-e C-f M-w C-g C-y

Quicker alternatives:

=A0 =A0C-a C-k C-k C-y C-y
=A0 =A0C-a C-SPC C-n M-w C-y



--00504502e26331617d047d5daf5b--