From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#12708: 24.1; M-x display-time-world "q" close window Date: Sat, 27 Oct 2012 13:04:54 +0200 Message-ID: <508BBFD6.7080300@gmx.at> References: <87txtmkziu.fsf@blah.blah> <50863A2C.1010008@gmx.at> <87objs9uvn.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1351335954 13777 80.91.229.3 (27 Oct 2012 11:05:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Oct 2012 11:05:54 +0000 (UTC) Cc: 12708@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 27 13:06:03 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1TS4DK-00087w-4n for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2012 13:06:02 +0200 Original-Received: from localhost ([::1]:42677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TS4DC-0004jI-4u for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Oct 2012 07:05:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TS4D8-0004hn-JI for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2012 07:05:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TS4D6-0004FW-OV for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2012 07:05:50 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TS4D6-0004FQ-Ia for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2012 07:05:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TS4FG-00010E-8r for bug-gnu-emacs@gnu.org; Sat, 27 Oct 2012 07:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Oct 2012 11:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12708 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12708-submit@debbugs.gnu.org id=B12708.13513360443809 (code B ref 12708); Sat, 27 Oct 2012 11:08:02 +0000 Original-Received: (at 12708) by debbugs.gnu.org; 27 Oct 2012 11:07:24 +0000 Original-Received: from localhost ([127.0.0.1]:35487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TS4Ee-0000zH-2B for submit@debbugs.gnu.org; Sat, 27 Oct 2012 07:07:24 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:44863) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TS4EZ-0000z7-Ng for 12708@debbugs.gnu.org; Sat, 27 Oct 2012 07:07:21 -0400 Original-Received: (qmail invoked by alias); 27 Oct 2012 11:05:04 -0000 Original-Received: from 62-47-58-51.adsl.highway.telekom.at (EHLO [62.47.58.51]) [62.47.58.51] by mail.gmx.net (mp032) with SMTP; 27 Oct 2012 13:05:04 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18ba3lzP1Eb69LZQBO7C7vS+kjW7qTkpgAVNfPMcZ BVweRJPBw/4xrD In-Reply-To: <87objs9uvn.fsf@mail.jurta.org> X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:66104 Archived-At: > BTW, when I needed to do the same for the *Occur* buffer > (to kill it after going to the occurrence) I created a new command > `occur-mode-goto-occurrence-kill-buffer' based on > `occur-mode-goto-occurrence-other-window': > > (defun occur-mode-goto-occurrence-kill-buffer () > "Go to the occurrence the current line describes, and kill the Occur buffer." > (interactive) > (let ((buf (current-buffer)) > (pos (occur-mode-find-occurrence))) > (switch-to-buffer-other-window (marker-buffer pos)) > (goto-char pos) > (kill-buffer buf) > (run-hooks 'occur-mode-find-occurrence-hook))) > > I still have no idea how to generalize this common behavior. Why don't you quit the *Occur* buffer window first and do a simple `pop-to-buffer' afterwards? In any case I think that the "kill the *Occur* buffer" effect should be achieved with some sort of prefix. BTW, I find bindings like (define-key map "\C-c\C-c" 'occur-mode-goto-occurrence) (define-key map "\C-m" 'occur-mode-goto-occurrence) (define-key map "o" 'occur-mode-goto-occurrence-other-window) very confusing. > In addition to this, it could also use the action > `display-buffer-below-selected' (like in dired), I think `display-buffer-at-bottom' would suit better. But this needs some way to say bottom-left, bottom-center, bottom-right. I'm not yet sure how to do that best. > and instead of `fit-window-to-buffer' it could use > '((window-height . fit-window-to-buffer)). I installed that now. martin