Comments (6)
This is related to #4. What is the fix? I don't use daemon mode.
It would help me see the problem if you can show a repro starting from emacs -Q
.
Can you try?
(defun activate-ws-butler ()
(require 'ws-butler)
(add-hook 'prog-mode-hook 'ws-butler-mode))
(add-hook 'after-make-frame-functions 'activate-ws-butler)
from ws-butler.
I can start the Emacs daemon but ws-butler
won't activate anymore. When I tried to run emacsclient
with the above code, I got this error:
Waiting for Emacs...
ERROR: Wrong number of arguments: (lambda nil (require (quote ws-butler)) (add-hook (quote prog-mode-hook) (quote ws-butler-mode))), 1
Normal Emacs starts file. My init.el only contains the above code you suggested.
from ws-butler.
How to repro the problem from emacs -Q
?
from ws-butler.
Well, I did start Emacs in clean state using emacs -Q
. But then, I have to save your code in init.el
to test with emacs-- daemon
. Your code is the only thing in init.el
.
The way I use Emacs daemon is like this:
- Start Emacs daemon:
emacs --daemon
. With the above code, the daemon starts fine. - Then, use
emacsclient
to connect to the daemon and do editting. Upon runningemacsclient
, this error occurs:
Waiting for Emacs...
ERROR: Wrong number of arguments: (lambda nil (require (quote ws-butler)) (add-hook (quote prog-mode-hook) (quote ws-butler-mode))), 1
from ws-butler.
A hook of 'after-make-frame-functions requires an argument (the frame just rendered). This why the activate-ws-butler function above causes an error when starting emacsclient.
However, even if this syntax error is corrected, the suggested solution will not work in all cases because any prog-mode buffers created before the frame is created, .e.g. you are using desktop-save-mode and it reloads them at startup, will not get ws-butler. Only those prog-mode buffers created after the frame is created will do so. Refer to #14 for more details and a suggested workaround.
from ws-butler.
Refer to #14 for details. https://github.com/lewang/ws-butler/tree/remove-highlight-changes-mode/ is the fix branch being tested.
from ws-butler.
Related Issues (20)
- Include ws-butler in Emacs HOT 1
- ws-butler with desktop-save-mode and emacs --daemon HOT 3
- Incompatible with Magit HOT 2
- ws-butler does trims whitespace on current line during deft auto-save HOT 2
- Sharp-quote all functions HOT 1
- Please tag a new release HOT 1
- In a markdown file, the trailling two whitespaces is meaningful HOT 7
- Please don't look at indent-tabs-mode HOT 11
- Is there a way to not remove whitespace at the end of file? HOT 9
- ws-butler fails with fci-mode enabled HOT 1
- Use cl-lib, not cl
- Don't propertize minibuffer input HOT 8
- Undo data corrupted HOT 2
- Compilation warnings with ws-butler 0.6
- org-element-cache warning when saving with ws-butler-keep-whitespace-before-point HOT 2
- white space before point trimmed in non focused buffer
- Feature request: trim at line change HOT 2
- ws-butler-global-exempt-modes doesn't quite work HOT 2
- ws-butler adds a whole string of spaces at the end of file. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ws-butler.