From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Disabling a mode based on the size of a buffer? Date: Sun, 25 Aug 2013 09:52:51 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1377438961 10281 80.91.229.3 (25 Aug 2013 13:56:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Aug 2013 13:56:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 25 15:56:04 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VDanO-0005ig-39 for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Aug 2013 15:55:58 +0200 Original-Received: from localhost ([::1]:46196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDanN-0000A1-OG for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Aug 2013 09:55:57 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Injection-Info: mx05.eternal-september.org; posting-host="3bfbafd28df269efb342992253d67f9c"; logging-data="28601"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189w5mUvAiVLa8YQl6qk4rQ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:gUEkPNG3Pl/2owGyvI0MSGGfOT4= sha1:HMuDZG7SZ30QALC50PadBQxdzEc= Original-Xref: usenet.stanford.edu gnu.emacs.help:200816 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93083 Archived-At: > Not very sofisticate: > (add-hook 'after-change-functions > (lambda (&rest _ignore) > (when (> (buffer-size) 1000000) > (fundamental-mode))) > nil t) It's still just a workaround, and unless the buffer is really "too large", this should be reported as a bug (ideally with an easy-to-reproduce-recipe). Stefan