Git Product home page Git Product logo

Comments (6)

joostkremers avatar joostkremers commented on July 17, 2024

This is very strange. writeroom-mode is defined in the standard way using define-minor-mode, so it should really work fine. (And it obviously does on my system, but I use Emacs 24.5.)

The current emacs-25 branch doesn't seem to compile on my system, so I can't test right now.

from writeroom-mode.

tmalsburg avatar tmalsburg commented on July 17, 2024

Even more strange is that in two instances out of my many tests, it did work. Unfortunately, I wasn't able to reconstruct the exact circumstances are under which it works.

In the meantime, I also checked with the latest development version of Emacs and still get the same behavior. I also noticed that, after (writeroom--disable), not just the mode line is missing but also visual-fill-column-mode is still on.

from writeroom-mode.

tmalsburg avatar tmalsburg commented on July 17, 2024

And I found out that it does work in Emacs 24.4.1 (installed from the Ubuntu 15.04 repository).

from writeroom-mode.

joostkremers avatar joostkremers commented on July 17, 2024

I just tested with the current Emacs devel, and i don't seem to have any problems deactivating writeroom-mode.

All I can suggest ATM is to update the Emacs sources (I compiled emacs-devel this morning after fetching the latest changes). Otherwise, delete writeroom-mode and visual-fill-column-mode and then reinstall them, and perhaps try make bootstrap to rebuild Emacs. That should get rid of any left-over .elc files that may misbehave because they were compiled with a different Emacs version.

from writeroom-mode.

tmalsburg avatar tmalsburg commented on July 17, 2024

Hm, it is working now but I'm not sure what the problem was. I made bootstrap and recompiled all .elc in my ~/.emacs.d but it still didn't work. The only other difference is that I'm now using M-x writeroom-mode to disable because the helm-issue is solved. Perviously, I used M-: (writeroom-mode) (which still doesn't work). Is it not ok to disable a mode with something else than M-x?

from writeroom-mode.

joostkremers avatar joostkremers commented on July 17, 2024

Oh, that explains everything. Minor mode commands behave differently when called interactively (i.e., with M-x or a key binding) than when they're called non-interactively (in Lisp code). When called interactively without argument, they toggle the mode. When called non-interactively without argument (or nil), they turn the mode on.

Doing M-: (writeroom-mode) constitutes a non-interactive call to writeroom-mode, so it will always turn the mode on. You'd need to do M-: (writeroom-mode -1) to turn it off or M-: (writeroom-mode 'toggle) to toggle it.

I think we can safely close this issue. :)

from writeroom-mode.

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.