* Lock buffer to window
@ 2007-05-23 19:14 Nikolaj Fogh
[not found] ` <mailman.1165.1180017190.32220.help-gnu-emacs@gnu.org>
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Nikolaj Fogh @ 2007-05-23 19:14 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I was wondering if there was any way of locking a specific buffer to a
window it emacs, so that that window never changes buffer. I have some
trouble when I edit a LaTeX document and compile it, the compilation
buffer overrides my reftex-toc buffer.
thanks,
Nikolaj Fogh
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <mailman.1165.1180017190.32220.help-gnu-emacs@gnu.org>]
* Re: Lock buffer to window
[not found] ` <mailman.1165.1180017190.32220.help-gnu-emacs@gnu.org>
@ 2007-05-24 14:05 ` Nikolaj Fogh
0 siblings, 0 replies; 10+ messages in thread
From: Nikolaj Fogh @ 2007-05-24 14:05 UTC (permalink / raw)
To: help-gnu-emacs
Nikolaj Schumacher wrote:
> Nikolaj Fogh <nikolajfogh@gmail.com> wrote
>
>
>>I was wondering if there was any way of locking a specific buffer to a
>>window it emacs, so that that window never changes buffer.
>
>
>
> Hello Nikolaj,
>
>
> try adding the following to your .emacs:
>
> (define-minor-mode sticky-buffer-mode
> "Make the current window always display this buffer."
> nil " sticky" nil
> (set-window-dedicated-p (selected-window) sticky-buffer-mode))
>
> then M-x sticky-buffer-mode.
>
>
>
> regards,
> Nikolaj Schumacher
>
>
Thanks a lot. That was just what I was looking for.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Lock buffer to window
2007-05-23 19:14 Lock buffer to window Nikolaj Fogh
[not found] ` <mailman.1165.1180017190.32220.help-gnu-emacs@gnu.org>
@ 2007-05-24 14:32 ` Nikolaj Schumacher
2007-05-24 21:45 ` Xavier Maillard
2007-05-24 21:45 ` Xavier Maillard
2 siblings, 1 reply; 10+ messages in thread
From: Nikolaj Schumacher @ 2007-05-24 14:32 UTC (permalink / raw)
To: Nikolaj Fogh; +Cc: help-gnu-emacs
Nikolaj Fogh <nikolajfogh@gmail.com> wrote
> I was wondering if there was any way of locking a specific buffer to a
> window it emacs, so that that window never changes buffer.
Hello Nikolaj,
try adding the following to your .emacs:
(define-minor-mode sticky-buffer-mode
"Make the current window always display this buffer."
nil " sticky" nil
(set-window-dedicated-p (selected-window) sticky-buffer-mode))
then M-x sticky-buffer-mode.
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Lock buffer to window
2007-05-23 19:14 Lock buffer to window Nikolaj Fogh
[not found] ` <mailman.1165.1180017190.32220.help-gnu-emacs@gnu.org>
2007-05-24 14:32 ` Nikolaj Schumacher
@ 2007-05-24 21:45 ` Xavier Maillard
2 siblings, 0 replies; 10+ messages in thread
From: Xavier Maillard @ 2007-05-24 21:45 UTC (permalink / raw)
To: Nikolaj Fogh; +Cc: help-gnu-emacs
Hi,
I was wondering if there was any way of locking a specific buffer to a
window it emacs, so that that window never changes buffer. I have some
trouble when I edit a LaTeX document and compile it, the compilation
buffer overrides my reftex-toc buffer.
If you want to do this interactively, you would use
`toggle-read-only' bound to C-x C-q.
If you want to do this programmatically, you could
`buffer-read-only' variable this way:
(let ((buffer-read-only nil)
....
)
(message "Buffer is read/write"))
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Lock buffer to window
@ 2006-09-11 12:28 martin rudalics
0 siblings, 0 replies; 10+ messages in thread
From: martin rudalics @ 2006-09-11 12:28 UTC (permalink / raw)
Cc: help-gnu-emacs
Did you try `set-window-dedicated-p'?
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <mailman.6613.1157699819.9609.help-gnu-emacs@gnu.org>]
* Re: Lock buffer to window
[not found] <mailman.6613.1157699819.9609.help-gnu-emacs@gnu.org>
@ 2006-09-08 7:56 ` Mathias Dahl
2006-09-08 8:00 ` Mathias Dahl
2006-09-11 7:23 ` henning
0 siblings, 2 replies; 10+ messages in thread
From: Mathias Dahl @ 2006-09-08 7:56 UTC (permalink / raw)
henning <henning.red@googlemail.com> writes:
> When using dired or rdired (from ESS) I sometimes want to keep a
> buffer in a certain window. However, commands such as e.g. 'man'
> might change the buffer in that window. Is there a way to dedicate a
> window to a particular buffer so that that window becomes invisible
> to commands that request a window for showing output? calculator is
> another such example where I obviously dont want the man page to
> show up in the tiny window created by the calculator command.
This doesn't solve the problem in the exact way you want, but you
might want to try it out anyway:
Try this:
(setq special-display-buffer-names
(append special-display-buffer-names (list "*Help*")))
Then use any of the help commands, `C-h f' for example. Notice how the
*Help* buffer opens in a new frame instead of splitting the current
window.
If you want to do more advanced matching of buffer names, try
`special-display-regexps' instead.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Lock buffer to window
2006-09-08 7:56 ` Mathias Dahl
@ 2006-09-08 8:00 ` Mathias Dahl
2006-09-11 7:23 ` henning
1 sibling, 0 replies; 10+ messages in thread
From: Mathias Dahl @ 2006-09-08 8:00 UTC (permalink / raw)
Mathias Dahl <brakjoller@gmail.com> writes:
> If you want to do more advanced matching of buffer names, try
> `special-display-regexps' instead.
While I'm at it I could as well give you an advanced example of this:
(setq
special-display-regexps
(list (list "jabber-chat"
'(width . 80)
'(scroll-bar-width . 16)
'(height . 15)
'(tool-bar-lines . 0)
'(menu-bar-lines 0)
'(left . 80)
'(top . 120)
'(icon-type . "h:/dat/gfx/ico/jabber_bulb_small.ico")
(cons 'font
(if (memq window-system '(win32 w32))
"-GURSoutline-Courier New-normal-r-normal-normal-11-82-96-96-c-70-iso8859-1"
"-Misc-Fixed-Medium-R-Normal--14-130-75-75-C-70-ISO8859-1")))))
The above will make all buffers matching "jabber-chat" open up in a
new frame with the specified frame properties. Quite cool.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Lock buffer to window
2006-09-08 7:56 ` Mathias Dahl
2006-09-08 8:00 ` Mathias Dahl
@ 2006-09-11 7:23 ` henning
1 sibling, 0 replies; 10+ messages in thread
From: henning @ 2006-09-11 7:23 UTC (permalink / raw)
Thanks, but you are right, its not really what I want to do, I would like to
force a window to show current buffer and not switch buffer until I
explicitly say so. I have been trying to implement this but it was harder
than I had imagined. Maybe I can get by with what you suggested though.
Cheers,
H
Mathias Dahl-4 wrote:
>
> henning <henning.red@googlemail.com> writes:
>
> This doesn't solve the problem in the exact way you want, but you
> might want to try it out anyway:
>
> Try this:
>
> (setq special-display-buffer-names
> (append special-display-buffer-names (list "*Help*")))
>
> Then use any of the help commands, `C-h f' for example. Notice how the
> *Help* buffer opens in a new frame instead of splitting the current
> window.
>
> If you want to do more advanced matching of buffer names, try
> `special-display-regexps' instead.
>
>
--
View this message in context: http://www.nabble.com/Lock-buffer-to-window-tf2237460.html#a6242158
Sent from the Emacs - Help forum at Nabble.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Lock buffer to window
@ 2006-09-08 7:16 henning
0 siblings, 0 replies; 10+ messages in thread
From: henning @ 2006-09-08 7:16 UTC (permalink / raw)
When using dired or rdired (from ESS) I sometimes want to keep a buffer in a
certain window. However, commands such as e.g. 'man' might change the buffer
in that window. Is there a way to dedicate a window to a particular buffer
so that that window becomes invisible to commands that request a window for
showing output? calculator is another such example where I obviously dont
want the man page to show up in the tiny window created by the calculator
command.
Thanks for any tips,
Henning
--
View this message in context: http://www.nabble.com/Lock-buffer-to-window-tf2237460.html#a6204081
Sent from the Emacs - Help forum at Nabble.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-05-24 21:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23 19:14 Lock buffer to window Nikolaj Fogh
[not found] ` <mailman.1165.1180017190.32220.help-gnu-emacs@gnu.org>
2007-05-24 14:05 ` Nikolaj Fogh
2007-05-24 14:32 ` Nikolaj Schumacher
2007-05-24 21:45 ` Xavier Maillard
2007-05-24 21:45 ` Xavier Maillard
-- strict thread matches above, loose matches on Subject: below --
2006-09-11 12:28 martin rudalics
[not found] <mailman.6613.1157699819.9609.help-gnu-emacs@gnu.org>
2006-09-08 7:56 ` Mathias Dahl
2006-09-08 8:00 ` Mathias Dahl
2006-09-11 7:23 ` henning
2006-09-08 7:16 henning
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.