From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Tolkin, Steve" Newsgroups: gmane.emacs.help Subject: if I set home key to this macro then shift+home does not select text in cua-mode Date: Mon, 24 Nov 2008 19:21:50 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1227617106 18559 80.91.229.12 (25 Nov 2008 12:45:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2008 12:45:06 +0000 (UTC) To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 25 13:46:11 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L4xIu-0001Kf-Dy for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 13:46:08 +0100 Original-Received: from localhost ([127.0.0.1]:45146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4xHk-0003uO-T1 for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Nov 2008 07:44:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4lgg-0008A2-F3 for help-gnu-emacs@gnu.org; Mon, 24 Nov 2008 19:21:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4lgf-00089q-1y for help-gnu-emacs@gnu.org; Mon, 24 Nov 2008 19:21:53 -0500 Original-Received: from [199.232.76.173] (port=57636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4lge-00089n-SA for help-gnu-emacs@gnu.org; Mon, 24 Nov 2008 19:21:52 -0500 Original-Received: from maillnx-us311.fmr.com ([192.223.178.26]:24878) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1L4lge-0001XZ-G9 for help-gnu-emacs@gnu.org; Mon, 24 Nov 2008 19:21:52 -0500 X-filenames: None Original-Received: from msgmmksm02win.dmn1.fmr.com ([10.33.139.33]) by maillnx-us311.fmr.com with SMTP; 24 Nov 2008 19:21:52 -0500 Original-Received: from MSGMMKIV01WIN.DMN1.FMR.COM (10.33.148.30) by MSGMMKSM02WIN.DMN1.FMR.COM (Sigaba Gateway v4.1) with ESMTP id 25735564; Mon, 24 Nov 2008 19:21:51 -0500 Original-Received: from MSGMMKIM01WIN.DMN1.FMR.COM ([172.25.108.46]) by MSGMMKIV01WIN.DMN1.FMR.COM with SMTP_server; Mon, 24 Nov 2008 19:21:51 -0500 Original-Received: from msgbosclp2win.DMN1.FMR.COM ([10.46.17.21]) by MSGMMKIM01WIN.DMN1.FMR.COM with Microsoft SMTPSVC(5.0.2195.6713); Mon, 24 Nov 2008 19:21:51 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.0.6619.12 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: if I set home key to this macro then shift+home does not select text in cua-mode Thread-Index: AclOjb1VOJb736EoRW+9M/3Rg4wuygABcWCA X-OriginalArrivalTime: 25 Nov 2008 00:21:51.0256 (UTC) FILETIME=[CFF04980:01C94E93] X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Tue, 25 Nov 2008 07:43:43 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60080 Archived-At: Summary: If I bind the home key to the macro below and press shift+home it does not select the text. =20 Details: I am running GNU Emacs 22.3.1 on of 2008-09-96 on SOFT-MJASON. On windows XP SP2. This used to work in emacs 22. I suspect the problem has to do with changes to cua-mode (which I have on) and/or transient mark-mode (which I explicitly set on in v. 22,but now seems to be part of cua-mode.) Here is the macro definition: ;; Posted to comp.emacs by: ;; Kai Grossjohann (defun my-home () "Toggle the point between the beginning of the current line, and the first non-whitespace character on the line." (interactive) (let ((pos (save-excursion (back-to-indentation) (point)))) (if (equal pos (point)) (beginning-of-line) (back-to-indentation)))) (global-set-key [home] 'my-home) My current workaround is simply to comment out the global-set-key line. Is there a fix to the macro to get the old behavior? Even better would be something already in cua-mode or simple.el etc that i could use.=20 Note: I am now also sending this to help-gnus-emacs because it was suggested on the h-e-w list that this was not specific to Windows. Thanks,=20 Steve --=20 Steven Tolkin =20 There is nothing so practical as a good theory. Comments are by me,=20 not Fidelity Investments, its subsidiaries or affiliates.