* How can I make emacs open next directory in same window?
@ 2008-08-23 20:37 ssecorp
2008-08-23 22:27 ` Peter Dyballa
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: ssecorp @ 2008-08-23 20:37 UTC (permalink / raw)
To: help-gnu-emacs
I have some things about emacs I find annoying.
1. If I have split emacs into 2 windows and in one I open a directory
in one and click on them it will open in the other window, how can I
make it open in the same window?
2. If I have solit first into 2 vertical windows and then split one of
them into 2 horizontal and I want to undo the last split, can I do
that? C-x-1 undoes all...
3. If I want to split into 3 equally big windows and not split into 2
then split one of them into 2, how would I do that?
I want 1/3,1/3,1/3 not 1/2,1/4,1/4
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-23 20:37 How can I make emacs open next directory in same window? ssecorp
@ 2008-08-23 22:27 ` Peter Dyballa
2008-08-23 22:39 ` Rupert Swarbrick
2008-08-23 23:33 ` Andreas Politz
2 siblings, 0 replies; 13+ messages in thread
From: Peter Dyballa @ 2008-08-23 22:27 UTC (permalink / raw)
To: ssecorp; +Cc: help-gnu-emacs
Am 23.08.2008 um 22:37 schrieb ssecorp:
> 1. If I have split emacs into 2 windows and in one I open a directory
> in one and click on them it will open in the other window, how can I
> make it open in the same window?
Either type f (to follow into that directory) or bind the <mouse-2>
event to a different function than the default dired-mouse-find-file-
other-window.
--
Greetings
Pete
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
-Benjamin Franklin, Historical Review of Pennsylvania.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-23 20:37 How can I make emacs open next directory in same window? ssecorp
2008-08-23 22:27 ` Peter Dyballa
@ 2008-08-23 22:39 ` Rupert Swarbrick
2008-08-23 23:33 ` Andreas Politz
2 siblings, 0 replies; 13+ messages in thread
From: Rupert Swarbrick @ 2008-08-23 22:39 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 525 bytes --]
ssecorp <circularfunc@gmail.com> writes:
> I have some things about emacs I find annoying.
>
> 1. If I have split emacs into 2 windows and in one I open a directory
> in one and click on them it will open in the other window, how can I
> make it open in the same window?
In dired.el, near the top of a loong initialisation of the dired keymap
(line 1191), there's a line like this:
(define-key map [mouse-2] 'dired-mouse-find-file-other-window)
Looking at the definition of dired-mouse-find-file-other-window, you
find:
[-- Attachment #1.2: b.el --]
[-- Type: application/emacs-lisp, Size: 708 bytes --]
[-- Attachment #1.3: Type: text/plain, Size: 58 bytes --]
(yes. Eek) So I would try something like the following:
[-- Attachment #1.4: c.el --]
[-- Type: application/emacs-lisp, Size: 744 bytes --]
[-- Attachment #1.5: Type: text/plain, Size: 1028 bytes --]
Note that this is a bit rubbish - the only change is on the 3rd last
line of the function. If anyone knows whether it's possible to
dynamically bind dired-other-window to be dired for a sec while calling
the other version, it'd be a lot more elegant.
Anyway, that worked for me here!
>
> 2. If I have solit first into 2 vertical windows and then split one of
> them into 2 horizontal and I want to undo the last split, can I do
> that? C-x-1 undoes all...
Well this one's easy :)
C-x 0 deletes a window, so if you have the situation you described, when
you're in the window marked *
/-------------\
| * | |
+-------------+
| | |
\-------------/
hitting C-x 0 will give you
/-------------\
| * |
+-------------+
| | |
\-------------/
etc.
>
> 3. If I want to split into 3 equally big windows and not split into 2
> then split one of them into 2, how would I do that?
> I want 1/3,1/3,1/3 not 1/2,1/4,1/4
I didn't know of existing code to do this, so I hacked something up
myself:
[-- Attachment #1.6: a.el --]
[-- Type: application/emacs-lisp, Size: 608 bytes --]
[-- Attachment #1.7: Type: text/plain, Size: 142 bytes --]
Exercise for reader: Deal with the rounding errors that I've completely
ignored.
That said, it seems to work reasonably well here!
Rupert
[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-23 20:37 How can I make emacs open next directory in same window? ssecorp
2008-08-23 22:27 ` Peter Dyballa
2008-08-23 22:39 ` Rupert Swarbrick
@ 2008-08-23 23:33 ` Andreas Politz
2008-08-24 20:45 ` ssecorp
2 siblings, 1 reply; 13+ messages in thread
From: Andreas Politz @ 2008-08-23 23:33 UTC (permalink / raw)
To: help-gnu-emacs
ssecorp wrote:
> I have some things about emacs I find annoying.
>
> 1. If I have split emacs into 2 windows and in one I open a directory
> in one and click on them it will open in the other window, how can I
> make it open in the same window?
>
> 2. If I have solit first into 2 vertical windows and then split one of
> them into 2 horizontal and I want to undo the last split, can I do
> that? C-x-1 undoes all...
>
That's what winner-mode does.
http://www.emacswiki.org/cgi-bin/wiki/WinnerMode
> 3. If I want to split into 3 equally big windows and not split into 2
> then split one of them into 2, how would I do that?
> I want 1/3,1/3,1/3 not 1/2,1/4,1/4
C-x +
balance-windows
-ap
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-23 23:33 ` Andreas Politz
@ 2008-08-24 20:45 ` ssecorp
2008-08-25 8:41 ` Andreas Politz
2008-08-25 9:15 ` Richard G Riley
0 siblings, 2 replies; 13+ messages in thread
From: ssecorp @ 2008-08-24 20:45 UTC (permalink / raw)
To: help-gnu-emacs
On Aug 24, 1:33 am, Andreas Politz <poli...@fh-trier.de> wrote:
> ssecorp wrote:
> > I have some things about emacs I find annoying.
>
> > 1. If I have split emacs into 2 windows and in one I open a directory
> > in one and click on them it will open in the other window, how can I
> > make it open in the same window?
>
> > 2. If I have solit first into 2 vertical windows and then split one of
> > them into 2 horizontal and I want to undo the last split, can I do
> > that? C-x-1 undoes all...
>
> That's what winner-mode does.
>
> http://www.emacswiki.org/cgi-bin/wiki/WinnerMode
>
> > 3. If I want to split into 3 equally big windows and not split into 2
> > then split one of them into 2, how would I do that?
> > I want 1/3,1/3,1/3 not 1/2,1/4,1/4
>
> C-x +
> balance-windows
>
> -ap
thanks, correction M-x not C-x though :)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-24 20:45 ` ssecorp
@ 2008-08-25 8:41 ` Andreas Politz
2008-08-28 17:56 ` giglio robbo' d'acciaio
2008-08-25 9:15 ` Richard G Riley
1 sibling, 1 reply; 13+ messages in thread
From: Andreas Politz @ 2008-08-25 8:41 UTC (permalink / raw)
To: help-gnu-emacs
ssecorp wrote:
> On Aug 24, 1:33 am, Andreas Politz <poli...@fh-trier.de> wrote:
>> ssecorp wrote:
>>> I have some things about emacs I find annoying.
>>> 1. If I have split emacs into 2 windows and in one I open a directory
>>> in one and click on them it will open in the other window, how can I
>>> make it open in the same window?
>>> 2. If I have solit first into 2 vertical windows and then split one of
>>> them into 2 horizontal and I want to undo the last split, can I do
>>> that? C-x-1 undoes all...
>> That's what winner-mode does.
>>
>> http://www.emacswiki.org/cgi-bin/wiki/WinnerMode
>>
>>> 3. If I want to split into 3 equally big windows and not split into 2
>>> then split one of them into 2, how would I do that?
>>> I want 1/3,1/3,1/3 not 1/2,1/4,1/4
>> C-x +
>> balance-windows
>>
>> -ap
>
> thanks, correction M-x not C-x though :)
>
The command 'balance-window' is bound to 'C-x +', at least this side :)
-ap
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-24 20:45 ` ssecorp
2008-08-25 8:41 ` Andreas Politz
@ 2008-08-25 9:15 ` Richard G Riley
2008-08-26 5:03 ` cnb
1 sibling, 1 reply; 13+ messages in thread
From: Richard G Riley @ 2008-08-25 9:15 UTC (permalink / raw)
To: help-gnu-emacs
ssecorp <circularfunc@gmail.com> writes:
> On Aug 24, 1:33 am, Andreas Politz <poli...@fh-trier.de> wrote:
>> ssecorp wrote:
>> > I have some things about emacs I find annoying.
>>
>> > 1. If I have split emacs into 2 windows and in one I open a directory
>> > in one and click on them it will open in the other window, how can I
>> > make it open in the same window?
>>
>> > 2. If I have solit first into 2 vertical windows and then split one of
>> > them into 2 horizontal and I want to undo the last split, can I do
>> > that? C-x-1 undoes all...
>>
>> That's what winner-mode does.
>>
>> http://www.emacswiki.org/cgi-bin/wiki/WinnerMode
>>
>> > 3. If I want to split into 3 equally big windows and not split into 2
>> > then split one of them into 2, how would I do that?
>> > I want 1/3,1/3,1/3 not 1/2,1/4,1/4
>>
>> C-x +
>> balance-windows
>>
>> -ap
>
> thanks, correction M-x not C-x though :)
>
It's C-x here.
,----
| C-x + runs the command balance-windows
| which is an interactive compiled Lisp function in `window.el'.
`----
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-25 9:15 ` Richard G Riley
@ 2008-08-26 5:03 ` cnb
0 siblings, 0 replies; 13+ messages in thread
From: cnb @ 2008-08-26 5:03 UTC (permalink / raw)
To: help-gnu-emacs
also:
How can I make emacs open next directory in same window?
^ permalink raw reply [flat|nested] 13+ messages in thread
* How can I make emacs open next directory in same window?
@ 2008-08-26 7:49 cnb
2008-08-26 10:19 ` Rupert Swarbrick
2008-08-26 15:24 ` Arnaldo Mandel
0 siblings, 2 replies; 13+ messages in thread
From: cnb @ 2008-08-26 7:49 UTC (permalink / raw)
To: help-gnu-emacs
How can I make emacs open next directory in same window when I use the
mouse? Let's say I have 2 split windows and then I have the
directories open in one and a program ion the tiher. now if click the
folders they open in the program-window instead of the same window.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-26 7:49 cnb
@ 2008-08-26 10:19 ` Rupert Swarbrick
2008-08-26 15:24 ` Arnaldo Mandel
1 sibling, 0 replies; 13+ messages in thread
From: Rupert Swarbrick @ 2008-08-26 10:19 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
cnb <circularfunc@yahoo.se> writes:
> How can I make emacs open next directory in same window when I use the
> mouse? Let's say I have 2 split windows and then I have the
> directories open in one and a program ion the tiher. now if click the
> folders they open in the program-window instead of the same window.
Er, both I and others replied to your post a few days ago, which was
itemized into 3 sections.
My reply to your first section answered this question then. Since your
question hasn't changed, neither has the answer.
Rupert
P.S. It's somewhat more polite to sign with your name or at least a
screen handle, rather than just throwing a demand for attention/help
into the ether.
[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: How can I make emacs open next directory in same window?
2008-08-26 7:49 cnb
2008-08-26 10:19 ` Rupert Swarbrick
@ 2008-08-26 15:24 ` Arnaldo Mandel
2008-08-27 12:10 ` Bernardo Bacic
1 sibling, 1 reply; 13+ messages in thread
From: Arnaldo Mandel @ 2008-08-26 15:24 UTC (permalink / raw)
To: help-gnu-emacs
cnb wrote (on Aug 26, 2008):
> How can I make emacs open next directory in same window when I use the
> mouse? Let's say I have 2 split windows and then I have the
> directories open in one and a program ion the tiher. now if click the
> folders they open in the program-window instead of the same window.
>
This works, you don't even need to point exactly at the filename:
(defun mouse-find-file (click)
"Inspect the file the mouse is pointing at."
(interactive "@e")
(mouse-set-point click)
(find-file (dired-get-filename)))
I bind it like this:
(define-key dired-mode-map [mouse-2] 'mouse-find-file)
am
--
Arnaldo Mandel
am@ime.usp.br
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-26 15:24 ` Arnaldo Mandel
@ 2008-08-27 12:10 ` Bernardo Bacic
0 siblings, 0 replies; 13+ messages in thread
From: Bernardo Bacic @ 2008-08-27 12:10 UTC (permalink / raw)
To: help-gnu-emacs
> How can I make emacs open next directory in same window when I use the
> mouse? Let's say I have 2 split windows and then I have the
> directories open in one and a program ion the tiher. now if click the
> folders they open in the program-window instead of the same window.
this is not answering your question but from what you describe i'm under
impression you may be interested in trying speedbar mode
http://www.emacswiki.org/cgi-bin/wiki/SpeedBar
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: How can I make emacs open next directory in same window?
2008-08-25 8:41 ` Andreas Politz
@ 2008-08-28 17:56 ` giglio robbo' d'acciaio
0 siblings, 0 replies; 13+ messages in thread
From: giglio robbo' d'acciaio @ 2008-08-28 17:56 UTC (permalink / raw)
To: help-gnu-emacs
Andreas Politz <politza@fh-trier.de> writes:
>>> C-x +
>>> balance-windows
>>>
>>> -ap
>>
>> thanks, correction M-x not C-x though :)
>>
>
> The command 'balance-window' is bound to 'C-x +', at least this side :)
I think that the OP read C-x + balance-windows as a single command.
Indeed is “C-x +” /or/ “M-x balance-windows”.
--
Daniele Giglio Dona i tuoi cicli di clock alla ricerca!
email in ROT13 http://boinc.berkeley.edu/
qtvtyvb@vby.vg
--------------------
Cambiare e' la regola della vita. E quelli che guardano al passato od
al presente, certamente perderanno il futuro.
-- John F. Kennedy
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-08-28 17:56 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-23 20:37 How can I make emacs open next directory in same window? ssecorp
2008-08-23 22:27 ` Peter Dyballa
2008-08-23 22:39 ` Rupert Swarbrick
2008-08-23 23:33 ` Andreas Politz
2008-08-24 20:45 ` ssecorp
2008-08-25 8:41 ` Andreas Politz
2008-08-28 17:56 ` giglio robbo' d'acciaio
2008-08-25 9:15 ` Richard G Riley
2008-08-26 5:03 ` cnb
-- strict thread matches above, loose matches on Subject: below --
2008-08-26 7:49 cnb
2008-08-26 10:19 ` Rupert Swarbrick
2008-08-26 15:24 ` Arnaldo Mandel
2008-08-27 12:10 ` Bernardo Bacic
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.