Say I input SPC f, then I decide not to do anything, is there any way I can quit the "leader" mode? Currently I just type ESC, but it does not seem to be the legit way of doing this.
I think the best way to do this is C-g which, according to the manual, is for cancelling a "running or partially typed command". It's not too different from spamming escape, but it seems to save a keystroke in the SPC f scenario.
Hope that helps!
Related
When using typeclasses, Coq sometimes diverges. When this happens under Proof General, Emacs also hangs.
The best way I know to recover is to interrupt emacs (C-g) and restart Coq (C-c C-x). But, instead of just killing the Coq process, this puts me in a mode where Emacs is again hung, displaying "Retracting buffer..." for a quite long time (sometimes so long that I give up and just start a whole new emacs!).
Why?
Is there a better way? (And: Is there an easy first step for viewing what is diverging in the first place when this happens?)
If emacs is hung on anything other than garbage collection, you can generally interrupt it with C-g. If C-c C-x / C-c C-c don't work, you can kill the coqtop process from process manager / from the command line with pkill coqtop.
This happens because coqtop has some loops where it does not check for interrupt, or does not check often enough, and so it does not catch the interrupt from PG in a timely manner.
Additionally, as mentioned in other answers, Set Typeclasses Debug will give you a very verbose log of typeclass resolution in the *response* and *coq* buffers.
I don't know if this actually does anything, but sometimes I find that Proof General interrupts Coq if I press C-c C-c a few times.
As for your second question, you can add Set Typeclasses Debug. to your script before invoking the problematic line. Then Coq will print a trace of its instance search in the *response* buffer in Emacs. If your script is looping, make sure you hit C-c C-c right after triggering the loop, as the trace can get very long quite fast
For the last bit, I reminded myself of
Set Typeclasses Debug.
Strange: I'm not actually sure any more whether emacs is stuck at the end or whether it's a display bug: it seems that if I switch to another screen and then switch back I find the coq exited message that I expect, right away.
So, according to the Emacs manual, you can create inactive timestamps of the form [1970-01-01 Thu] by hitting C-c !.
However, doing so will result in my minibuffer displaying C-c !- waiting for further input. Hitting space or return doesn't work and just results in an error saying C-c !-RET isn't a valid command.
What exactly happened here? Is the command simply not defined by default? I'm fairly certain I don't have anything defined that globally overrides this, but I could be wrong.
If you type C-c ! <f1> you'll see a list of all keybindings that start with C-c !. Does that help?
I don't think there's a timestamp function bound to C-c ! by default, but there are plenty of results if you Google "Emacs timestamp".
I am using emacs and the auto-newline feature is not working as expected. I have a pretty large number of customizations done to my emacs. So it would be no wonder if one of the other customizations is not what auto-line is expecting. I would like to know if there is a way to know the list of commands (list of emacs commands) executed by emacs at a particular point, for e.g. when ctrl-s ctrl-c or in my case when auto-line feature is called.
edit : I think you have misunderstood the question. I would like to know what command emacs calls 'internally'.
I believe view-lossage is what you're looking for -- M-x view-lossage, or C-h l.
If you want to know what a keystroke is bound to, consider using describe-key, which is usually bound to C-h k.
Basically at this point, you need to bite the bullet and learn some Emacs-lisp. The debugger is what you are looking for to dig further into your problem (I use edebug). It's not just about seeing what functions get called, you also need to see the values of the relevant variables when those functions are called.
If you feel you're not up to it, then you can bi-sect your init file until you find the culprit, but at that point you still need some Emacs-lisp to investigate further.
To add to what #event_jr said --
What you seem to be asking is the history of the functions called by the command you last invoked. (You speak of Emacs "internal commands", but it seems you just mean functions.)
To get that history for any given command you invoke (e.g., by a key), use M-x debug-on-entry and then enter the command name. The next time you use that command, you can walk through its execution in the Emacs debugger (hit d to step, c to continue past a step).
I am running Emacs on a unix server, which I access using PuTTY. Occasionally, I accidentally type some combination of keystrokes that causes all future input to be interpreted as a period. I'm pretty sure this always starts when I'm in Emacs, but it continues after exiting (ctrl-xc still works), so if I exit and try to enter something at the prompt it just looks like "....".
I have no idea what I'm doing that causes this. Any ideas?
I agree with phils comment to the question. But In emacs whenever you like to see what you have just pressed, There is a C-h l which gives you the history of keystrokes
I'm studing lisp and I found this: (zoom in)^C ^C , but the text don't explain it, and I searched "^C ^C" in other places but didn't found anything. Can someone here help-me?
(I'm studying english yet, sorry if I wrote anything wrong)
"^C^C" is not AutoLisp; that would be for/is the macro language for menus and such.
Caret-C does "mean" CTRL-C.
What it does in the macro language:
^c means: cancel
^c^c means: cancel twice.
In AutoCAD we hit the ESC key (twice to cancel a command). The ^C^C is "good practice". -i.e. Before we issue or start a new command we cancel any current command.
The equivalent in AutoLisp would be:
(command) (command)
or
(repeat 2 (command))
I think they refer to the control-character ctrl-c you enter after entering (zoom in) in the REPL.
As others have said, most likely it means Ctrl+C, especially if you're using emacs, where two Ctrl+C presses (usually written "C-c C-c" in the emacs convention, though) means "run this using the default interpreter" in some language modes.
If I'm not mistaken, ^C usually represents the "Ctrl+C" modified keypress.
It won't work in a console on Windows, as Ctrl+C also means "break (execution)", but if you press Ctrl+V, Ctrl+P, etc., you'll see what I mean.