Giter VIP home page Giter VIP logo

Comments (6)

lewang avatar lewang commented on August 26, 2024

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.

tuhdo avatar tuhdo commented on August 26, 2024

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.

lewang avatar lewang commented on August 26, 2024

How to repro the problem from emacs -Q?

from ws-butler.

tuhdo avatar tuhdo commented on August 26, 2024

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 running emacsclient, 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.

anirothan avatar anirothan commented on August 26, 2024

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.

lewang avatar lewang commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.