Comments (10)
Okay, thanks. I was confused by the straight.el stuff, and thought that was downloading your config.
I'm able to reproduce it now. This is only when using the globalized mode and along with diff-hl mode. This being a user-defined globalized mode not working properly with another (not built-in) package, I don't think this is an olivetti bug.
I'll try to debug this a little, but I'm guessing that an eventual fix will be in the globalized mode.
from olivetti.
Sorry, obviously I'm lagging behind here. Glad to see you got it sorted. Thanks @larstvei :)
from olivetti.
Please attempt to reproduce this with emacs -Q
and M-x load-file RET [PATH TO FILE]
from olivetti.
Do you mean something like this?
M-x load-file RET diff-hl.el RET
M-x load-file RET olivetti.el RET
M-x eval-expression RET (global-diff-hl-mode)
(define-globalized-minor-mode global-olivetti-mode
nil (lambda ()
(pcase major-mode
('minibuffer-inactive-mode)
('exwm-mode)
('mu4e-headers-mode)
('pdf-view-mode)
('image-mode)
(_ (olivetti-mode 1)))))
(global-olivetti-mode 1)
M-x eval-expression RET (find-file "/file/under/git/vc")
M-x eval-expression RET (insert "test")
M-x save-buffer RET
from olivetti.
from olivetti.
Hi!
I use diff-hl and tried your globalized mode, and don't experience the problems you report.
However, I did experience similar issues when using git-gutter-fringe, which is a diff-hl equivalent I used before. diff-hl resolved it for me though. It is not particularly surprising if there are incompatibilities between packages that "mess with" the margins of the buffer.
Because I'm not able to reproduce it with the same combination of packages, there are a couple of things you could try. See if there is any additional package or configuration that might be the culprit; you can check this by starting Emacs with emacs -Q
as @rnkn suggests (which inhibits your emacs config file to be loaded), and then follow the steps you suggested yourself @walseb. If the error persists, then make sure you have updated versions of both packages. Maybe check if you are using the melpa stable version of olivetti (I would suggest trying the non-stable).
from olivetti.
@rnkn No additional code at all? Because then it's not possible, it only happens when I define a globalized-minor-mode
for it. I am running all the code above in a emacs -Q
instance without any code not mentioned here if that's what you mean.
@larstvei Yeah, that's what I'm doing. I just run emacs -Q -l configIProvidedAbove.el
. I'm using the latest version of olivetti published yesterday (fa9757f
) and the latest version of diff-hl
(a625033
)
I'm running GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
. And actually it appears as if the bug only happens after saving and editing for the second time. I'm not sure if that's due to the latest commits, but it does happen consistently using the config above on my pc with emacs -Q
.
from olivetti.
I just added some debugging prints in the lambda, checking what major modes and buffers were invoked. Turnes out diff-hl creates a buffer, which causes problems.
Does this fix your issue?
(define-globalized-minor-mode global-olivetti-mode
nil (lambda ()
(unless (string= " *diff-hl* " (buffer-name (current-buffer)))
(pcase major-mode
('minibuffer-inactive-mode)
('exwm-mode)
('mu4e-headers-mode)
('pdf-view-mode)
('image-mode)
(_ (olivetti-mode 1))))))
from olivetti.
Yeah that works, thanks a lot!
from olivetti.
from olivetti.
Related Issues (20)
- Please add legacy bindings to the key-map HOT 3
- set-transient-map is set to nil when running olivetti-expand HOT 25
- Olivetti no longer scales with `text-scale-mode`
- Post your screenshots here HOT 9
- Olivetti does not react to some frame resizing HOT 6
- Maybe not enable visual-line-mode by default? HOT 3
- The new keymap appears to still conflict with (or shadow) org-mode's HOT 3
- Unexpected sync between two olivetti-mode windows HOT 2
- Confliction with git-gutter HOT 2
- How to enable olivetti globally or to some modes HOT 1
- Wrapped text shifts left when company auto-complete comes up HOT 8
- Feature Request: Set Olivetti "gutter" background colour HOT 1
- Middle mouse click does not paste HOT 2
- Side window bug HOT 3
- Fix mouse-wheel events when mouse-wheel-mode is unavailable
- Olivetti errors on org buffer HOT 7
- olivetti-mode isn't activated on the minibuffer when executing isearch commands. HOT 3
- Please share your modeline config HOT 1
- Please explain "a nice writing environment HOT 1
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 olivetti.