1

I'm using Atomic Chrome. Atomic Chrome lets one associate a text area in a browser page with an Emacs buffer, so that one can edit the browser text area directly within Emacs. This involves installing the Chrome extension Atomic Chrome. However, I'm using it with Chromium. I also had to install the atomic-chrome Emacs package via Melpa (I think). Version 2.0.0 is installed. The description given for the atomic-chrome Emacs package is "Edit Chrome text area with Emacs using Atomic Chrome".

I am running Debian 10.7 Buster/stable. Both Emacs and Chromium are official Debian packages. My Emacs version is 1:26.1+1-3.2+deb10u1. My Chromium version is 83.0.4103.116-1~deb10u3.

It's working correctly. I have the following lines in my ~/.emacs.

(require 'atomic-chrome)
; Uncomment if using Atomic Chrome.
(atomic-chrome-start-server)

However, if I have the last line uncommented, whenever I start up Emacs, the following message pops up in a buffer

Warning (initialization): An error occurred while loading ‘/home/faheem/.emacs’:                                                           
                                                                                                                                           
File error: Cannot bind server socket, Address already in use                                                                              
                                                                                                                                           
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.   

Starting Emacs with the "--debug-init" option, I get the traceback

Debugger entered--Lisp error: (file-error "Cannot bind server socket" "Address already in use")                                            
  make-network-process(:name "websocket server on port 64292" :server t :family ipv4 :noquery t :filter websocket-server-filter :log webso$
  websocket-server(64292 :host local :on-message atomic-chrome-on-message :on-open nil :on-close atomic-chrome-on-close)                   
  atomic-chrome-start-websocket-server(64292)                                                                                              
  atomic-chrome-start-server()                                                                                                             
  eval-buffer(#<buffer  *load*> nil "/home/faheem/.emacs" nil t)  ; Reading at buffer position 13313                                       
  load-with-code-conversion("/home/faheem/.emacs" "/home/faheem/.emacs" t t)                                                               
  load("~/.emacs" t t)                                                                                                                     
  #f(compiled-function () #<bytecode 0x1dda91>)()                                                                                          
  command-line()                                                                                                                           
  normal-top-level() 

Note: if I have no Emacs instances running, this error message doesn't show up. But it does if I have no Emacs instance running, and start up another Emacs instance.

How can I stop this message from appearing?

2
  • My guess is that you are seeing that error because the server is already running and you are telling it to launch it again. Do you get the error on the very first emacs you launch or is it only when you already have a running emacs instance? – terdon Jan 12 at 17:44
  • This you'll have debug yourself by carefully observing at which point that listener socket is established and under which circumstances Emacs tries to establish it again. Maybe you're using the emacs daemon and when launching the client, it runs the code again or something. Impossible to tell without access to your machine. – wasamasa Mar 21 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.