Giter VIP home page Giter VIP logo

Comments (3)

dwdreisigmeyer avatar dwdreisigmeyer commented on June 22, 2024

This fixed the problem:

; Comment out:
; (wg-mode-line-add-display)
; (wg-mode-line-remove-display)
; at the bottom of workgroups.el. Recompile.

Thanks for the fantastic work!

-Dave

from workgroups.el.

vwood avatar vwood commented on June 22, 2024

This issue is due to assuming mode-line-position will be in the mode-line-format. I'm getting this problem to, because I wanted to customise my mode-line. Setting wg-mode-line-on to nil doesn't solve this issue, as workgroups still tries to add itself to the mode-line!

Rather than commenting out those lines, I suggest you (fset 'wg-mode-line-add-display (lambda () nil)) and same for wg-mode-line-remove-display, at least until wg-mode-line-on actually works as an option.

from workgroups.el.

redguardtoo avatar redguardtoo commented on June 22, 2024

Seem this bug is already reported,
Here is my patch:

diff --git a/site-lisp/workgroups.el/workgroups.el b/site-lisp/workgroups.el/workgroups.el
index 4dccd65..542bc9e 100644
--- a/site-lisp/workgroups.el/workgroups.el
+++ b/site-lisp/workgroups.el/workgroups.el
@@ -1447,11 +1447,12 @@ Query to overwrite if a workgroup with the same name exists."

 (defun wg-mode-line-add-display ()
   "Add Workgroups' mode-line format to `mode-line-format'."
-  (unless (assq 'wg-mode-line-on mode-line-format)
-    (let ((format `(wg-mode-line-on (:eval (wg-mode-line-string))))
-          (pos (1+ (position 'mode-line-position mode-line-format))))
-      (set-default 'mode-line-format
-                   (wg-insert-elt format mode-line-format pos)))))
+  (if wg-mode-line-on
+      (unless (assq 'wg-mode-line-on mode-line-format)
+        (let ((format `(wg-mode-line-on (:eval (wg-mode-line-string))))
+              (pos (1+ (position 'mode-line-position mode-line-format))))
+          (set-default 'mode-line-format
+                       (wg-insert-elt format mode-line-format pos))))))

 (defun wg-mode-line-remove-display ()
   "Remove Workgroups' mode-line format from `mode-line-format'."

from workgroups.el.

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.