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: line length control setting Date: Tue, 11 Nov 2003 12:20:34 +0100 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3FB0C602.6080607@cyberspaceroad.com> References: 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 1068550027 17337 80.91.224.253 (11 Nov 2003 11:27:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2003 11:27:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 11 12:27:04 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 1AJWfo-0001ku-00 for ; Tue, 11 Nov 2003 12:27:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJXd9-0001E4-HB for geh-help-gnu-emacs@m.gmane.org; Tue, 11 Nov 2003 07:28:23 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AJXbC-0000wa-2j for help-gnu-emacs@gnu.org; Tue, 11 Nov 2003 07:26:22 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AJXYK-00008A-K9 for help-gnu-emacs@gnu.org; Tue, 11 Nov 2003 07:23:55 -0500 Original-Received: from [212.227.126.171] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJXXm-0008M1-Nn for help-gnu-emacs@gnu.org; Tue, 11 Nov 2003 07:22:50 -0500 Original-Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1AJWaL-0008ES-00 for help-gnu-emacs@gnu.org; Tue, 11 Nov 2003 12:21:25 +0100 Original-Received: from [217.88.249.180] (helo=cyberspaceroad.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1AJWaL-0003jK-00 for help-gnu-emacs@gnu.org; Tue, 11 Nov 2003 12:21:25 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en, en-us, de-de 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:14048 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14048 On 11/06/2003 07:27 PM Kevin Rodgers wrote: >>(defun my-dont-insert-after-fill-column (&rest x) >> (when (> (current-column) >> fill-column) >> (delete-char -1) >> (beep))) >>(add-hook 'after-change-functions 'my-dont-insert-after-fill-column) >> >> But I discovered this is also acting on the command buffer, so I >> cannot add more than my fill column when doing simple file copies or >> renames or text search & replaces. >> >> Is there a way that I can adapt my function above to stop it applying >> to the command buffer? > > (when (and (not (eq major-mode 'shell-mode)) > (> (current-column) fill-column)) > ...) emacs is applying the beeping and dels still in the mini-buffer when I issue dired commands on a dired listing, like copy or rename. Obviously (eq major-mode 'shell-mode) does not cover dired? Is there a special mode in the mini-buffer window I can use to switch? Thanks Adam -- GNU Emacs 21.3.1 on Linux 2.4.20 RH9