Discussion:
Changing M-<right,left> to C-<right,left>
(too old to reply)
AndreLTR
2013-08-14 20:49:02 UTC
Permalink
Hello,

I tried to change the word moving behaviour as shown in the post title and could not. Part of my .emacs is below.

(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "C-<right>") 'forward-word)
(global-set-key (kbd "C-<left>") 'backward-word)

Finally, how could I open a new buffer proportionally in the same window? For instance, if I open a new buffer with C-x 2 and then open the new buffer the window is split in two equal halves. I'd prefer to have it 70%, 30%.

TIA,

Andre Luiz
Michael Heerdegen
2013-08-15 12:38:19 UTC
Permalink
Post by AndreLTR
Hello,
I tried to change the word moving behaviour as shown in the post title
and could not. Part of my .emacs is below.
(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "C-<right>") 'forward-word)
(global-set-key (kbd "C-<left>") 'backward-word)
Works for me. Seems the code is not evaluated at all for you, dunno
why, presumably something is wrong with your init file.
Post by AndreLTR
Finally, how could I open a new buffer proportionally in the same
window? For instance, if I open a new buffer with C-x 2 and then open
the new buffer the window is split in two equal halves. I'd prefer to
have it 70%, 30%.
You can use the prefix arg of `split-window-below' to specify window
heights in lines, see the doc string. Is that acceptable?


Regards,

Michael.
AndreLTR
2013-08-15 18:45:08 UTC
Permalink
Post by AndreLTR
Hello,
I tried to change the word moving behaviour as shown in the post title and could not. Part of my .emacs is below.
(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "C-<right>") 'forward-word)
(global-set-key (kbd "C-<left>") 'backward-word)
Finally, how could I open a new buffer proportionally in the same window? For instance, if I open a new buffer with C-x 2 and then open the new buffer the window is split in two equal halves. I'd prefer to have it 70%, 30%.
TIA,
Andre Luiz
Hello,

First problem solved! Now, for the second one I write (setq split-window-below -5) in my .emacs to no avail. How to solve it?

TIA,

Andre Luiz
Michael Heerdegen
2013-08-16 11:21:32 UTC
Permalink
Post by AndreLTR
Now, for the second one I write (setq split-window-below -5) in my
.emacs to no avail. How to solve it?
`split-window-below' is a command - you can't assign it a value.

What I suggested was using the prefix arg when calling the command,
i.e.,

M-- M-2 C-x 2

or

C-u - 2 C-x 2

Please read the manual if you don't know the prefix argument yet.

BTW, there is no setting that would make using the prefix arg obsolete.
You would have to define your own command.

Michael.

Loading...