Can't run emacs as daemon - emacs

Trying to run
>emacs --daemon
in a shell produces
Warning: due to a long standing Gtk+ bug
http://bugzilla.gnome.org/show_bug.cgi?id=85715
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
Loading /home/me/.emacs.d/customizations/navigation.el (source)...
Loading /home/me/.emacs.d/.recentf...
Loading /home/me/.emacs.d/.recentf...done
Cleaning up the recentf list...
Loading /home/me/.emacs.d/customizations/navigation.el (source)...done
Loading /home/me/.emacs.d/customizations/ui.el (source)...
Backtrace:
emacs[0x505e79]
emacs[0x4ed4cc]
emacs[0x504b2e]
emacs[0x504ce3]
emacs[0x504d6f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfc90)[0x7f1ba0acac90]
emacs[0x44cd4e]
emacs[0x471ad2]
emacs[0x55f137]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x55f3fa]
emacs[0x566333]
emacs[0x566592]
emacs[0x55f137]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x55ef53]
emacs[0x5939c3]
emacs[0x560148]
emacs[0x55e3e6]
emacs[0x58219a]
emacs[0x5824a9]
emacs[0x55f0fb]
emacs[0x5939c3]
emacs[0x55eb92]
emacs[0x55ef53]
emacs[0x55f309]
emacs[0x582a73]
emacs[0x55e607]
emacs[0x58219a]
emacs[0x5824a9]
emacs[0x55f0fb]
emacs[0x5939c3]
emacs[0x55eb92]
emacs[0x55ef53]
...
Error: server did not start correctly
Similar happens when I go with
> emacsclient -c -a ""
Starting emacs the normal way, I can do
M-x (server-start)
but I don't think it's actually working, because running
(defun --running-as-server ()
"Returns true if `server-start' has been called."
(condition-case nil
(and (boundp 'server-process)
(memq (process-status server-process)
'(connect listen open run)))
(error)))
in ielm gives only
(listen open run)
back instead of T or nil, and running
ELISP> (daemonp)
gives back nil. My version of Emacs is GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2) on Ubuntu 14.10. How can I get Emacs to run as a server/daemon?

I run emacs on Slackware 14.2 in daemon mode. My only issue was I was tired of seeing the warning. Other than that, the server ran fine for my purposes. What I did to get rid of the warning was to download the latest version of emacs from their official site
(emacs 26.1), removed the emacs package that came with my Slackware version, then unpacked and compiled the new version:
sudo tar -xvf emacs-26.1.tar.xz
./configure --with-x-toolkit=lucid
make
sudo make install
It's been running fine, no problems and no warning when the server starts.
You might want to give that a try. The GNU Project site here http://mirror.keystealth.org/gnu/emacs/ has the latest versions in .tar.gz format as well if you prefer

I was encountering this same error and was able to resolve it by removing my .emacs.d directory.
rm -fr ~/.emacs.d

Related

Emacs failed to load initialization file

I am using Emacs 25.3 under windows 10 platform.
It works fine until one time I started it and got the following message:
Warning (initialization): An error occurred while loading ‘
c:/Users/shore/AppData/Roaming/.emacs’:
Wrong type argument: listp, <html>
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.
As instructed I used --debug-init option to start and got the following message:
Debugger entered--Lisp error: (wrong-type-argument listp <html>)
package--read-archive-file("archives/gnu/archive-contents")
package-read-archive-contents("gnu")
package-read-all-archive-contents()
package-initialize()
eval-buffer(#<buffer *load*> nil "c:/Users/shore/AppData/Roaming/.emacs" nil t) ; Reading at buffer position 275
load-with-code-conversion("c:/Users/shore/AppData/Roaming/.emacs" "c:/Users/shore/AppData/Roaming/.emacs" t t)
load("~/.emacs" t t)
[init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" initialization format-message "`_emacs' init file is deprecated, please use `.emacs'" "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7]()
command-line()
normal-top-level()
Can anyone tell me where my problem is and how to fix it?
It's telling you that when it tried to read file archives/gnu/archive-contents it expected to read Lisp (more specifically a Lisp list). Instead, it encountered <html> (presumably text in the file).
A guess is that you somehow downloaded or picked up an HTML file (perhaps one that describes the archive file or that has links to download it) instead of downloading or picking up a file of Lisp code. Try once again to obtain that archive file.

Tests for libffi fail on LFS

I am working on a Linux From Scratch project and I've run into some (potential) issues. In chapter 6.49: Libffi-3.2.1, I executed the "sed", "configure" and "make" commands successfully but when I executed "make check", it appears that every test fails:
MAKE x86_64-unknown-linux-gnu : 0 * check
...stuff...
Test run by root on Fri Jul 13 23:51:21 2018
Native configuration is x86_64-unknown-linux-gnu
=== libffi tests ===
Schedule of variations:
unix
Running target unix
...a lot of failures...
FAIL: libffi.call/va_struct3.c -W -Wall -Wno-psabi -Os (test for excess errors)
FAIL: libffi.call/va_struct3.c -W -Wall -Wno-psabi -O2 -fomit-frame-pointer (test for excess errors)
=== libffi Summary ===
# of unexpected failures 685
# of unresolved testcases 685
I've been following the book pretty closely, but maybe I missed something along the way. Should I even worry about this or should I just install it anyway and move on?
Let me know if more information is needed.
Nevermind, I solved it. I basically went back and redid everything.
I usually I copy and paste the commands from the LFS book into a bash script and run it that way (if I can get a away with it). Well, apparently I forgot to write one for the diffutils package. But this seems strange to me because I wouldn't think that missing that script would cause issues with a test that seems to use DejaGNU let alone get me that far without any troubles.
Anyway, my LFS is up and running now! 😁

emacs crashed after executing list-packages and cannot recover

My emacs crashed after I innocently entered the list-packages command and it will not recover.
I have tried re-installing it from homebrew, all I have in the *messages* buffer is this message:
Loading /usr/local/share/emacs/site-lisp/proof-general/generic/proof-site.el (source)...done
package-read-archive-contents: Wrong type argument: arrayp, (spass . [(1 1 2) nil "Emacs wrapper for DisPass" single])
What can I do?

Can't install scala in emacs - An error occurred while loading `/home/nazar_art/.emacs'

I tried to install Scala accord this Set up for learning Scala with Emacs.
My current OS is Ubuntu 12.04.
I did exactly step by step.
After installation I run Emacs and see next error:
Warning (initialization): An error occurred while loading `/home/nazar_art/.emacs':
File error: Cannot open load file, scala-mode-auto
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.
I guessed that it is problem with permission. I change it for scala-mode but without success.
Here is content of ~/.emacs.d:
nazar_art#nazar-desktop:~/.emacs.d$ ls -lg
total 12
drwx------ 2 nazar_art 4096 Oct 10 10:58 auto-save-list
drwxrwxr-x 4 nazar_art 4096 Oct 5 00:12 elpa
drwxrwxrwx 4 nazar_art 4096 Oct 10 10:41 scala-mode
I'm newly at emacs and not sure that can find cause of error follow my intuition.
Any suggestion?
How to solve this trouble?
This worked for me:
Install Scala
sudo apt-get install scala
Get scala-mode
cd ~/git
git clone git://github.com/tuxdna/scala-mode.git
Set up the load-path
(add-to-list 'load-path "~/git/scala-mode")
Require scala-mode-auto
(require 'scala-mode-auto)
Created my first Scala source ~/first.scala. The mode was loaded.
object First {
def main(args: Array[String]) {
println("Test")
}
}
M-x scala-run-scala
Loaded the source with C-c C-l.
Entered First.main(null) in the interpreter. The program ran.

slime doesn't work in emacs24

I use emacs24 in archlinux.If i use the slime packages from marmalade.org,then when i use M-x slime the error is:
debugger invoked on a SB-INT:SIMPLE-FILE-ERROR in thread
#<THREAD "initial thread" RUNNING {AB007A9}>:
Couldn't load
"/home/sinners/.emacs.d/elpa/slime-20100404.1/swank-loader.lisp": file does
not exist.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
but if i use the slime-cvs packages from the offical site,the error is:
Debugger entered: (("Error in timer" slime-attempt-connection (#<process inferior-lisp> nil 2) (void-variable --cl-accu--)))
#[257 "\302\303\304\300\301F\"\207" [slime-attempt-connection (#<process inferior-lisp> nil 2) debug nil "Error in timer"] 7 "\n\n(fn DATA)"]((void-variable --cl-accu--))
funcall(#[257 "\302\303\304\300\301F\"\207" [slime-attempt-connection (#<process inferior-lisp> nil 2) debug nil "Error in timer"] 7 "\n\n(fn DATA)"] (void-variable --cl-accu--))
slime-timer-call(slime-attempt-connection #<process inferior-lisp> nil 2)
apply(slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 2))
byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4)
timer-event-handler([t 20271 59188 161536 0.3 slime-timer-call (slime-attempt-connection #<process inferior-lisp> nil 2) nil])
anyone can help me?
Problem with --cl-accu-- variable signs about breakage of emacs cl package in presence of lexical scoping. Try to go to slime.el in your slime distribution, find string
;; lexical-binding: t in the ;; Local Variables: section at the end of the file and change it to ;; lexical-binding: nil. And remove old slime.elc file if you have one.
I had the exact same problem, which was solved by deleting the slime.elc file, that I had compiled earlier using byte-recompile-directory. I didn't try compiling it again.
I'm not sure, but this problem can be due to different versions of SLIME and SWANK. However you should just use pacman to install a lisp implementation ­(I think that SBCL is the most popular implementation on Linux) and then use quicklisp to install everything else.
See this blog post to see how to install SWANK and SLIME with quicklisp.