I used to always see the good menus created by SLIME, such as "Lisp" and "SLIME".
These days, I usually see the SLIME-originated menus on the Emacs menu bar ("Lisp", "Presentations" and "SLIME", "REPL") -- but all of them are usually empty.
Not always:
* Yesterday, after picking up Helmut's changes, I saw the menu items in these menus.
* In one instance of Emacs now, I can see only items in the "Lisp" menu.
* In another instance of Emacs, all these menus are empty.
What drives building these menus? Is there a variable to tweak?
Separately, FYI, these are the warnings I get compiling the freshest SLIME:
In slime-complete-maybe-restore-window-configuration: slime.el:3620:20:Warning: `last-command-char' is an obsolete variable (as of Emacs at least 19.34); use `last-command-event' instead.
slime.el:4717:20:Warning: `next-line' used from Lisp code That command is designed for interactive use only
slime.el:4718:20:Warning: `previous-line' used from Lisp code That command is designed for interactive use only
In slime-next-line/not-add-newlines: slime.el:4730:10:Warning: `next-line' used from Lisp code That command is designed for interactive use only
-- Alex -- alex-goncharov@comcast.net --
Alex Goncharov alex-goncharov@comcast.net writes:
I used to always see the good menus created by SLIME, such as "Lisp" and "SLIME".
These days, I usually see the SLIME-originated menus on the Emacs menu bar ("Lisp", "Presentations" and "SLIME", "REPL") -- but all of them are usually empty.
Not always:
Yesterday, after picking up Helmut's changes, I saw the menu items in these menus.
In one instance of Emacs now, I can see only items in the "Lisp" menu.
In another instance of Emacs, all these menus are empty.
What drives building these menus? Is there a variable to tweak?
Separately, FYI, these are the warnings I get compiling the freshest SLIME:
In slime-complete-maybe-restore-window-configuration: slime.el:3620:20:Warning: `last-command-char' is an obsolete variable (as of Emacs at least 19.34); use `last-command-event' instead. slime.el:4717:20:Warning: `next-line' used from Lisp code That command is designed for interactive use only slime.el:4718:20:Warning: `previous-line' used from Lisp code That command is designed for interactive use only In slime-next-line/not-add-newlines: slime.el:4730:10:Warning: `next-line' used from Lisp code That command is designed for interactive use only
Are menus empty when you're not compiling Slime?
,--- You/Stas (Thu, 15 Apr 2010 18:56:03 +0400) ----* | Are menus empty when you're not compiling Slime?
Can you please clarify your question?
-- Alex -- alex-goncharov@comcast.net --
Alex Goncharov alex-goncharov@comcast.net writes:
,--- You/Stas (Thu, 15 Apr 2010 18:56:03 +0400) ----* | Are menus empty when you're not compiling Slime?
Can you please clarify your question?
-- Alex -- alex-goncharov@comcast.net --
Are they empty when .el files of Slime are compiled with the emacs byte compiler?
,--- You/Stas (Thu, 15 Apr 2010 19:05:10 +0400) ----* | Alex Goncharov alex-goncharov@comcast.net writes: | > ,--- You/Stas (Thu, 15 Apr 2010 18:56:03 +0400) ----* | > | Are menus empty when you're not compiling Slime? | > Can you please clarify your question? | Are they empty when .el files of Slime are compiled with the emacs byte | compiler?
I always compile SLIME's .el files with Emacs byte compiler.
But let's check:
------------------------------ ls -lrt *.el *.elc | sed 's/([^[:space:]]*[[:space:]]*){3}[^[:space:]]*//' => 1248 Jun 15 2009 slime-autoloads.el 75309 Mar 1 12:46 hyperspec.el 346965 Apr 15 10:43 slime.el 393873 Apr 15 10:44 slime.elc
emacs & ;; slime-mode => Menus: Up to Tools -- full Lisp -- empty Presentation -- empty SLIME -- empty Help -- full
---------------------------------------- -- Alex -- alex-goncharov@comcast.net --
Separately, FYI, these are the warnings I get compiling the freshest SLIME:
In slime-complete-maybe-restore-window-configuration: slime.el:3620:20:Warning: `last-command-char' is an obsolete variable (as of Emacs at least 19.34); use `last-command-event' instead. slime.el:4717:20:Warning: `next-line' used from Lisp code That command is designed for interactive use only slime.el:4718:20:Warning: `previous-line' used from Lisp code That command is designed for interactive use only
This has been brought up in the past. See:
http://article.gmane.org/gmane.lisp.slime.devel/9508
and
http://article.gmane.org/gmane.lisp.slime.devel/9509
Unfortunately for the SLIME developers, this could be a recurring message as new users come to SLIME and notice the warnings.
,--- You/Mark (Thu, 15 Apr 2010 12:24:25 -0400) ----* | > Separately, FYI, these are the warnings I get compiling the freshest | > slime.el:4717:20:Warning: `next-line' used from Lisp code | > That command is designed for interactive use only | | http://article.gmane.org/gmane.lisp.slime.devel/9508 | http://article.gmane.org/gmane.lisp.slime.devel/9509 | | Unfortunately for the SLIME developers, this could be a recurring | message as new users come to SLIME and notice the warnings.
Thanks, I'll take a look later.
What's the process of fixing such things? If I happen to be able to fix this, send a patch to this list?
-- Alex -- alex-goncharov@comcast.net --
Thanks, I'll take a look later.
What's the process of fixing such things? If I happen to be able to fix this, send a patch to this list?
Yes, send a patch to the list and if the developers (who know the code better than the general user community) accept it, they will commit the change to the CVS repository and announce the change in a Daily Changelog Diff email message to the list.
Regarding your problem with menus, I have not seen this problem. I am not using CMUCL, but it sounds as though it should be independent of the Lisp used. I think that what Stas Boukarev is suggesting is that you attempt to reproduce the problem using non-compiled .el files, that is, delete your .elc files and restart Emacs.
Another step that you might try would be to minimize your SLIME configuration and attempt to reproduce the problem. For example, put your SLIME initialization code in a separate file, say, ~/.emacs.d/your-slime-init.el, and then start Emacs with:
emacs -Q --load ~/.emacs.d/your-slime-init.el
If the problem is still occurring then mail a copy of your initialization code to this list. It should then be reproducible by other SLIME users.
,--- You/Mark (Thu, 15 Apr 2010 12:48:39 -0400) ----* | Regarding your problem with menus, I have not seen this problem. I am | not using CMUCL, but it sounds as though it should be independent of | the Lisp used. I think that what Stas Boukarev is suggesting is that | you attempt to reproduce the problem using non-compiled .el files, | that is, delete your .elc files and restart Emacs.
Ah, now I understand!..
| emacs -Q --load ~/.emacs.d/your-slime-init.el | | If the problem is still occurring then mail a copy of your | initialization code to this list. It should then be reproducible by | other SLIME users.
I'll do this tonight or in that proximity.
Thanks for your help!
-- Alex -- alex-goncharov@comcast.net --
,--- I/Alex (Thu, 15 Apr 2010 13:07:04 -0400) ----* | | emacs -Q --load ~/.emacs.d/your-slime-init.el | | | | If the problem is still occurring then mail a copy of your | | initialization code to this list. It should then be reproducible by | | other SLIME users. | I'll do this tonight or in that proximity.
With this minimal .el, the problem exists for me (an empty SLIME menu):
-------------------------------------------------- (defun my-load-slime () (interactive) (unless (featurep 'slime) (dolist (dir '("/app/lisp/slime/contrib" "/app/lisp/slime")) (add-to-list 'load-path dir)) (require 'slime)) ;; (slime-setup '(slime-fancy slime-autodoc)) ;; this line doesn't make a difference for menu )
(defun my-start-slime () (interactive) (let ((buf (current-buffer))) (my-load-slime)
(let ((cmucl-coding-system 'utf-8-unix)) (setq slime-lisp-implementations (list (list 'cmucl (list (concat (getenv "CMUCL_HOME") "/bin/lisp")) :coding-system cmucl-coding-system)) slime-net-coding-system cmucl-coding-system))
(slime) (slime-define-keys slime-prefix-map ("\C-z" 'slime-switch-to-output-buffer) ("\M-p" 'slime-repl-set-package)) (pop-to-buffer buf) (slime-mode))) --------------------------------------------------
-- Alex -- alex-goncharov@comcast.net --
,--- I/Alex (Thu, 15 Apr 2010 12:29:50 -0400) ----* | ,--- You/Mark (Thu, 15 Apr 2010 12:24:25 -0400) ----* | | > Separately, FYI, these are the warnings I get compiling the freshest | | > slime.el:4717:20:Warning: `next-line' used from Lisp code | | > That command is designed for interactive use only | | | | http://article.gmane.org/gmane.lisp.slime.devel/9508 | | http://article.gmane.org/gmane.lisp.slime.devel/9509 | | | | Unfortunately for the SLIME developers, this could be a recurring | | message as new users come to SLIME and notice the warnings. | | What's the process of fixing such things? If I happen to be able to | fix this, send a patch to this list? | `-------------------------------------------------*
Index: slime.el ===================================================================
RCS file: /project/slime/cvsroot/slime/slime.el,v retrieving revision 1.1300 diff -u -p -w -r1.1300 slime.el --- slime.el 14 Apr 2010 17:51:47 -0000 1.1300 +++ slime.el 15 Apr 2010 23:47:40 -0000 @@ -3611,13 +3611,19 @@ Return true if the configuration was sav (when (buffer-live-p slime-completions-buffer-name) (kill-buffer slime-completions-buffer-name))))))
+(defmacro slime-is-last-char-in-set (string) + (if (boundp 'last-command-event) + `(find last-command-event ,string) + `(find last-command-char ,string))) + (defun slime-complete-maybe-restore-window-configuration () "Restore the window configuration, if the following command terminates a current completion." (remove-hook 'pre-command-hook 'slime-complete-maybe-restore-window-configuration) + (condition-case err - (cond ((find last-command-char "()"'`,# \r\n:") + (cond ((slime-is-last-char-in-set "()"'`,# \r\n:") (slime-complete-restore-window-configuration)) ((not (slime-completion-window-active-p)) (slime-complete-forget-window-configuration)) @@ -4710,12 +4716,24 @@ The most important commands: (setq delayed-mode-hooks nil) (slime-mode -1))
+(with-no-warnings + (defun slime-next-line () + (interactive) + (next-line)) + (defun slime-previous-line () + (interactive) + (previous-line)) + (defun slime-next-line/not-add-newlines () + (interactive) + (let ((next-line-add-newlines nil)) + (next-line 1)))) + (slime-define-keys slime-xref-mode-map ((kbd "RET") 'slime-goto-xref) ((kbd "SPC") 'slime-goto-xref) ("v" 'slime-show-xref) - ("n" (lambda () (interactive) (next-line))) - ("p" (lambda () (interactive) (previous-line))) + ("n" 'slime-next-line) + ("p" 'slime-previous-line) ("\C-c\C-c" 'slime-recompile-xref) ("\C-c\C-k" 'slime-recompile-all-xrefs) ("\M-," 'slime-xref-retract) @@ -4725,11 +4743,6 @@ The most important commands: ([down] 'slime-xref-next-line) ([up] 'slime-xref-prev-line))
-(defun slime-next-line/not-add-newlines () - (interactive) - (let ((next-line-add-newlines nil)) - (next-line 1))) - ;;;;; XREF results buffer and window management
-- Alex -- alex-goncharov@comcast.net --
| | emacs -Q --load ~/.emacs.d/your-slime-init.el | | | | If the problem is still occurring then mail a copy of your | | initialization code to this list. It should then be reproducible
by
| | other SLIME users. | I'll do this tonight or in that proximity.
With this minimal .el, the problem exists for me (an empty SLIME menu):
(defun my-load-slime () (interactive) (unless (featurep 'slime) (dolist (dir '("/app/lisp/slime/contrib" "/app/lisp/slime")) (add-to-list 'load-path dir)) (require 'slime)) ;; (slime-setup '(slime-fancy slime-autodoc)) ;; this line doesn't
make a
difference for menu )
(defun my-start-slime () (interactive) (let ((buf (current-buffer))) (my-load-slime)
(let ((cmucl-coding-system 'utf-8-unix)) (setq slime-lisp-implementations (list (list 'cmucl (list
(concat (getenv
"CMUCL_HOME") "/bin/lisp")) :coding-system cmucl-coding-system)) slime-net-coding-system cmucl-coding-system))
(slime) (slime-define-keys slime-prefix-map ("\C-z" 'slime-switch-to-output-buffer) ("\M-p" 'slime-repl-set-package)) (pop-to-buffer buf)
(slime-mode)))
I installed your initialization code (modified for my `load-path' and Lisp implementation) and started it with Emacs 23.1 and the latest revisions of SLIME's files in its CVS repository, and started Emacs with
emacs -Q --load your-slime-init.el
I did not see the problems that you are seeing with menus.
Some things to try:
- Be sure that you're specifying '-Q' or '--quick' to Emacs to eliminate the possibility that some other Emacs-Lisp code is interfering with your initialization code, above.
- Delete all compiled Emacs-Lisp files (*.elc) in your SLIME directory tree.
- Check the *Messages* buffer for any error messages that might provide some information about why SLIME is not working.
,--- You/Mark (Sat, 17 Apr 2010 01:14:42 -0400) ----* | > With this minimal .el, the problem exists for me (an empty SLIME | > menu):
| I installed your initialization code (modified for my `load-path' and | Lisp implementation) and started it with Emacs 23.1 and the latest | revisions of SLIME's files in its CVS repository, and started Emacs | with
Thanks for trying it all!
| emacs -Q --load your-slime-init.el | | I did not see the problems that you are seeing with menus. | | Some things to try: | | - Be sure that you're specifying '-Q' or '--quick' to Emacs to | eliminate the possibility that some other Emacs-Lisp code is | interfering with your initialization code, above.
It was with -Q.
| - Delete all compiled Emacs-Lisp files (*.elc) in your SLIME directory | tree.
I had deleted "them" (in fact there was only one: slime.elc -- i.e. I deleted that file.)
| - Check the *Messages* buffer for any error messages that might | provide some information about why SLIME is not working.
Did check that and other buffers -- no messages to talk about.
Why your run may be different from mine:
1. I am on FreeBSD.
2. I use Emacs built from the source.
Now, with your experience reported, I just tried another Emacs mode, SQL, and found that it also adds empty menus for me now (it was not the case in the past.)
Never mind then; I hoped to hear a simple tip on a variable or method in SLIME code that adds menus, from people well familiar with the code, but I will just explore this on my own.
Thank you again for your help!
-- Alex -- alex-goncharov@comcast.net --