0

Emacs Manual says that C-M-l is to Scroll heuristically to bring useful information onto the screen (reposition-window).

When I type C-M-l in Ubuntu, Emacs 27.1, the OS is automatically locking the screen.

Which alternative keybinding could I use to call the reposition-window command?

7
  • 3
    I don't think this is related to Emacs. Provided you are using Ubuntu with GNOME, you could use Keyboard Shortcuts to change the lock screen key binding to something else and free it for Emacs. Oct 7, 2020 at 14:01
  • 2
    Your DE is intercepting that key chord - emacs never sees it. So you need to modify the settings of your DE.
    – NickD
    Oct 7, 2020 at 14:51
  • 1
    You almost answered your own question by quoting the documentation: as it says, the command normally called by C-M-l is reposition-window, and therefore you can use M-x reposition-window to call it. You can also ask Emacs which keys are bound to that command with either C-h w reposition-window or C-h f reposition-window. By default no other keys are bound; but of course you can add your own custom keybindings for any command.
    – phils
    Oct 8, 2020 at 3:00
  • 1
    n.b. If you use Emacs a lot, you probably will want to disable a lot of your window manager's key bindings -- they often interfere a lot. I recommend disabling anything you don't care about, and changing anything which you do want to use that conflicts with something useful in Emacs (or certainly with things in Emacs that you have pre-existing muscle-memory for).
    – phils
    Oct 8, 2020 at 3:05
  • 2
    @phils: Indeed, the latest change almost includes the answer in the question. The only missing detail, I think is to point out that you can replace the M- modifier with the ESC prefix key, so you can type ESC C-l to run whichever command is bound to M-C-l.
    – Stefan
    Oct 8, 2020 at 3:48

1 Answer 1

1

I accept the coments of @phils and @Stefan.

We have to use ESC,if we are finding problem combination C-M-*.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.