unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Disabling a mode based on the size of a buffer?
Date: Sun, 25 Aug 2013 09:52:51 -0400	[thread overview]
Message-ID: <jwv4nad98ui.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.451.1377049349.10748.help-gnu-emacs@gnu.org

> 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


  parent reply	other threads:[~2013-08-25 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 17:08 Disabling a mode based on the size of a buffer? Tim Visher
2013-08-20 21:44 ` Michael Heerdegen
2013-08-21 14:10   ` Tim Visher
2013-08-22  5:25   ` Julien Cubizolles
2013-08-21  1:41 ` Juanma Barranquero
2013-08-21 14:11   ` Tim Visher
     [not found] ` <mailman.451.1377049349.10748.help-gnu-emacs@gnu.org>
2013-08-25 13:52   ` Stefan Monnier [this message]
2013-08-25 21:00     ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4nad98ui.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).