From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: unassigning cntl-Z in cua mode Date: Mon, 23 Mar 2015 19:04:02 +0100 Organization: Aioe.org NNTP Server Message-ID: <87k2y71tgt.fsf@debian.uxu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427133929 473 80.91.229.3 (23 Mar 2015 18:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Mar 2015 18:05:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 23 19:05:23 2015 Return-path: Envelope-to: geh-help-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 1Ya6j0-0003Iu-C7 for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Mar 2015 19:05:18 +0100 Original-Received: from localhost ([::1]:57454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya6iz-0001vk-Jx for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Mar 2015 14:05:17 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 70 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:0bJAnIIKXHqLESb3Mx5bJL6aBJA= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:210990 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103271 Archived-At: Stuart McGraw writes: > I have recently started using CUA mode and it is ok > except for one thing... I don't like having cntl-z > mapped to undo. I run emacs in a terminal window > (emacs -nw) a lot and routinely need to suspend > emacs with cntl-z, do something in the shell, then > resume emacs. If you are a terminal, 'emacs -nw' and shell user are you sure you want Cua-mode? If you take a look on the keyboard and see where the kill and yank keys are positioned you see they are closer, and therefore faster and more ergonomic than the "Cua" keys, which is also important to your thinking. So if you dont "mind", using the kill and yank keys will in time make you take an interest in the mechanics of the kill ring which is a very practical tool when writing tons of data and text and code everyday (and especially every night). In time, you will want all that functionality anyway so then you'll have a hybrid between the standard kill/yank keys and the kill/yank keys that aren't covered by the Cua keys. As for suspending Emacs, instead of doing that, have a tabbed terminal (urxvt had a Perl module for this, I remember) or have several windows in X, plus a window manager so you can switch quickly: e.g., Openbox and then just M-TAB (in Emacs notation) to iterate the windows. Or, if you want to stick with one window, use tmux with different panes that are easily switched between (some people use screen for that). Or, do M-x shell RET and do the shell work in Emacs as well. > How can I undo the mapping the CUA mode applies to > the cntl-z key? I am elisp-illiterate so a cut and > paste solution would be greatly appreciated. I'm sure you have already received help, so I won't tell you again, instead, why not "start stopping" being an Elisp illiterate right now by picking apart the (very simple) form you got, to understand what it does. Baby steps first. It is a very good way of acquiring LISP because you do simple and useful things that work, and then you continue, all the while increasing the complexity (or quantity at least). So you learn LISP not to learn LISP but while sharpening your tools and increasing your understanding of them. Make it work, by outworking the opposition! > Emacs 24.4 on Fedora 21 if it matters. I don't think it should matter unless the Cua-mode changed dramatically since a previous version. The distribution do not matter, it is rather the terminal emulator that matters because that intercepts the keystroke before Emacs can do anything with it. For example, C-z doesn't do what you describe for me, neither in the Linux VTs nor in X with xterm. I don't remember configuring that, but there have been so many configurations. `suspend-frame' is related for the dreamer and digger. -- underground experts united