From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.help Subject: Re: Is it possible to set a "goal column" for 'beginning-of-line'? Date: Wed, 23 Nov 2005 10:16:56 +0800 Message-ID: References: <87k6f0ctk7.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1132712283 16159 80.91.229.2 (23 Nov 2005 02:18:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Nov 2005 02:18:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 23 03:17:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EekC9-0001js-5M for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Nov 2005 03:17:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EekC8-0003Tp-HQ for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Nov 2005 21:17:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EekBv-0003Tk-UU for help-gnu-emacs@gnu.org; Tue, 22 Nov 2005 21:17:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EekBt-0003TX-VL for help-gnu-emacs@gnu.org; Tue, 22 Nov 2005 21:16:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EekBt-0003TU-TP for help-gnu-emacs@gnu.org; Tue, 22 Nov 2005 21:16:57 -0500 Original-Received: from [64.4.26.19] (helo=hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EekBt-0004Fs-QU for help-gnu-emacs@gnu.org; Tue, 22 Nov 2005 21:16:58 -0500 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 22 Nov 2005 18:16:57 -0800 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Wed, 23 Nov 2005 02:16:56 GMT X-Originating-IP: [202.43.217.195] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <87k6f0ctk7.fsf-monnier+gnu.emacs.help@gnu.org> Original-To: help-gnu-emacs@gnu.org X-OriginalArrivalTime: 23 Nov 2005 02:16:57.0003 (UTC) FILETIME=[FA8427B0:01C5EFD3] 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:31287 Archived-At: Thank all of you. >From: Stefan Monnier >To: help-gnu-emacs@gnu.org >Subject: Re: Is it possible to set a "goal column" for 'beginning-of-line'? >Date: Tue, 22 Nov 2005 15:35:46 -0500 > >There are many different ways to get this behavior, so you'll need to be >more specific if you want to know what's the best option for you. >Things that matter: >- do you want all programatic uses of beginning-of-line to be affected or > only the interactive C-a command? >- what about other commands like C-f and C-b? Should they be allowed to > move through the first 8 chars of a line? >- are those first 8 chars real? I.e. do they get loaded from/saved into > a file? >- should they be shown or should they be ideally hidden? > >I.e. tell us more about the bigger picture of what you're trying to do. Actually I'm using php-mode within html-mode, plus mmm-mode. Now the identation of PHP code is poor in this condition. After reading some code doing the identing job I found it is possible to solve this by set such a "goal column," since most of them count the column from column 0 by go to there with 'beginning- of-line'. If we could set this column, a few modifications to mmm- mode will make it handle identation better. Another method is to modify the identing code to use another function to go to the "beginning" of a line instead of 'beginning- of-line', but this could be more difficult. I'll take a look at the field property now. But 'avoid-columns-1-7' is not proper due to my confusing description. Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/