From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: egarrulo Newsgroups: gmane.emacs.help Subject: Re: Hook for "buffer switched" Date: Wed, 15 Dec 2010 10:33:24 +0000 Message-ID: References: <44c604d5-d4ca-4914-bc02-40f0fada6f3d@y31g2000vbt.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1292409485 17566 80.91.229.12 (15 Dec 2010 10:38:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Dec 2010 10:38:05 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Deniz Dogan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 15 11:38:01 2010 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.69) (envelope-from ) id 1PSokC-0000f0-Qh for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Dec 2010 11:38:00 +0100 Original-Received: from localhost ([127.0.0.1]:38271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PSogW-00072d-9v for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Dec 2010 05:34:12 -0500 Original-Received: from [140.186.70.92] (port=33219 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PSofn-00071f-4U for help-gnu-emacs@gnu.org; Wed, 15 Dec 2010 05:33:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PSofl-0003Gv-VT for help-gnu-emacs@gnu.org; Wed, 15 Dec 2010 05:33:26 -0500 Original-Received: from mail-qw0-f41.google.com ([209.85.216.41]:56254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PSofl-0003Go-Rx for help-gnu-emacs@gnu.org; Wed, 15 Dec 2010 05:33:25 -0500 Original-Received: by qwa26 with SMTP id 26so1752427qwa.0 for ; Wed, 15 Dec 2010 02:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=v+njJ35rLn+5Do1chC4SKDTeYIuB7bxoXg71Kh4L2AU=; b=CuCS2WX6rrz5nnc2R6UB66hGkctp06Hpi4q8EkSOHdKEedNzD6b5eKKvdr+irpPH9w vFEVKNEdA7/21jSmWElW68CEa7xPEr+Ts1fguH3B1senY9O35mBq+pnORRcXsP5oUwZ9 a64A4C/9kWntdlPFEIZavPrxLcVPpHPHs4y24= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=N14I5HftPbYKywhUqDQoqwjIsEovQjK7GGGNyHfV3p6rYRQ08Qcg3diTCStlO8TVQV 948JwQWjJ+f4gN5dATU4eRLfStC4kxTi+8o8b+rp5BisjDmA2ymUxEke9xxsTNMFdp3A Z0jGUKyZFQfoM7mYzVzZxhOW3PjXHygbw65Ys= Original-Received: by 10.224.20.9 with SMTP id d9mr6146515qab.228.1292409204909; Wed, 15 Dec 2010 02:33:24 -0800 (PST) Original-Received: by 10.220.199.68 with HTTP; Wed, 15 Dec 2010 02:33:24 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:77519 Archived-At: 2010/12/15 Deniz Dogan : > 2010/12/15 Elena : >> On Dec 15, 5:07=A0am, Stefan Monnier wrote: >>> > Is there any hook that is run when a buffer is switched? >>> >>> I think generally the answer is "no", tho this question is ill-formed: >>> it's not clear what you mean by switching buffer: do you mean "change >>> the currently active buffer" (i.e. what is done by `set-buffer'), or >>> "change the buffer displayed in the current window", or "select >>> a different window showing a different buffer", or ... >> >> I would like to be able to handle the "change >> the currently active buffer" case. >> >> >>> > If not, why not? >>> >>> Maybe because to a large extent it's an ill-defined problem and once >>> they try to define it better, people seem to end up deciding they don't >>> really need to solve it any more? >> >> Or maybe because they are not able to solve it reliably. =A0For >> instance, I'd like Viper state to be global instead of buffer-local. >> For this to work, I would have to know whenever the current active >> buffer changes and switch Viper state when needed. =A0Or I could just >> prefer always switching to Normal state whenever I switch buffer. >> > > How come I never received Stefan's e-mail? > > -- > Deniz Dogan > It seems there is some overlapping between help-gnu-emacs@gnu.org and gnu.emacs.help.