* Re: moving between buffers side-by-side using the keyboard
2017-02-15 13:52 ` Sharon Kimble
@ 2017-02-15 14:04 ` Kaushal Modi
2017-02-15 14:41 ` Drew Adams
2017-02-15 19:47 ` Filipe Silva
2 siblings, 0 replies; 14+ messages in thread
From: Kaushal Modi @ 2017-02-15 14:04 UTC (permalink / raw)
To: Sharon Kimble, Joost Kremers; +Cc: help-emacs, Filipe Silva
On Wed, Feb 15, 2017 at 8:53 AM Sharon Kimble <boudiccas@skimble.plus.com>
wrote:
> I've found that I'd assigned 'C-x o' to two things in my config file,
> one of which is to 'outline-minor-mode-prefix', so I commented out the
> unused one and restarted emacs.
>
> But it still didn't work, so I searched in my config for
> 'outline-minor-mode-prefix' and found that I'd assigned it twice, so I
> commented out the second instant, and restarted again.
>
> But it still didn't work, so this what I've got it showing as -
>
> --8<---------------cut here---------------start------------->8---
> (global-set-key (kbd "C-x o") 'outline-minor-mode-prefix)
> --8<---------------cut here---------------end--------------->8---
>
> If I comment out that line and restart it shows that 'C-x o' is unassigned.
>
> I don't have windmove or ace-window installed, but I'm quite prepared to
> if it means that I get the required functionality.
>
windmove ships with emacs. You just need to enable it by putting this in
your config
(windmove-default-keybindings)
Then Shift+left/right will switch to windows on left/right.
If you do not like the default bindings, you can bind
windmove-left/right/up/down functions directly.
--
Kaushal Modi
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: moving between buffers side-by-side using the keyboard
2017-02-15 13:52 ` Sharon Kimble
2017-02-15 14:04 ` Kaushal Modi
@ 2017-02-15 14:41 ` Drew Adams
2017-02-15 15:24 ` Sharon Kimble
2017-02-15 19:47 ` Filipe Silva
2 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2017-02-15 14:41 UTC (permalink / raw)
To: Sharon Kimble, Joost Kremers; +Cc: help-emacs, Filipe Silva
> But if I do 'C-x o' now , it shows
> (wrong-type-argument commandp outline-minor-mode-prefix) in command-execute
>
> So where do I go from here please?
>
> I don't have windmove or ace-window installed, but I'm quite prepared to
> if it means that I get the required functionality.
I'd say that _independently_ of whether you decide to use some
other method, you might want to get the above problem straightened
out. How you do that can help you with other, similar problems later.
First, what you are asking about is switching _windows_, not
_buffers_. Knowing the kind of thingie you are asking about can
help you when trying to figure things out by looking at function
and variable names, consulting the doc, etc.
Second, to find whatever in your setup is taking over `C-x o' and
stop it from doing so, recursively bisect your init file - that's
a binary search for the culprit, and it is quite quick to do.
You can do that by commenting out a region of text in your init
file. Comment out first 1/2 of it (stopping after a full sexp
(expression), of course, so that what is commented out can be
evaluated without error). Then comment out half of the half that
is problematic (so you've now narrowed it down to 1/4). Then
from 1/4 you keep doing the same thing: 1/8, 1/16, 1/32, 1/64,
1/128... until you get to whatever code is causing the problem.
This is blind and dumb, but it is quick and systematic, and it
cannot fail.
If the problem turns out to be in some library that you load,
then either stop loading it (!) or repeat the same operation
on it, to see which part of it is problematic.
To comment out a region of text you can use command
`comment-region'. (Bind it to a key, if you want.) With a
plain prefix arg (`C-u') it UNcomments the region instead.
(That is, it removes one level of comments, leaving nested
comments.)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: moving between buffers side-by-side using the keyboard
2017-02-15 14:41 ` Drew Adams
@ 2017-02-15 15:24 ` Sharon Kimble
2017-02-15 16:07 ` Drew Adams
0 siblings, 1 reply; 14+ messages in thread
From: Sharon Kimble @ 2017-02-15 15:24 UTC (permalink / raw)
To: Drew Adams; +Cc: Joost Kremers, help-emacs, Filipe Silva
[-- Attachment #1: Type: text/plain, Size: 2454 bytes --]
Drew Adams <drew.adams@oracle.com> writes:
>> But if I do 'C-x o' now , it shows
>> (wrong-type-argument commandp outline-minor-mode-prefix) in command-execute
>>
>> So where do I go from here please?
>>
>> I don't have windmove or ace-window installed, but I'm quite prepared to
>> if it means that I get the required functionality.
>
> I'd say that _independently_ of whether you decide to use some
> other method, you might want to get the above problem straightened
> out. How you do that can help you with other, similar problems later.
>
> First, what you are asking about is switching _windows_, not
> _buffers_. Knowing the kind of thingie you are asking about can
> help you when trying to figure things out by looking at function
> and variable names, consulting the doc, etc.
>
> Second, to find whatever in your setup is taking over `C-x o' and
> stop it from doing so, recursively bisect your init file - that's
> a binary search for the culprit, and it is quite quick to do.
>
> You can do that by commenting out a region of text in your init
> file. Comment out first 1/2 of it (stopping after a full sexp
> (expression), of course, so that what is commented out can be
> evaluated without error). Then comment out half of the half that
> is problematic (so you've now narrowed it down to 1/4). Then
> from 1/4 you keep doing the same thing: 1/8, 1/16, 1/32, 1/64,
> 1/128... until you get to whatever code is causing the problem.
>
> This is blind and dumb, but it is quick and systematic, and it
> cannot fail.
>
> If the problem turns out to be in some library that you load,
> then either stop loading it (!) or repeat the same operation
> on it, to see which part of it is problematic.
>
> To comment out a region of text you can use command
> `comment-region'. (Bind it to a key, if you want.) With a
> plain prefix arg (`C-u') it UNcomments the region instead.
> (That is, it removes one level of comments, leaving nested
> comments.)
Unfortunately I don't have the time to bisect my config, I need the time
for my book that I'm writing. Maybe I'll have the time at the weekend.
I accept that I used wrong terminology for my problem, but I felt that
calling it a 'buffer' would show what I was thinking and asking about.
Thanks
Sharon.
--
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.6, fluxbox 1.3.5-2, emacs 25.1.1.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: moving between buffers side-by-side using the keyboard
2017-02-15 15:24 ` Sharon Kimble
@ 2017-02-15 16:07 ` Drew Adams
2017-02-16 4:44 ` Marcin Borkowski
0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2017-02-15 16:07 UTC (permalink / raw)
To: Sharon Kimble; +Cc: Joost Kremers, help-emacs, Filipe Silva
> Unfortunately I don't have the time to bisect my config, I need the time
> for my book that I'm writing. Maybe I'll have the time at the weekend.
OK, but just let me harp on this one more time (because we've all
been there): It is very quick.
It _seems_ slow at first. And yes, it's dumb. But it's power is
exponential - it quickly gets very quick. ;-) Think of the old
story of doubling the grains of rice on a chessboard. Yes, at
first it seems like very little rice is involved...
The slowest part of this particular binary search is to restart
Emacs each time, after you've commented out part of your init
file. But the more that is commented out, the closer the startup
becomes to a virgin startup (i.e., `emacs -Q': no init file).
> I accept that I used wrong terminology for my problem, but I felt that
> calling it a 'buffer' would show what I was thinking and asking about.
I didn't mean it as a pedantic remark or a criticism. Emacs
terminology takes some getting used to. But as you can see from
the replies, what you were really looking for was a way to switch
windows, even though that was not "what [you thought you] were
thinking about".
This stuff is not obvious, and there is no shame in using non
"official" terminology. But learning a bit of the jargon can
really help you find what you're looking for more easily.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: moving between buffers side-by-side using the keyboard
2017-02-15 16:07 ` Drew Adams
@ 2017-02-16 4:44 ` Marcin Borkowski
0 siblings, 0 replies; 14+ messages in thread
From: Marcin Borkowski @ 2017-02-16 4:44 UTC (permalink / raw)
To: Drew Adams; +Cc: Joost Kremers, help-emacs, Filipe Silva, Sharon Kimble
On 2017-02-15, at 17:07, Drew Adams <drew.adams@oracle.com> wrote:
> It _seems_ slow at first. And yes, it's dumb. But it's power is
> exponential - it quickly gets very quick. ;-) Think of the old
> story of doubling the grains of rice on a chessboard. Yes, at
> first it seems like very little rice is involved...
>
> The slowest part of this particular binary search is to restart
> Emacs each time, after you've commented out part of your init
> file. But the more that is commented out, the closer the startup
> becomes to a virgin startup (i.e., `emacs -Q': no init file).
Also, see https://github.com/Malabarba/elisp-bug-hunter for a way to
automate the dumb part.
Best,
--
Marcin Borkowski
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: moving between buffers side-by-side using the keyboard
2017-02-15 13:52 ` Sharon Kimble
2017-02-15 14:04 ` Kaushal Modi
2017-02-15 14:41 ` Drew Adams
@ 2017-02-15 19:47 ` Filipe Silva
2 siblings, 0 replies; 14+ messages in thread
From: Filipe Silva @ 2017-02-15 19:47 UTC (permalink / raw)
To: Sharon Kimble; +Cc: Joost Kremers, help-emacs
Sharon Kimble,
There's a command in emacs called: `describe-key`. So just type:
`M-x describe-key` and then press the chord: `C-x o`. Emacs you tell you to
what it is bound to.
In any case, `C-x o` is just a short cut to the `other-window` function. So
you can type `M-x other-window` and emacs
will switch you to the other window. You can bind the `other-window` to
whatever keybind you like.
Filipe.
On Wed, Feb 15, 2017 at 11:52 AM, Sharon Kimble <boudiccas@skimble.plus.com>
wrote:
> Joost Kremers <joostkremers@fastmail.fm> writes:
>
> > On Wed, Feb 15 2017, Sharon Kimble wrote:
> >> Filipe Silva <filipe.silva@gmail.com> writes:
> >>
> >>> try `C-x o`
> >>
> >> Sorry, that doesn't work but says
> >>
> >> --8<---------------cut here---------------start------------->8---
> >> (wrong-type-argument commandp outline-minor-mode-prefix) in
> command-execute
> >> --8<---------------cut here---------------end--------------->8---
> >
> > Well, then you seemed to have painted yourself in a corner. :-)
> > `C-x o' is the default Emacs key binding to switch windows, so if it's
> used by another package, then
> > either that package is not behaving, or you inadvertently changed its
> default key bindings to
> > something that's already being used.
> >
> > You can still move to the other window by clicking in it with the mouse,
> or by calling `M-x
> > other-window'. If you want to keep the binding of `C-x o' to
> `outline-minor-mode-prefix', you should
> > probably use another package for window switching.
>
> I've found that I'd assigned 'C-x o' to two things in my config file,
> one of which is to 'outline-minor-mode-prefix', so I commented out the
> unused one and restarted emacs.
>
> But it still didn't work, so I searched in my config for
> 'outline-minor-mode-prefix' and found that I'd assigned it twice, so I
> commented out the second instant, and restarted again.
>
> But it still didn't work, so this what I've got it showing as -
>
> --8<---------------cut here---------------start------------->8---
> (global-set-key (kbd "C-x o") 'outline-minor-mode-prefix)
> --8<---------------cut here---------------end--------------->8---
>
> If I comment out that line and restart it shows that 'C-x o' is unassigned.
>
> But if I do 'C-x o' now , it shows
>
> --8<---------------cut here---------------start------------->8---
> (wrong-type-argument commandp outline-minor-mode-prefix) in command-execute
> --8<---------------cut here---------------end--------------->8---
>
> So where do I go from here please?
>
> I don't have windmove or ace-window installed, but I'm quite prepared to
> if it means that I get the required functionality.
>
> Thanks
> Sharon.
> --
> A taste of linux = http://www.sharons.org.uk
> TGmeds = http://www.tgmeds.org.uk
> Debian 8.6, fluxbox 1.3.5-2, emacs 25.1.1.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread