From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs Subject: bug#6651: 23.2; Please allow whitespace fixing to be easily activated without whitespace display Date: Fri, 16 Jul 2010 14:06:40 +0100 Message-ID: <87oce7lgnz.fsf@mord.config> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1279287051 1748 80.91.229.12 (16 Jul 2010 13:30:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Jul 2010 13:30:51 +0000 (UTC) To: 6651@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 16 15:30:50 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OZl04-0007R0-94 for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Jul 2010 15:30:48 +0200 Original-Received: from localhost ([127.0.0.1]:40734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZl03-0008Et-4w for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Jul 2010 09:30:47 -0400 Original-Received: from [140.186.70.92] (port=34803 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZkzu-0008DC-Pc for bug-gnu-emacs@gnu.org; Fri, 16 Jul 2010 09:30:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZkzs-0004x8-W5 for bug-gnu-emacs@gnu.org; Fri, 16 Jul 2010 09:30:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43636) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZkzs-0004x4-UR for bug-gnu-emacs@gnu.org; Fri, 16 Jul 2010 09:30:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OZkd4-0004pI-IU; Fri, 16 Jul 2010 09:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Jul 2010 13:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6651 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.127928560118541 (code B ref -1); Fri, 16 Jul 2010 13:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Jul 2010 13:06:41 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZkci-0004p0-U2 for submit@debbugs.gnu.org; Fri, 16 Jul 2010 09:06:41 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZkcg-0004ov-F6 for submit@debbugs.gnu.org; Fri, 16 Jul 2010 09:06:39 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:53422) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OZkct-0000B0-LV for submit@debbugs.gnu.org; Fri, 16 Jul 2010 09:06:51 -0400 Original-Received: from [140.186.70.92] (port=41417 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZkcr-0000k7-K3 for bug-gnu-emacs@gnu.org; Fri, 16 Jul 2010 09:06:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZkcp-00015B-7X for bug-gnu-emacs@gnu.org; Fri, 16 Jul 2010 09:06:49 -0400 Original-Received: from exprod7og105.obsmtp.com ([64.18.2.163]:39322) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OZkco-00014Y-PT for bug-gnu-emacs@gnu.org; Fri, 16 Jul 2010 09:06:47 -0400 Original-Received: from source ([209.85.161.51]) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKTEBZY/hb+F63t9U6no92g5NittCWdONi@postini.com; Fri, 16 Jul 2010 06:06:46 PDT Original-Received: by mail-fx0-f51.google.com with SMTP id 15so1285451fxm.24 for ; Fri, 16 Jul 2010 06:06:43 -0700 (PDT) Original-Received: by 10.216.79.69 with SMTP id h47mr801063wee.68.1279285602990; Fri, 16 Jul 2010 06:06:42 -0700 (PDT) Original-Received: from mord (93-96-139-152.zone4.bethere.co.uk [93.96.139.152]) by mx.google.com with ESMTPS id p45sm736625weq.45.2010.07.16.06.06.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Jul 2010 06:06:41 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 16 Jul 2010 09:07:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38601 Archived-At: I use whitespace-mode purely to correct white space when writing files. Hence, I was using =E2=80=9C(whitespace-mode 1)=E2=80=9D, but was configuri= ng all the fonts to black so that I wouldn=E2=80=99t see any incorrect whitespace characters displayed. Recently, I tracked down extremely poor performance in c-mode to the fact that whitespace mode was on. I came up with the following workaround: 1. Add (require 'whitespace) to my .emacs 2. Instead of adding (whitespace-mode 1) to the mode hooks in which I want whitespace fixing, add (add-hook 'write-file-functions 'whitespace-write-file-hook nil t), which code I copied directly from whitespace-mode. I now get whitespace fixing (via the auto-cleanup flag in whitespace-action) without the slow-down of having whitespace-mode active. However, this is all a little fiddly. It would be nice if whitespace-mode could be made to install its hooks without turning itself on, perhaps by giving a special value to whitespace-mode, e.g. a symbol like =E2=80=9C=E2=80=99only-hooks=E2=80=9D? In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-06-13 on mord, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10706000 configured using `configure '--build' 'i486-linux-gnu' '--build' 'i486-lin= ux-gnu' '--prefix=3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdir=3D/us= r/lib' '--localstatedir=3D/var/lib' '--infodir=3D/usr/share/info' '--mandir= =3D/usr/share/man' '--with-pop=3Dyes' '--enable-locallisppath=3D/etc/emacs2= 3:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/s= ite-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/sh= are/emacs/23.2/leim' '--with-x=3Dyes' '--with-x-toolkit=3Dgtk' '--with-tool= kit-scroll-bars' 'build_alias=3Di486-linux-gnu' 'CFLAGS=3D-DDEBIAN -g -O2' = 'LDFLAGS=3D-g' 'CPPFLAGS=3D'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: show-paren-mode: t savehist-mode: t minibuffer-electric-default-mode: t iswitchb-mode: t icomplete-mode: t global-auto-revert-mode: t desktop-save-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p=20 C-p C-p C-p C-p C-p C-p C-x b M-x r e p o=20 r t - e m a c s - b u g Recent messages: Starting new Ispell process [british+accs] ... Loading vc-git...done Saving file /home/rrt/Software/zile-lua/src/extern.h... run-hook-with-args-until-success: Symbol's function definition is void: whi= tespace-write-file-hook whitespace Saving file /home/rrt/.emacs.d/modes.el... Wrote /home/rrt/.emacs.d/modes.el Saving file /home/rrt/Software/zile-lua/src/extern.h... Wrote /home/rrt/Software/zile-lua/src/extern.h goto-history-element: End of history; no default available Load-path shadows: /usr/share/emacs/23.2/site-lisp/auctex/tex-style hides /usr/share/emacs/sit= e-lisp/auctex/tex-style /usr/share/emacs/23.2/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-= lisp/auctex/tex-buf /usr/share/emacs/23.2/site-lisp/auctex/context hides /usr/share/emacs/site-= lisp/auctex/context /usr/share/emacs/23.2/site-lisp/auctex/bib-cite hides /usr/share/emacs/site= -lisp/auctex/bib-cite /usr/share/emacs/23.2/site-lisp/auctex/tex-fold hides /usr/share/emacs/site= -lisp/auctex/tex-fold /usr/share/emacs/23.2/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-l= isp/auctex/tex-jp /usr/share/emacs/23.2/site-lisp/auctex/context-nl hides /usr/share/emacs/si= te-lisp/auctex/context-nl /usr/share/emacs/23.2/site-lisp/auctex/toolbar-x hides /usr/share/emacs/sit= e-lisp/auctex/toolbar-x /usr/share/emacs/23.2/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-= lisp/auctex/tex-mik /usr/share/emacs/23.2/site-lisp/auctex/context-en hides /usr/share/emacs/si= te-lisp/auctex/context-en /usr/share/emacs/23.2/site-lisp/auctex/texmathp hides /usr/share/emacs/site= -lisp/auctex/texmathp /usr/share/emacs/23.2/site-lisp/auctex/tex-info hides /usr/share/emacs/site= -lisp/auctex/tex-info /usr/share/emacs/23.2/site-lisp/auctex/tex-fptex hides /usr/share/emacs/sit= e-lisp/auctex/tex-fptex /usr/share/emacs/23.2/site-lisp/auctex/tex-font hides /usr/share/emacs/site= -lisp/auctex/tex-font /usr/share/emacs/23.2/site-lisp/auctex/latex hides /usr/share/emacs/site-li= sp/auctex/latex /usr/share/emacs/23.2/site-lisp/auctex/font-latex hides /usr/share/emacs/si= te-lisp/auctex/font-latex /usr/share/emacs/23.2/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-= lisp/auctex/tex-bar /usr/share/emacs/23.2/site-lisp/auctex/multi-prompt hides /usr/share/emacs/= site-lisp/auctex/multi-prompt /usr/share/emacs/23.2/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp= /auctex/tex /usr/share/emacs23/site-lisp/psgml/psgml hides /usr/share/emacs/site-lisp/p= sgml/psgml /usr/share/emacs23/site-lisp/psgml/psgml-ids hides /usr/share/emacs/site-li= sp/psgml/psgml-ids /usr/share/emacs23/site-lisp/psgml/psgml-parse hides /usr/share/emacs/site-= lisp/psgml/psgml-parse /usr/share/emacs23/site-lisp/psgml/psgml-init hides /usr/share/emacs/site-l= isp/psgml/psgml-init /usr/share/emacs23/site-lisp/psgml/psgml-dtd hides /usr/share/emacs/site-li= sp/psgml/psgml-dtd /usr/share/emacs23/site-lisp/psgml/psgml-html hides /usr/share/emacs/site-l= isp/psgml/psgml-html /usr/share/emacs23/site-lisp/psgml/psgml-api hides /usr/share/emacs/site-li= sp/psgml/psgml-api /usr/share/emacs23/site-lisp/psgml/psgml-edit hides /usr/share/emacs/site-l= isp/psgml/psgml-edit /usr/share/emacs23/site-lisp/psgml/psgml-info hides /usr/share/emacs/site-l= isp/psgml/psgml-info /usr/share/emacs23/site-lisp/psgml/psgml-sysdep hides /usr/share/emacs/site= -lisp/psgml/psgml-sysdep /usr/share/emacs23/site-lisp/psgml/psgml-charent hides /usr/share/emacs/sit= e-lisp/psgml/psgml-charent /usr/share/emacs23/site-lisp/psgml/psgml-other hides /usr/share/emacs/site-= lisp/psgml/psgml-other /usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-= lisp/debian-startup /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/= emacs/23.2/lisp/textmodes/flyspell /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/em= acs/23.2/lisp/textmodes/ispell Features: (shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug whitespace vc-git face-remap flyspell filladapt auto-dictionary-autoloads dictionary-autoloads js2-mode-autoloads package reporter completing-help ff-paths uniquify paren savehist minibuf-eldef iswitchb icomplete autorevert time cus-start cus-load desktop server change-mode advice help-fns advice-preload ansi-color php-mode derived etags cc-langs cl cl-19 cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs speedbar sb-image ezimage dframe easymenu assoc lua-mode regexp-opt comint ring etags-update smart-quotes easy-mmode edmacro kmacro ispell ffap w3m-load psgml-init emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs devhelp preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) --=20 http://rrt.sc3d.org/