Using edebug for elisp fails on can't find library - emacs

Trying to use edebug to work on an emacs lisp library. I can effectively set breakpoints and break on them when I run the defun, unfortunately when I use i to step into something, I get the error:
Can't find library /usr/share/emacs/23.3/lisp/emacs-lisp/cl-macs.el
It's not lying, that library doesn't exist, only the compiled version (.elc) exists. It was installed using:
apt-get install emacs23-nox
Any ideas on how to get it going?

On a Debian-derived distro, the bare emacs23 package does not include the Elisp sources (nor any documentation, etc). To install them, sudo apt-get install emacs23-el

Related

Raku: Installation of Gnome::Gtk3 on Windows

I am trying to install the Raku module «Gnome::Gtk3» module on a Windows pc, without success.
Powershell> zef install Gnome::Gtk3
This fails with a lot of "Cannot locate native library"-messages.
I have installed Raku with choco, along with git. And have fixed the path.
That alone took quite some time to figure out, due to missing documentation.
I have installed Gtk, as described here: https://www.gtk.org/docs/installations/windows
But Raku is unable to locate the libraries. Is this something that can work, or do
I have to use the Windows Subsystem for Linux?
(I am aware of the «GTK::Simple» module, but cannot use that as a replacement as it lacks support for keyboard interrupts - which I need.
I have installed it, as it states that it installs the GTK dll's as well.)
In order to make this kind of modules work, you need the -dev version of the library, that is, the DLLs which are actually the ones that NativeCall uses. This tutorial shows how to set them up for C++ and Python, Raku shouldn't be too different.
This now installs on MSYS2, Windows 10. First download the latest version of rakudo from here and extract the zip file to e.g. C:\rakudo-2020.11. Then install MSYS2, and when finished open the MSYS2 terminal window and install the following packages:
$ pacman -Syu
$ pacman -S base-devel gcc git libcrypt-devel libreadline
$ pacman -S mingw-w64-x86_64-gtk3
$ pacman -S mingw-w64-x86_64-toolchain
Then add the following to the MSYS2 ~/.bashrc configuration file:
export PKG_CONFIG_PATH=/mingw64/lib/pkgconfig
export PATH="$PATH:/c/rakudo-2020.11/bin:/c/rakudo-2020.11/share/perl6/site/bin"
export PATH="$PATH:/mingw64/bin"
Save the updated .bashrc and reload it from the MSYS2 terminal prompt:
$ source ~/.bashrc
Finally, install Gnome::Gtk3:
$ zef install Gnome::Gtk3

How do I put emacs menubar into Window title bar in Ubuntu 14.04?

While using Ubuntu 14.04, Menus are shown in window title bar. However if emacs is opened, menus are in the menubar as in older versions of Ubuntu or windows. Can I menus in window title bar.
This isn't a setting that you can flip in Emacs; it's something that is defined by the version of GTK against which Emacs is compiled (if any), likely some compile-time settings, and your Ubuntu settings. You could compile your own Emacs to enable this, but using a Personal Package Archive to install a pre-built version is much easier.
This PPA provides an emacs-snapshot package that works the way you want. This package is a bleeding-edge build of Emacs, updated frequently, and with some differences from the official Ubuntu emacs package. Most notably:
Little/no support for installing debian packages of elisp modules. Much of that support exists only in the form of a distropatch, which is not included here. So for example if you were to apt-get install yaml-mode, you would have to include "(require 'yaml-mode)" in your init, but you wouldn't be able to autoload yaml-mode like you may be accustomed to with the stable series. I am working on enabling this, but be warned that it is currently broken.
On the plus side, package.el works excellently and most of the packages you might want to install should be available either from MELPA or Marmalade or similar. In general, if you are using these snapshots you will want to M-x package-install foo rather than apt-get install foo.
If you want to use it, you can do something like this:
sudo add-apt-repository ppa:ubuntu-elisp/ppa
sudo apt-get update
sudo apt-get install emacs-snapshot
You should be able to have both versions installed concurrently. The one that launches by default when you run emacs will depend on your alternatives. You will also have commands named for each version in case you want to switch back and forth, e.g. emacs-24.4.50.
And if you want to just run the snapshot, that works well too. It's generally pretty stable.

Installing with PIP in virtualenv?

I'm trying to wrap my head around virtualenv and pip still.
If I use pip to install a library, it doesn't matter where I 'cd' to, because it installs the libraries in the same place right (which i dont even know where that is)? So I guess my question is, when I install something with pip, how do I make sure it only installs that library inside of my virtual environment? Do I need to cd to that directory first? or is there a command I'm supposed to use with pip to make sure it only installs to the virtualenv project I'm working in?
Activate virtualenv first:
source virt_name/bin/activate
Then after that, install the libraries:
pip install module_name
Note: Don't use sudo with pip because sometimes it will assume you want to install in /usr/local/lib/site-packages.
Generally speaking, if you do not use virtualenv --system-site-packages to create your virtualenv, you should be only working with your per-environment packages.
Providing you run the activate script before installing anything.
i.e. Do the following, if you want to install something in your virtualenv.
Run activate script
Windows: [ve_directory]\Script\activate.bat
Linux: source [ve_directory]/bin/activate
pip install [your requirements]
I think it doesn't matter where your current working directory is.
Reference:
http://www.virtualenv.org/en/latest/#the-system-site-packages-option
When you create a new environment with virtualenv, among other things it creates a bash script venv/bin/activate (where venv is the folder you specified when you created the environment; libraries are located there as well, by the way). When you run it in your shell the environment variables become arranged so that pip installs new libraries in this environment's folder. See virtualenv docs for details, section "activate script".

SBCL installation in linux

How to install sbcl in os linux for a freshman of lisp.
I found just use the command
sh install.sh
the error info is:
src/runtime/sbcl not found, aborting installation
If you are using the Debian or Ubuntu distributions, you can install SBCL from their repositories: just type sudo apt-get install sbcl.
What flavor of linux?
If you use a popular distribution, e.g., debian, ubuntu, fedora, &c, then sbcl comes prepackaged: aptitude install sbcl or yum install sbcl.
As it says on SBCL's download page, if you have git access, you can run the command git clone git://git.code.sf.net/p/sbcl/sbcl to get the development version to compile from.
To get the binary alone, you may use the following commands depending on your CPU architecture:
x86
wget --trust-server-name http://downloads.sourceforge.net/project/sbcl/sbcl/1.0.58/sbcl-1.0.58-x86-linux-binary.tar.bz2?r=http%3A%2F%2Fwww.sbcl.org%2Fplatform-table.html&ts=1374541378&use_mirror=hivelocity
AMD64 (Note that this is a newer version)
wget --trust-server-name http://downloads.sourceforge.net/project/sbcl/sbcl/1.1.9/sbcl-1.1.9-x86-64-linux-binary.tar.bz2?r=http%3A%2F%2Fwww.sbcl.org%2Fplatform-table.html&ts=1374541416&use_mirror=iweb
in file which include to archive with sources and named INSTALL we see next text:
end of section 2.1
...
Now you should have the same src/runtime/sbcl and output/sbcl.core
files that come with the binary distribution, and you can install
them as described in the section 1. "BINARY DISTRIBUTION".
the way for you are next:
download sbcl sources using any convenient way for you.
run shell terminal (may be window) and go to the sources archive path
$ cd /path/to/sbcl-sources.tar.bz2
$ tar -xjvf sbcl*.tar.bz2
$ cd sbcl [TAB COMPLETE AND ENTER]
$ emacs INSTALL
now you will see INSTALL file, which contains installation notes. As we will see in 2.1 section
To build SBCL you need a working toolchain and a Common Lisp system
(see section 2.5 "Supported platforms").
You also need approximately 128 Mb of free RAM+swap.
To build SBCL using alredy installed SBCL run
$sh make.sh # may be need execute rights. run 'chmod +x make.sh' and try again
and go next according instruction.
If you don't have existing sbcl instruction said next:
If you don't already have an SBCL binary installed as "sbcl" on your
system, you'll need to tell make.sh what Lisp to use as the
cross-compilation host. For example, to use CMUCL (assuming has
been installed under its default name "lisp") as the
cross-compilation host:
$ sh make.sh --xc-host='lisp -batch -noinit'
assuming supported lisp platforms see 2.5 section. Generally, if you attentively read INSTALL file you will able to do it easy and quickly. Have fun and happy new year.
install the binary first
http://sourceforge.net/projects/sbcl/files/sbcl/1.2.7/sbcl-1.2.7
then install the latest version
http://sourceforge.net/projects/sbcl/files/sbcl/1.2.16/sbcl-1.2.16-source.tar.bz2/download?use_mirror=iweb&download=

Where is mongoctl after installation?

I've installed mongoctl according to Mongolab's simple instructions, but I can't do anything with the installed package because which mongoctl resolves to nothing.
The site makes it look like pip installs some kind of command line tool, but it seems like it just installs the python package, which would be fine if all of the documentation didn't treat mongoctl as a command line tool.
What's going on?
You can add the following option to your install command to ensure that "mongoctl" exe goes to /usr/local/bin
--install-option="--install-scripts=/usr/local/bin"
Since mongoctl is already installed on your mac, you will probably need to add a --upgrade and a --force-reinstall
So try the following
sudo pip install mongoctl --install-option="--install-scripts=/usr/local/bin" --upgrade --force-reinstall
What OS are you using?
'mongoctl' should be in /usr/local/bin. Check to make sure that directory is in your PATH
-will