fixing a bunch of broken stuff I think
This commit is contained in:
parent
0dbc3ead0e
commit
8bace887a2
1551 changed files with 299 additions and 57481 deletions
|
@ -1 +0,0 @@
|
|||
<!-- SC_OFF --><div class="md"><p>Hi everyone,</p> <p>I use Doom Emacs with Evil and the <code>+everywhere</code> flag. I read Wiki pages with eww and I would like jump to urls with the same visual approach as <code>evilem-motion-*</code>, i.e., where the candidates are prefixed by letters.</p> <h1>Defining the motion</h1> <p>I followed the definition of the <a href="https://github.com/PythonNut/evil-easymotion/blob/master/evil-easymotion.el#L340">evilem-motion-*</a> motions to create a new one based on <code>shr-next-link</code>:</p> <pre><code>(after! evil-easymotion (evilem-make-motion evilem-motion-shr-next-link #'shr-next-link :scope 'line)) (map! :after eww :map eww-mode-map (:prefix "g" :n "<tab>" #'evilem-motion-shr-next-link)) </code></pre> <p>Which works as intended, but only highlight links in the current line while I wanted to highlight all the links in the window. This happend because I am using <code>:scope 'line</code>.</p> <h1>Defining the <code>window</code> scope</h1> <p>I managed to understand what was the scope handled by <code>evil-easymotion</code>, i.e., everything recognised by the <code>thing-at-point</code> function. But I didn't find any predefined <code>thing</code> matching the window. Thus, I have created a new one:</p> <pre><code>(defun window-bounds-of-window-at-point () "Return the start and end points of a window." (save-excursion (message "%d-%d" (window-start) (window-end)) (cons (window-start) (window-end)))) (put 'window 'bounds-of-thing-at-point 'window-bounds-of-window-at-point) </code></pre> <p>And then I changed the scope of <code>evilem-motion-shr-next-link</code> from <code>'line</code> to <code>'window</code>.</p> <h1>Problem</h1> <p>Everything work well, except that <code>(window-end)</code> returns a different value when I run <code>evilem-motion-shr-next-link</code> via the eval prompt, i.e., <code>pp-eval-expression</code>, or via my keybinding.</p> <p>For instance, on <code>(eww "https://www.emacswiki.org/emacs/IntegerAtPoint")</code> with the cursor at the beginning, the debuging message in <code>window-bounds-of-window-at-point</code> returns:</p> <ul> <li><p><code>1-870</code> via the keybinding</p></li> <li><p><code>1-1531</code> via the eval prompt</p></li> </ul> <h1>Questions</h1> <ul> <li><p>Does someone know why there is this difference between the two approaches to call the function?</p></li> <li><p>Is there a simpler and more efficient solution to what I am doing?</p></li> </ul> <p>Thank you in advance!</p> <p>Edit: Fix the formatting</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Zar_Rok"> /u/Zar_Rok </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/q766fp/strange_behavior_when_defining_a_thingatpoint/">[link]</a></span>   <span><a href="https://www.reddit.com/r/emacs/comments/q766fp/strange_behavior_when_defining_a_thingatpoint/">[comments]</a></span>
|
|
@ -1 +0,0 @@
|
|||
  submitted by   <a href="https://www.reddit.com/user/unix_hacker"> /u/unix_hacker </a> <br/> <span><a href="https://enzuru.medium.com/emacs-in-a-few-dozen-keystrokes-and-why-some-of-you-should-just-use-vim-14b9af30be70?source=friends_link&sk=a19bcc3e4f286571559907e25480f1c0">[link]</a></span>   <span><a href="https://www.reddit.com/r/emacs/comments/qz2lph/emacs_in_fifty_keystrokes_and_why_some_of_you/">[comments]</a></span>
|
|
@ -1 +0,0 @@
|
|||
<table> <tr><td> <a href="https://www.reddit.com/r/unixporn/comments/ru49ll/kde_new_to_linux_first_rice_also_first_post/"> <img src="https://preview.redd.it/nr0u30r158981.png?width=640&crop=smart&auto=webp&s=343d600545cfb64b1ad1c1baa968ec5c4f3e367a" alt="[KDE] New to linux first rice, also first post....." title="[KDE] New to linux first rice, also first post....." /> </a> </td><td>   submitted by   <a href="https://www.reddit.com/user/typical_ABDUL_BHAI"> /u/typical_ABDUL_BHAI </a> <br/> <span><a href="https://i.redd.it/nr0u30r158981.png">[link]</a></span>   <span><a href="https://www.reddit.com/r/unixporn/comments/ru49ll/kde_new_to_linux_first_rice_also_first_post/">[comments]</a></span> </td></tr></table>
|
|
@ -1 +0,0 @@
|
|||
<p><img src="https://thumbnails.lbry.com/unKm1lHu4iw" width="480" alt="thumbnail" title="1:1 Gestures and New Overview in KDE Plasma: When!?" /></p>Stay in the loop: https://t.me/veggeroblog<br /><br />If you want to help me make these videos:<br />Patreon: https://www.patreon.com/niccolove<br />Liberapay: https://liberapay.com/niccolove<br />Paypal: https://paypal.me/niccolove<br /><br />My website is https://niccolo.venerandi.com and if you want to contact me, my telegram handle is [at] veggero.<br />...<br />https://www.youtube.com/watch?v=unKm1lHu4iw
|
|
@ -1 +0,0 @@
|
|||
<table> <tr><td> <a href="https://www.reddit.com/r/unixporn/comments/rd0i1f/i3_hmmi_wish_i_was_as_happy_as_her/"> <img src="https://preview.redd.it/lhxa0c1can481.png?width=640&crop=smart&auto=webp&s=e7b10404452e114265b426dfd3ba087d39c490f6" alt="[i3] Hmm....I wish i was as happy as her." title="[i3] Hmm....I wish i was as happy as her." /> </a> </td><td>   submitted by   <a href="https://www.reddit.com/user/VenerableDarkCrow"> /u/VenerableDarkCrow </a> <br/> <span><a href="https://i.redd.it/lhxa0c1can481.png">[link]</a></span>   <span><a href="https://www.reddit.com/r/unixporn/comments/rd0i1f/i3_hmmi_wish_i_was_as_happy_as_her/">[comments]</a></span> </td></tr></table>
|
Loading…
Add table
Add a link
Reference in a new issue