From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Amos Bird Newsgroups: gmane.emacs.help Subject: Re: how can I run commands when window displays a different buffer? Date: Fri, 27 Oct 2017 20:46:14 +0800 Message-ID: <87mv4c92sp.fsf@gmail.com> References: <87o9os94qz.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: blaine.gmane.org 1509108489 25772 195.159.176.226 (27 Oct 2017 12:48:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 27 Oct 2017 12:48:09 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 25.3.1 Cc: "help-gnu-emacs@gnu.org" To: Kaushal Modi Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 27 14:48:03 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e843D-0004lh-1C for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Oct 2017 14:47:51 +0200 Original-Received: from localhost ([::1]:57194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e843K-0004fI-Cd for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Oct 2017 08:47:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e841j-0003zJ-SD for help-gnu-emacs@gnu.org; Fri, 27 Oct 2017 08:46:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e841j-0004kx-3k for help-gnu-emacs@gnu.org; Fri, 27 Oct 2017 08:46:19 -0400 Original-Received: from mail-pg0-x22f.google.com ([2607:f8b0:400e:c05::22f]:54216) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e841i-0004jd-T6 for help-gnu-emacs@gnu.org; Fri, 27 Oct 2017 08:46:19 -0400 Original-Received: by mail-pg0-x22f.google.com with SMTP id s2so5205049pge.10 for ; Fri, 27 Oct 2017 05:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:user-agent:in-reply-to:date :message-id:mime-version; bh=jJvohsCOFUCMJjmCUPHG4tz56iYYXR+xsb2HGIvxykI=; b=erA/ZQbNS1E0wpmM4Wm6XXneOu4JgAwQTs09/XM1Wr5Wi8phDSIQkDVHqGkCZHAa9w +Ppr/lzzns9uGg+7AZD0FJ6cCPuc/EkATwK2QQ1dxq+PjneeMZzu+n/WqlKjufsTpx5g 1eovMFvuekL1ig+RFMy9RdU1SyDAqven5+Yq0xZjYFM5QpcK5tiwtiFS6LBmRei7JA9o CgNQv/CJ211DNIRRbgnsfFCvvRSCQeUNYBLw3knxf/Lvc9L8hocqWE0YqR6ykl2dadwB WoG2Z5pxZEfMpuGUQyVJNTl8cTo0zOFPyQ0WViFVK2DO/mmHOaMevgz/DShtFnAsS3LY dK6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:user-agent :in-reply-to:date:message-id:mime-version; bh=jJvohsCOFUCMJjmCUPHG4tz56iYYXR+xsb2HGIvxykI=; b=PApF0McaZpe+HLwB44jS1jVsLGTj7isNtCOjN6+dZvkSdWubIHrYk/NaQPkIDxdUEH XPAneO7qVetMISIBD3DW/HdVpkoOfsfiH8tiA60FmOy5Gf8fk8PJEs6LxwZkFN3t5Slq aE9JldxqoisNG16VhkZvSGZVHnc2RmLD+xR528iqILsdTbaBASwCD5KrWAEPrL/F5QwH GV1H90gBdIcINLC+5a3R2iiWBFCosoW350Jt6ONWF8zlWXfEGe+20E+KODpNWLHGcyah cNtp7XuYzdpYnMYtd6a0qaQtPSr6nGm7tI2EXAd5wVSC+Usm7gpq2HqciM8Er5Is1986 jJhw== X-Gm-Message-State: AMCzsaVyAY8M2Q1ma+X2RtnUwKYk9izAgYdB427YE8XOTB49J/izaolJ fLhQ0mNTrQlif4xQXB3dRzs= X-Google-Smtp-Source: ABhQp+TQ3+3vmoiimGaN8lG/cz8KzyK3l9t6hgJBeUf7Tnp1UXnOBA0V1kkros/2kG+JuVKMEBZh5w== X-Received: by 10.99.7.208 with SMTP id 199mr217072pgh.158.1509108377806; Fri, 27 Oct 2017 05:46:17 -0700 (PDT) Original-Received: from localhost ([2604:180:3:28::c542]) by smtp.gmail.com with ESMTPSA id g7sm14833280pfj.13.2017.10.27.05.46.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2017 05:46:17 -0700 (PDT) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22f X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:114660 Archived-At: Hi Modi, I'd like to add a (recenter) command after all these commands. regards, Kaushal Modi writes: > On Fri, Oct 27, 2017 at 8:05 AM Amos Bird wrote: > >> I know there is a window-configuration-change-hook that covers >> this. But I need only the subset of the hook. What can I do? >> > > The question is too broad.. "window displays a different buffer" -- That > can happen by dozens of different commands: find-file, switch-to-buffer, > pop-to-buffer, etc. > > What is your exact use case? -- Amos Bird amosbird@gmail.com