From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: HowTo: Run a hook when a buffer becomes "current" Date: Thu, 17 Dec 2015 23:04:53 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: plane.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: ger.gmane.org 1450411510 31568 80.91.229.3 (18 Dec 2015 04:05:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Dec 2015 04:05:10 +0000 (UTC) Cc: emacs-devel@gnu.org To: raman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 18 05:05:01 2015 Return-path: Envelope-to: ged-emacs-devel@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 1a9mHs-00087w-Fl for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2015 05:05:00 +0100 Original-Received: from localhost ([::1]:58302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9mHr-0004Bg-MH for ged-emacs-devel@m.gmane.org; Thu, 17 Dec 2015 23:04:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9mHo-0004BM-G0 for emacs-devel@gnu.org; Thu, 17 Dec 2015 23:04:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9mHn-0000dy-Lf for emacs-devel@gnu.org; Thu, 17 Dec 2015 23:04:56 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9mHm-0000cM-3W; Thu, 17 Dec 2015 23:04:54 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1a9mHl-0000bc-LK; Thu, 17 Dec 2015 23:04:53 -0500 In-reply-to: (message from raman on Thu, 17 Dec 2015 08:15:58 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196446 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > I specifically want to run a function when a function becomes current > and interactable by the user -- agreed that I dont want to run code in > the case of set-buffer. For now, an after advice on select-window does > nicely -- a select-window-hook would obviate the need for that advice That too will cause trouble for debugging. I think it is better for interfaces to simply operate on whatever buffer you're typing at. What would you like to use select-window-hook to do? Let's look for some way to achieve the ultimate goal. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html.