From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Adam Hardy Newsgroups: gmane.emacs.help Subject: Re: auto-fill mode in java-mode Date: Sat, 18 Oct 2003 19:15:41 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F91753D.1080703@cyberspaceroad.com> References: Reply-To: help-gnu-emacs@gnu.org NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1066497553 31183 80.91.224.253 (18 Oct 2003 17:19:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Oct 2003 17:19:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 18 19:19:10 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AAujO-00074h-00 for ; Sat, 18 Oct 2003 19:19:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AAuhe-0006Jd-C9 for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Oct 2003 13:17:22 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AAuhK-0006JJ-PZ for help-gnu-emacs@gnu.org; Sat, 18 Oct 2003 13:17:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AAugo-00067y-P3 for help-gnu-emacs@gnu.org; Sat, 18 Oct 2003 13:17:01 -0400 Original-Received: from [212.227.126.188] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AAugo-00066O-9T for help-gnu-emacs@gnu.org; Sat, 18 Oct 2003 13:16:30 -0400 Original-Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1AAugk-0002F9-00; Sat, 18 Oct 2003 19:16:26 +0200 Original-Received: from [80.128.27.175] (helo=cyberspaceroad.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1AAugk-00040g-00; Sat, 18 Oct 2003 19:16:26 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 X-Accept-Language: en, en-us, de-de Original-To: Stefan Monnier , help-gnu-emacs@gnu.org In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:13325 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13325 On 10/17/2003 04:49 PM Stefan Monnier wrote: >>If you think about it, auto-fill with reindentation would be complicated - >>The Java code could be filled, then reindented, causing it to spill over >>the right margin, requiring re-filling, then reindentation, ..... It >>would probably end up looking like an Outlook-Express Usenet posting. :-( > > > It's not that bad: you only re-indent the second line, so there is no > circularity and things end just fine. If it doesn't work, it's only > because nobody coded it up or because there's a bug. The indentation works if you want the line to rewrap to the point where the line above starts, but in java that's rarely the case. As someone in the thread said earlier, auto-filling java code is a pretty unusual thing to want to do. Although it is true that auto-fill will break and wrap my line of java, and not indent the new line to where it should be, this is in fact a minor issue since I mostly want to choose where in the original line the line-break should go, manually, but auto-fill automatically takes the previous white space. I realise now that my issue here is that it would actually be preferable to have emacs just stop taking input beyond line 72 - and beep instead. Or perhaps color the text red, because I can imagine situations where I can't break the line. Is anything like that possible? Actually is 72 the standard email line length? As I said earlier, my requirement is to have all the code easily emailable without being rewrapped by the email software. Cheers Adam -- GNU Emacs 21.3.1 on Linux 2.4.20 RH9