From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leonardo Boiko Newsgroups: gmane.emacs.help Subject: Re: How to apply a minor mode to all buffers Date: Thu, 08 Feb 2007 10:20:47 -0200 Message-ID: <873b5gj0ww.wl%leoboiko@gmail.com> References: <877ivkjb66.fsf@trick.ulm.malte.spiess> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1170937647 15072 80.91.229.12 (8 Feb 2007 12:27:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Feb 2007 12:27:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 08 13:27:21 2007 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 1HF8Mv-0004qz-M6 for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Feb 2007 13:27:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HF8Mv-0006ju-4J for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Feb 2007 07:27:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HF8Mh-0006eW-GI for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 07:27:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HF8Mf-0006Zw-Qk for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 07:27:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HF8Mf-0006Zm-Kw for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 07:27:01 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HF8Mf-0000iA-46 for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 07:27:01 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HF8JI-0005sb-Nw for help-gnu-emacs@gnu.org; Thu, 08 Feb 2007 13:23:33 +0100 Original-Received: from 201.44.96.130 ([201.44.96.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Feb 2007 13:23:32 +0100 Original-Received: from leoboiko by 201.44.96.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Feb 2007 13:23:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 201.44.96.130 In-Reply-To: Mail-Followup-To: help-gnu-emacs@gnu.org, leoboiko@gmail.com User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.93 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:40957 Archived-At: At Wed, 07 Feb 2007 12:22:54 -0500, Stefan Monnier wrote: > > find-file-hook won=E2=80=99t apply to buffers unrelated to files, thoug= h. > > after-change-major-mode-hook almost does the trick, but it still > > doesn=E2=80=99t get fundamental-mode. > Then report this with M-x report-emacs-bug. I=E2=80=99m under the impression that this is intended behavior for after-change-major-mode-hook; it is not supposed to be fundamental-mode-hook. My argument is: fundamental-mode-hook would be a nice thing to have because people might want to run elisp code (not just to set variables) every time a buffer is created. > Then add it to those email-drafts buffers as well. Otherwise you risk > screwing up many more cases for buffers you don't think of > (e.g. minibuffers, help buffers, ...). I don=E2=80=99t care. If I can edit it, I want any existing trailing whitespace to be deleted, and I want show-trailing-whitespace to be t. If I can=E2=80=99t edit it, show-trailing-whitespace should be nil. The only exception would be some editable mode in which trailing whitespace is significant, but I can=E2=80=99t think of any. They=E2=80=99= d be so exceptional that I=E2=80=99m willing to list them manually. > If you just create a scratch buffer it won't have any data coming from na= sty > vi users (aka vi users). True. Then the automatic delete-trailing-whitespaces would be redundant (but harmless). However, I still want it to automatically turn on show-trailing-whitespace. -- Leonardo Boiko http://namakajiri.net