emacs/var/elfeed/db/data/7c/7c270e85193fea459b35604b78a0e4072fadbe5c
2022-01-03 12:49:32 -06:00

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&#39;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&#39;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&#39;m not sure why that is; what it&#39;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&#39;d use edebug, but I&#39;m not sure if that&#39;s possible since the result of the <code>evil-redirect-digit-argument</code> call is just a wrapper of a lambda that I don&#39;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&#39;s causing this issue or how to fix it? I&#39;m super curious.</p> </div><!-- SC_ON --> &#32; submitted by &#32; <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> &#32; <span><a href="https://www.reddit.com/r/emacs/comments/powbe7/very_weird_evilorgmode_bug_evil_commands_with_a/">[comments]</a></span>