Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Icicles (v.22.0) installed from elpa (package-list-packages)
Emacs version
$ emacs --version
GNU Emacs 24.0.90.1
Output on emacs start
Warning (initialization): An error occurred while loading `/home/exu/.emacs.d/init.el':
Symbol's function definition is void: hexrgb-canonicalize-defined-colors
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
Debug init below:
Link to GIST error dump
You should not get such an error. Sorry for your trouble. The error message is saying that something tried to call function hexrgb-canonicalize-defined-colors but it was never defined. It was not defined no doubt because you do not have file hexrgb.el in your load-path. That's OK, but in that case, it should never be called.
hexrgb.el is an optional file for using Icicles (but it is recommended) -- see optional Icicles libraries.
Follow up by email, if you can -- that's easiest: M-x icicle-send-bug-report. Let me know what Icicles files you have etc. Preferably, test by starting from emacs -Q (no init file). Set debug-on-error to t, add the Icicles files to your load-path, M-x-load-library icicles, etc.
For debugging, use only the source Icicles files (*.el, not byte-compiled, *.elc). Remove any byte-compiled Icicles files from your load-path. Thx -- Drew
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am using the Fish shell (version 3.3.1) on MacOS. Every time I run a command it shows this error multiple times:
error: Unable to open universal variable file '/': Permission denied
The commands still run perfectly, but it's very annoying to see these errors. They are still on the screen even after a clear command.
Fish has a feature where it'll store so called "universal" variables to a file on disk, so they can easily be persisted and shared among open fishes.
This error:
error: Unable to open universal variable file '/': Permission denied
Shows that fish is trying to open the file at "/", the root of the filesystem. This points to a misconfiguration, because "/" isn't a file, by definition. It's a directory.
The file is supposed to be in the config directory, which is at:
$XDG_CONFIG_HOME/fish, if that variable is set
$HOME/.config/fish, if it isn't
I can't find the specific sequence to reproduce this, but it appears that $XDG_CONFIG_HOME or $HOME are set when fish is started (by its parent process, probably the terminal), and to non-functional values.
Was having this same issue after installing using brew install fish.
What finally worked was uninstalling fish.
brew uninstall fish
Then removing fish from my .config folder.
cd ~
rm -rf .config/fish
Then I just installed fish using the fish GUI installer.
Update
Apparently, the auto-complete package is not the culprit.
Emacs fails to download melpa archive.
A quick google search indicates that this is a reappearing problem both on windows and unix machines.
As there are already threads concerning failed to download 'melpa' archive (none of which helped unfortunately) this thread may or may not be closed.
Inital Question
I'm trying to set up emacs for Common Lisp.
I installed sbcl and the slime package.
Some time ago I used to have auto completion for Common Lisp keywords in emacs such that - while typing - it suggested a word via a greyed out completion (TAB for acceptance) or via drop down or both. (I can't remember exactly.)
I'm struggling to get this working again.
At https://github.com/purcell/ac-slime it is suggested to first install auto-complete but when I type package-list-packages there is no such package. (But there are plenty named auto-complete-*).
(I set up Melpa with:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/")))
The provided link http://cx4a.org/software/auto-complete/ is dead as well.M-x install-package [RET] auto-complete [RET] also fails. Emacs says: [No match]
So my question is:
If there is no auto-complete package anymore, what is a good way to set up Common Lisp auto completion in emacs in the way mentioned above (greyed out word or dropdown)?
The current home-page for auto-complete is https://github.com/auto-complete/auto-complete
Installing it should be enough to allow you to use ac-slime (there is also a completion version using company).
Here is how I got it to work.
Download the .ZIP archive with repository here.
Unzip
Run M-x package-install-file
On the prompt, specify the path to the downloaded repository and the file named auto-complete.el.
Make sure that installation returns something along the lines of "Successful"
Add this line to your Emacs initialization file (.emacs):
(ac-config-default)
To auto-complete in SLIME, follow similar step to install ac-slime (requires SLIME and Auto-complete)
P.S. There is another package called company (stands for Complete Anything), which is quite good as an alternative. I am trying it out now. Getting it to work was very simple.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm trying to disable the 'r' and 'o' commands in vim so people who use it can't open other files from within vim.
I tried to use the cmap r <Nop> and cmap o <Nop>, which work but have an undesirable side-effect... those 2 letters can never be used in vim command line nor when searching for something...
If you try to search for the word, "word" the search line displays: /wd.
So is there another way to disable opening files from with vimrc ?
If you really want to secure Vim (and not just provide a superficial appearance of certain disallowed features), you have to remove those features from the source code and compile (and test!) a limited version of Vim. (Or maybe you can use a operating-system wrapper that sandboxes the Vim process and filters certain system calls, but I don't know any such thing.)
Any Vimscript obstruction can be circumvented: Your remappings can be undone via :cunmap, any more elaborate protection in Vimscript can be stopped by pressing <C-c> at the right time.
You can launch Vim with a flag:
$ vim -R (readonly)
$ vim -Z (restricted)
$ vim -m (no writing)
$ vim -M (no text modification)
But none of those will block :e or :r or any of the myriad of similar commands. And… the ~/.vimrc could probably be edited with nano or whatever to remove any eventual command anyway.
What about completely sandboxing Vim or its user?
What about explaining why you would want that?
If you want to allow editing of a specific file with root permissions, without allowing commands or editing of other files (as you've now indicated in a separate comment), why don't you do this as outlined in man 8 sudoedit:
Temporary copies are made of the files to be edited
with the owner set to the invoking user.
The editor specified by the policy is run to edit the
temporary files. The sudoers policy uses the
SUDO_EDITOR, VISUAL and EDITOR environment variables
(in that order). If none of SUDO_EDITOR, VISUAL or
EDITOR are set, the first program listed in the editor
sudoers(5) option is used.
If they have been modified, the temporary files are
copied back to their original location and the
temporary versions are removed.
It is much safer to launch the editor in the user's context, not root context. (Plus, the user get's his Vim settings, not the unmaintained ones from the root account!) Just the sync back of the edited temp file must be done with root priviledges; with the help of sudo, all of this can be implemented in a few lines of shell script.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
When you double click on a file opens a new window emacs. Tell me how to do to open in the same
I beg your pardon, Linux OS
I installed emacs23
Then i run the command:
emacs --daemon &&
emacsclien -c &&
emacsclien -c
And i have opened 2 windows instead of one
You don't provide enough information, such as what OS/windowing system you're using, but the answer involves using emacsclient. The wiki page has all the details of using emacsclient, though not how to set up your OS/windowing system to associate the file types with emacsclient (instead of emacs).
You have a single Emacs instance with two windows. You have two windows because you explicitly asked for them by passing the -c option to emacsclient.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I configure and install emacs but i don't know how to compile a c program.
please give me full info.
Take a look at the following docs containing information on running your compiler from emacs:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Compilation.html
http://www.slac.stanford.edu/comp/unix/gnu-info/emacs_26.html
As already answered the compile command triggers a build which automatically routes errors to a buffer.
M-x compile
The default behavior is to run make in the directory that the file you are editing is in.
make -k
The -k means keep going on errors and make as many targets as you can. You can edit the command line at this stage.
There are two issues you might have with this setup. Firstly if your source file is not in the directory the makefile is in, then you need to set the default directory file variable. You can do this by adding a line like this at the top of the source file.
// -*- mode: C++; default-directory: "c:/somewhere/yourmakefiledirectory/" -*-
Another issue is if you don't want a makefile. This happens if you have a simple program containing one, or only a few, cpp files, and you just want to quickly compile them.
You can do this by setting the compile-command file variable. Now when you run the compile command, this will show up as the default way to build you program, rather than make.
// -*- compile-command: "g++ -lpsapi -mwindows windowsprogram.cpp -g -o windowsprogram.exe"; -*-
Once you've compiled and possibly got some errors you can run the commands next-error and previous-error to move up and down the source file viewing them. I didn't like the default keys, and I tend to use this setup.
(global-set-key [f5] 'compile)
(global-set-key [f7] 'previous-error)
(global-set-key [f8] 'next-error)
More tips like this on my blog.
M-x compile will by default run make. You will need to have the appropriate compiler installed, and a makefile setup to do this, though. Once this is done you can use C-x ` to go to the next error.
There are a couple of ways actually. The simplest is to create a make file and place it in the same directory as your source. Then use M-x(Alt-x) to compile it. The other way is to launch a shell from within emacs using M-x eshell. The third way is to go and write a script using elisp if you are familiar with it.