From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Caps Lock affects Ctrl+keys Date: Tue, 21 Jan 2014 12:07:08 +0700 Message-ID: References: <87ppnmulrq.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1390280834 18708 80.91.229.3 (21 Jan 2014 05:07:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jan 2014 05:07:14 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 21 06:07:22 2014 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 1W5TYX-0004zJ-NC for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jan 2014 06:07:21 +0100 Original-Received: from localhost ([::1]:55706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5TYX-0003W1-4y for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Jan 2014 00:07:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5TYL-0003Vv-QC for help-gnu-emacs@gnu.org; Tue, 21 Jan 2014 00:07:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5TYK-0002rJ-Mh for help-gnu-emacs@gnu.org; Tue, 21 Jan 2014 00:07:09 -0500 Original-Received: from mail-qa0-x232.google.com ([2607:f8b0:400d:c00::232]:61925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5TYK-0002rB-IY for help-gnu-emacs@gnu.org; Tue, 21 Jan 2014 00:07:08 -0500 Original-Received: by mail-qa0-f50.google.com with SMTP id cm18so6337957qab.9 for ; Mon, 20 Jan 2014 21:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=mX1OdciAxayWRiwM6P4K3htH6HH7YB1xhnp1qGPXyY0=; b=DKN0uOHFcFwrlRJpLXdXhQaqikVpk8qbLog0h4OyuCdbXYKkdqglIlblWKTojqM4jx hZ1Yt7N0kTlRLxIxLTXDWALe7TdKQ7Kjftqc0O6vAuRYtjX+mSogLrbx+k9BiiXavl1a 5HcWbgI9xMVZrtLxgXoSs7Ks2Z8e4u6IM6xotmBVcwBUxcp887WAQLUYsGcNw6CulZ5G qEjs7WrFdsmTkqjVJaiWB6Z0u/gexOXYUHVZWUh9D+IReK6Zpn/Dj4NlOX4r1TH5/7ob BrXg++p+3u+vpQZeN4gzi1H9MbgxlB0H5YNXtSHW8cbJ07xJFR7qNEeQA5awvAJcavXK QVGw== X-Received: by 10.140.86.116 with SMTP id o107mr31558656qgd.67.1390280828106; Mon, 20 Jan 2014 21:07:08 -0800 (PST) Original-Received: by 10.96.14.74 with HTTP; Mon, 20 Jan 2014 21:07:08 -0800 (PST) In-Reply-To: <87ppnmulrq.fsf@nl106-137-194.student.uu.se> X-Google-Sender-Auth: PJtqUpD5IycHJ1PiKPPJE2TU6Js X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c00::232 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:95523 Archived-At: On Tue, Jan 21, 2014 at 9:10 AM, Emanuel Berg wrot= e: > > Just thought of one thing, there is a caps-mode.el, > written by a man on this list, which is great, because > it gives you caps lock functionality, but *buffer > local* (and thus obviously contained to Emacs). Nice. I had to s/last-command-char/last-command-event/ in github:emacsmirror/caps-mode version, but otherwise it works and preserves control combinations. It even works with Cyrillic letters, thanks to the use of [remap self-insert-command] and (upcase last-command-event). This is a bit clumsy because I have to have different keys to turn on caps in Emacs and in the rest of my environment, but will do for a while. > Because I see you are a C programmer, you > might even want to check out a post on that I wrote > some time ago, with some modifications to caps-mode, > where it auto-disables after one word, so you can write > a #define MONEY 0 with just one press of the caps key > (preferably bounded to invoke caps-mode, not bothering > with the physical keyboard state). Actually in C++ we prefer preprocessor macros to be hard to type ;] Anyway, I=E2=80=99d better bind an easy key to =E2=80=9Cupcase symbol to th= e left of point=E2=80=9D. In fact I am working with a file where I need caps in some of the columns but not in others. I might take the idea of caps-mode and add a condition, so that it does the right thing for my case.