1 line
2.1 KiB
Plaintext
1 line
2.1 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>Repost due to getting some details wrong in the original title.</p> <p>Also, actually, the command doesn't <em>fail</em>: it interprets <code>d 10</code> as <code>C-u 62-</code>, so <code>d 10 j</code> is read as <code>C-u 62 j</code>, and instead of deleting 10 lines below point, we instead jump 62 lines down. <code>d 20 j</code> is interpreted as <code>C-u 72 j</code>, <code>d 30 j</code> as <code>C-u 82 j</code>, and so on (unless there are multiple 0s in the command; for instance <code>d 100 j</code> is read as <code>C-u 620 j</code>).</p> <p>Here's the <a href="https://pastebin.com/PhgWWba4">init.el</a> needed to reproduce this issue; just open a buffer and activate <code>evil-org-mode</code>, then do any evil command with a 0 in the digit argument: <code>y 10 j</code>, <code>d 10 k</code>, <code>y 30 l</code>, etc.</p> <p>I discovered that this is due to <a href="https://github.com/Somelauw/evil-org-mode/blob/80ef38fb378541937f6ddfe836809e76eda1e355/evil-org.el#L635">this line</a> in <code>evil-org-mode</code>; commenting it out removes the issue. However, I'm not sure why that is; what it's attempting to do makes sense to me, and it seems to be identical to what evil itself <a href="https://github.com/emacs-evil/evil/blob/82e5becae21b7768ffbb4728bce83dab8751d610/evil-maps.el#L172">does</a>.</p> <p>I'd use edebug, but I'm not sure if that's possible since the result of the <code>evil-redirect-digit-argument</code> call is just a wrapper of a lambda that I don't know how to step into. Besides, <code>evil-redirect-digit-argument</code> seems to be being used correctly from what I can tell.</p> <p>Does anyone know what's causing this issue or how to fix it? I'm super curious.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/summetria"> /u/summetria </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/powbe7/very_weird_evilorgmode_bug_evil_commands_with_a/">[link]</a></span>   <span><a href="https://www.reddit.com/r/emacs/comments/powbe7/very_weird_evilorgmode_bug_evil_commands_with_a/">[comments]</a></span> |