bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12708: 24.1; M-x display-time-world "q" close window


From: Juri Linkov
Subject: bug#12708: 24.1; M-x display-time-world "q" close window
Date: Sat, 27 Oct 2012 14:45:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu)

>> (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)))
>
> Why don't you quit the *Occur* buffer window first and do a simple
> `pop-to-buffer' afterwards?

I tried it to be closer to the workflow of
`occur-mode-goto-occurrence-other-window'.
But your recipe would work as well.

> 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.

You might find it more confusing when I tell you that in ~/.emacs
I bound `occur-mode-goto-occurrence-kill-buffer' to C-RET ;-)

>> 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.

Shouldn't `display-buffer-at-bottom' create a window with the width of
the frame's full width?  In this case, left/center/right are not needed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]