Comments (25)
from olivetti.
I've managed to reproduce this on Emacs 26. The latest version on MELA (not stable) has a fix that should resolve it. Can you please give this a try when you get a chance?
from olivetti.
Hmm that sound bad. Thanks for reporting. Are you calling olivetti-expand
with a key or with M-x
?
from olivetti.
Also, can you reproduce by loading Emacs with emacs -Q
then M-x load-file RET [PATH TO olivetti.el] RET
then repeating the above?
from olivetti.
Hmm that sound bad. Thanks for reporting. Are you calling olivetti-expand with a key or with M-x?
Key, but I have it bound in my own leader map.
Also, can you reproduce by loading Emacs with emacs -Q then M-x load-file RET [PATH TO olivetti.el] RET then repeating the above?
Yes, this time I was using M-x
. I'm on olivetti-20200207.749
and GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29
.
from olivetti.
I can’t reproduce this, so can you apply this patch and let me know how you go
diff --git a/olivetti.el b/olivetti.el
index 12063f5..0ce43d2 100644
--- a/olivetti.el
+++ b/olivetti.el
@@ -314,7 +314,7 @@ If prefixed with ARG, incrementally decrease."
(let ((keys (seq-subseq (this-single-command-keys) 0 -1))
(map (cdr olivetti-mode-map)))
(seq-do (lambda (k) (setq map (assq k map))) keys)
- (set-transient-map (cdr map) t))))
+ (when (consp map) (set-transient-map (cdr map) t)))))
(defun olivetti-shrink (&optional arg)
"Incrementally decrease the value of `olivetti-body-width'.
from olivetti.
Yep, that seems to have fixed it.
Also, now that I have your attention, might I suggest making how many columns olivetti expands by a user option. 2 is almost always too small for me, I'd prefer to make it expand by 4.
from olivetti.
Cool. Pushed the change.
Re adding an option for the expansion amount, I doubt it. The transient keymap code allows people to just hammer away at the last key of the binding to get what they want, or press \
and enter the column specifically. I think that’s enough.
from olivetti.
@rnkn I've never been able to get that hammering to work 😢. I'm using emacs evil-mode and so the transient bindings never really activate. It does seem super cool tho, I'll try to get it working.
from olivetti.
Yeah I had a look at your config earlier and thought that might be the issue. I suspect that something is using overriding-terminal-local-map
when it shouldn’t.
from olivetti.
Thank you for the assistance, you're correct 😄. It's definitely not an evil-mode issue. In fact, I was looking at the problem wrong. It does work if I use the default bindings I.E. C-c {
or C-c }
. It doesn't work if I use a leader-key binding which I suspect is an issue with my own leader package.
I'll fix it when I get a chance, again thank u.
from olivetti.
Was this fit already pushed to melpa? Because I just had the same issue
from olivetti.
Was this fit already pushed to melpa? Because I just had the same issue
I don't know what you mean.
from olivetti.
I just installed olivetti straight from the github repo and I am getting the same issue.
I am not using the keybinding, but just the M-x
and olivetti-expand
multiple times in succession and it leads to that error.
from olivetti.
Please attempt to reproduce this with emacs -Q
and M-x load-file RET [PATH TO FILE]
from olivetti.
It might be a GUI-specific problem. Doing this in emacs inside a terminal does not have that effect.
I am also doing multiple C-x C-+
in the GUI to increase the text size. An option not possible in the terminal emacs.
Starting the gui with emacs -Q -l "init.el"
does not show the problem but using emacs
alone does...
Any idea what this means?
from olivetti.
Unfortunately it means the issue is with your init.
from olivetti.
Hi,
I have the same problem with Emacs 26.3.
The problem persists without loading my init file (starting emacs with emacs -Q, yanking the content of olivetti.el into the scratch buffer, and evaluating the buffer)
from olivetti.
from olivetti.
This is what I got:
Debugger entered--Lisp error: (wrong-type-argument keymapp nil)
lookup-key(nil [16])
clear-transient-map()
Where '[16]' changes depending on what key, or key combination, I press. With C-x b, for example, I get:
Debugger entered--Lisp error: (wrong-type-argument keymapp nil)
lookup-key(nil [24 98])
clear-transient-map()
from olivetti.
from olivetti.
I think that's because the error is not triggered by olivetti-expand, but by any command executed after it (as the original post by mohkale says).
However, it seems that I've found the source of the problem. :)
I was executing olivetti-expand with C-c } and then I was repeating the command with C-x z (repeat). After some executions the problem started (with olivetti-shrink as well). I noticed that if I only hit C-c }, then everything seems working fine.
Apologies for having neglected my use of C-x z. Hope this helps.
(Thank you for your package, it's my favorite of the kind)
from olivetti.
from olivetti.
- emacs -Q
- M-x toggle-debug-on-error
- M-x load-file RET path/to/olivetti.el
- M-x olivetti-mode
- C-c }
- C-x z
- z
- z
Debugger entered--Lisp error: (wrong-type-argument keymapp nil)
lookup-key(nil [122])
clear-transient-map()
from olivetti.
I confirm. Now the problem is gone. Thank you.
from olivetti.
Related Issues (20)
- Olivetti does not react to some frame resizing HOT 6
- Incompatibility with diff-hl and making olivetti a global mode HOT 10
- 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
- feature request: maintain a minimum left margin HOT 2
- After shrinked buffer is closed, other buffers remain shrinked as well HOT 2
- Eager macro-expansion failure with `use-package` HOT 1
- Echo area messages when width changed non-interactively HOT 2
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.