From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103854: Reimplement list-processes in Lisp. Date: Thu, 7 Apr 2011 02:57:08 +0200 Message-ID: References: <87zko2rj4f.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1302137881 15273 80.91.229.12 (7 Apr 2011 00:58:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2011 00:58:01 +0000 (UTC) Cc: Emacs developers To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 07 02:57:57 2011 Return-path: Envelope-to: ged-emacs-devel@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 1Q7dXo-0004mO-Tz for ged-emacs-devel@m.gmane.org; Thu, 07 Apr 2011 02:57:57 +0200 Original-Received: from localhost ([127.0.0.1]:56386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7dXo-0000ix-5E for ged-emacs-devel@m.gmane.org; Wed, 06 Apr 2011 20:57:56 -0400 Original-Received: from [140.186.70.92] (port=44387 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7dXi-0000gH-DO for emacs-devel@gnu.org; Wed, 06 Apr 2011 20:57:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7dXh-00078x-DP for emacs-devel@gnu.org; Wed, 06 Apr 2011 20:57:50 -0400 Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:53234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7dXh-00078s-4k for emacs-devel@gnu.org; Wed, 06 Apr 2011 20:57:49 -0400 Original-Received: by yws5 with SMTP id 5so973165yws.0 for ; Wed, 06 Apr 2011 17:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=fd+x0UUYeq9jUt2NEZq6RLoGaFxkz/0lChaYsyMqZ5s=; b=n5H6C6WLaEQjesFKTmxlcFaxppl0r4mkvDdkexYvSbqZ4ZN4i0Z+QkHeW32WxA94CI PeRhSmrhxCtdkmrFfijGIN583VCspLYQpCyVPodOBM69Ao7zwaYfkDV3/ERqyvTwHksV GYZ3ipWTbTfBHoAzi4JuZLOsgZ0LbV9gkRnPM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=YflaQfOQKAQGE5poSCFsPtmLud1lmMZXT/uGkd+asxUxjHG4S/70GB4tPcrqaLMGiD IQQAVgKnq535ZwGG3bGAnOZIMMu/S51aw/GckJ7GdPqhbTkB8J4BuYxlFwEupLCV09Pk /LgBIRkajvkJagmbPKDP3VdgXcxC6cY/9g0cw= Original-Received: by 10.150.118.41 with SMTP id q41mr240875ybc.314.1302137868142; Wed, 06 Apr 2011 17:57:48 -0700 (PDT) Original-Received: by 10.147.182.17 with HTTP; Wed, 6 Apr 2011 17:57:08 -0700 (PDT) In-Reply-To: <87zko2rj4f.fsf@stupidchicken.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138268 Archived-At: On Thu, Apr 7, 2011 at 02:38, Chong Yidong wrote: > The documentation for temp-buffer-show-hook is somewhat vacuous--- For generous values of "somewhat", yeah. > it > says that it's the hook run by with-output-to-temp-buffer. =C2=A0Because = the > new implementation doesn't use with-output-to-temp-buffer, it doesn't > run the hook. Well, the problem is that with the current list-processes: (unless (bufferp buffer) (setq buffer (get-buffer-create "*Process List*"))) (with-current-buffer buffer (process-menu-mode) ;; <--- process-menu-mode-hook (setq process-menu-query-only query-only) (list-processes--refresh) (tabulated-list-print)) (display-buffer buffer)) ;; <--- showing the contents the point at which the available hook is run is way too early to make adding `fit-window-to-buffer' or `resize-temp-buffer-window' useful. And display-buffer does not run any hook. So the only fix is either a defadvice, or a wrapper function. > Should it? =C2=A0Note that list-buffers does not either. I hadn't noticed because I don't ever use it (I have bs-show bound to a single key, ); but I think resizing should work with list-buffers too. > Maybe temp-buffer-show-hook/temp-buffer-resize-mode needs a bit of a > rethink. =C2=A0IIUC, this hook was intended for "disposable" buffers that > temporarily display information but do not provide any other useful > interaction. =C2=A0But that hasn't even been the case for the *Help* buff= ers > for a long time, since those now contain clickable text buttons. Certainly, `temp-buffer-resize-mode' is useful for non-"disposable" buffers. Resizing is not related to the lifetime of the buffer contents. =C2=A0 =C2=A0 Juanma