I was doing something in SLIME, and an error occurred. While trying to select the ABORT restart, I made a typo, and instead of the debugger closing, a new buffer named *slime-source* appeared. It contained a LAMBDA form with the expression I'd typed at the REPL, pretty-printed.
This is potentially useful, but I don't know how I did it. What did I type to make this buffer appear?
Related
When the cursor's positioned in the middle of an argument list (making a method call), is there a way to bring up the method's signature with the parameter that that the cursor is on highlighted? Ctrl-space (sort of) brings up the signature, but it includes the huge search list of everything else I can legally type right there, and it's up to me to count through the arguments and the parameters to figure out which one I'm lined up on. (that popup also disappears if I try to move to the next or previous argument).
I've had this struggle with compiled code, and worse with code as I type it in. I typically type the name of the object, then a dot, and then I wait for the signature list to pop up (that filters down as I type). When I see the signature I'm after, I auto-complete with tab or Enter, and then I always end up in a struggle. NB pastes in variable names that are usually about 99% wrong, and I try to navigate the little red, comma-triggered edit boxes, hoping the signature popup will stay in view while I struggle to edit, delete (and stop thinking about) all the (semantic) errors. I usually end up botching it and loose the precious signature window that highlights each parameter as I moved through the argument list.
Any way to get that thing back (with the parameter highlighting)? And/or make the red editing boxes go away? And/or block NB from populating with all the errors?
Super thankful for any help or tips!
Netbeans show popup with method signatures and popup with method documentation only when your cursor is placed at the name of a method. Popup is displayed automatically when writing method name or on demand if you press Ctrl+Space.
When your cursor is placed at the argument list, only parameter names from method signature are displayed in form of a small tooltip. You can force display of this tooltip by Ctrl+P. Unfortunately there is no way how to invoke popup with method documentation in this phase. Instead you will see documentation popups related to arguments which you will type into the method argument list. The only way to display method documentation again is to place the cursor back at the method name and press Ctrl+Space.
When you start writing a method name, popup with method signatures will emerge. When you select one of proposed method signatures by pressing Enter, Netbeans will autocomplete method name as well as its arguments. You find this uncomfortable, because names of autocompleted arguments are usually wrong. You can however easily navigate between autocompleted arguments using Tab and Shift+Tab and overwrite them as you like. Alternatively, you can use Tab instead of Enter when selecting method from method signatures popup. This way Netbeans will autocomplete only the name of the function, not its arguments.
Described Netbeans behavior applies to editing PHP code, and may differ slightly for other languages.
When I invoke Emacs, I see some error messages which are replaced by the main window (startup screen) pretty soon. How can I access these error messages?
The error messages are stored in the *Messages* buffer. There is a command to open it: C-h e. You can also just click on the echo area in the bottom of the window.
By default, the last 1000 lines of messages are saved. You can change this by setting the variable message-log-max.
How to delete all the error messages in the Backtrace buffer, so that when a new error occurs only the new error will be displayed instead of prepending with the old error.
The backtrace buffer has its own mode with several command shortcuts. I use the 'q' key to kill the buffer and continue on but I'm sure others will work as well.
Here's a list of them: http://www.cs.utah.edu/dept/old/texinfo/emacs18/emacs_26.html#SEC190
I used to be able to open a new buffer in Emacs quickly using the command C-x b <non existent buffer name>
Somehow I've broken this in my version of Emacs (23.1). When ever I try to do this now I get the message [No match] in the command buffer.
Does anyone know what I might have done to break this functionality, or is it possible that I imagined being able to do this?
Set confirm-nonexistent-file-or-buffer to nil:
confirm-nonexistent-file-or-buffer is a variable defined in `files.el'.
Its value is after-completion
Documentation:
Whether confirmation is requested before visiting a new file or buffer.
If nil, confirmation is not requested.
If the value is `after-completion', confirmation is only
requested if the user called `minibuffer-complete' right before
`minibuffer-complete-and-exit'.
Any other non-nil value means to request confirmation.
This affects commands like `switch-to-buffer' and `find-file'.
You can customize this variable.
This variable was introduced, or its default value was changed, in
version 23.1 of Emacs.
If you have enabled ido-mode, you can still switch to the behavior you're familiar with. I do this frequently when I know I'll be creating a new named buffer.
C-x b C-b
You press C-j instead of hitting enter twice, which will bypass the confirmation and immediately open the new buffer. This works with or without ido-mode. This will have the same effect has pressing enter with confirm-nonexistent-file-or-buffer set to nil.
You probably enabled ido-mode. You need to press ENTER to confirm the creation of the buffer.
I'm having a problem with an Emacs lisp package that I pulled down from the ubuntu distribution. The package is JDEE, and it complains of Args out of range: "63", 0, 4 in the mini buffer and the *Messages* buffer whenever I open a file. This bug appears to have been reported last September but no action has been taken. I'm not an emacs newbie, having written some Elisp code myself, but I've never attempted to debug anything like this. I would like to stop the file load in a debugger when this error happens to at least get an idea of where the problem is coming from. I've read section 18.1.1 of the Elisp manual on "Entering the debugger on error" but trying to load the file after playing with various combinations of values for debug-on-error, debug-ignored-errors, and debug-on-signal appears to have no effect. Has anybody got any suggestions for my next step?
If debug-on-error isn't working, I'd start with the source itself. Find the keybinding/event that is causing the problem, and locate the function.
C-h k <keystrokes>
M-x find-function <function-name-from-above>
Now, once you are at the source
M-x edebug-defun
And the next time you hit the key, you should be able to step through the program. At that point, you can see which portion causes an error - and drill down that way.
You can also try setting the variable 'stack-trace-on-error to see if you can find the culprit (though 'debug-on-error usually works for me, not sure why it doesn't for you).
As a last resort (if edebug-defun doesn't work), you can redefine the routine with a call to (debug) in it, sort of does the same.
I suppose JDEE is somehow inhibiting debug-on-error. Perhaps grep through its files for the error message "Args out of range". While debugging, make sure to load the uncompiled .el files, not the byte-compiled .elc files (you will notice it in the debugger if you are running byte-compiled code) by entering commands like (load "foo.el") instead of (load "foo").
I got the same error when using find-grep after accidentally redefining (current-time-string) in one of my own scripts.
Using the M-x edebug-defun tip posted above I managed to find the issue when I stepped through the code giving the error seeing the call to (current-time-string).
Not sure how helpful this is in your case.