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,50 +0,0 @@
|
|||
<p>When you are tinkering with Emacs, would it be great to refer to others'
|
||||
configs automatically?</p>
|
||||
|
||||
<p>In a sense, we are doing it manually already: We often go to other people's Github
|
||||
repos and look at their configs (either in code or in a giant <code class="language-plaintext highlighter-rouge">.org</code>
|
||||
file).</p>
|
||||
|
||||
<p>With Doom Emacs, we may streamline the process. Here's my reasoning:</p>
|
||||
|
||||
<p>Doom Emacs establishes a convention of configuration files:</p>
|
||||
|
||||
<ul>
|
||||
<li>Doom modules enabled in <code class="language-plaintext highlighter-rouge">init.el</code></li>
|
||||
<li>Other non-Doom packages: <code class="language-plaintext highlighter-rouge">package.el</code></li>
|
||||
<li>Customization stored and managed in <code class="language-plaintext highlighter-rouge">custom.el</code></li>
|
||||
<li>All private configs live in <code class="language-plaintext highlighter-rouge">config.el</code></li>
|
||||
</ul>
|
||||
|
||||
<p>In other words, Doom standardizes (and simplifies) the Emacs configurations.</p>
|
||||
|
||||
<p><strong>With all the famous people’s configs, we can build a service to automatically
|
||||
analyze their configs and answer questions like</strong>:</p>
|
||||
|
||||
<ul>
|
||||
<li>Should I use this Doom package?</li>
|
||||
<li>How do people configure it? What options do people use?</li>
|
||||
<li>Is there any packages people use that matches the keyword <code class="language-plaintext highlighter-rouge">foo</code>?</li>
|
||||
<li>What's the popularity of this config?</li>
|
||||
<li>…</li>
|
||||
</ul>
|
||||
|
||||
<p>We can build a program to pull the list of Doom config repos, and
|
||||
perform file parsing to get the stats.</p>
|
||||
|
||||
<p>It would also help the community to improve the defaults on Doom Emacs. Say, if
|
||||
the majority of users add package X in Doom, it is a appealing reason for Doom
|
||||
to incorporate X.</p>
|
||||
|
||||
<p>We can extend the idea: <strong>Because Emacs can
|
||||
act as a server and is inspectable, why don't we spin up an Emacs
|
||||
cluster running all kinds of configs</strong>.</p>
|
||||
|
||||
<p>The service can answer all kinds of config queries.</p>
|
||||
|
||||
<p>A usage scenario: People send in their 1) Emacs version, 2) Doom
|
||||
version, 3) package name, and the service returns a list of
|
||||
configurations for that package, together with popularity data, and
|
||||
documentation that people can search and learn.</p>
|
||||
|
||||
<p>What do you think of this idea? Drop me a comment!</p>
|
|
@ -1 +0,0 @@
|
|||
<!-- SC_OFF --><div class="md"><p>Hello everyone!</p> <p>Title says. Looking to learn about your top key bindings/ rebindings / minor modes / etc for speed and efficiency when working with text, note taking, etc.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/rtwyyn"> /u/rtwyyn </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/qzm06n/what_are_your_top_key_bindings_rebindings_minor/">[link]</a></span>   <span><a href="https://www.reddit.com/r/orgmode/comments/qzm06n/what_are_your_top_key_bindings_rebindings_minor/">[comments]</a></span>
|
|
@ -1 +0,0 @@
|
|||
<table> <tr><td> <a href="https://www.reddit.com/r/unixporn/comments/pos3yg/bspwm_cool_which_distro/"> <img src="https://preview.redd.it/9ygj4gbhoon71.png?width=640&crop=smart&auto=webp&s=f005c8c66ad283d48f62f9060603d6ddbede32ba" alt="[bspwm] Cool! Which distro?" title="[bspwm] Cool! Which distro?" /> </a> </td><td>   submitted by   <a href="https://www.reddit.com/user/glowiak"> /u/glowiak </a> <br/> <span><a href="https://i.redd.it/9ygj4gbhoon71.png">[link]</a></span>   <span><a href="https://www.reddit.com/r/unixporn/comments/pos3yg/bspwm_cool_which_distro/">[comments]</a></span> </td></tr></table>
|
|
@ -1 +0,0 @@
|
|||
<!-- SC_OFF --><div class="md"><p>How many times a day or even hour do you use and rely upon Org Mode? How much easier does it make your life? What would you do if it was no longer actively developed or supported?</p> <p>Think about this, and then reflect that this is completely free to use, the product of countless hours of labour. </p> <p>If you are in a position to do so, consider making an ongoing donation to support its development and longevity. </p> <p>Support via these means:</p> <ul> <li><a href="https://liberapay.com/bzg">https://liberapay.com/bzg</a></li> <li><a href="https://github.com/sponsors/bzg">https://github.com/sponsors/bzg</a></li> <li><a href="https://www.paypal.com/paypalme/bzg/10">https://www.paypal.com/paypalme/bzg/10</a></li> </ul> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/patchikin"> /u/patchikin </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/ppay7m/orgmode_is_amazing_consider_donating_to_support/">[link]</a></span>   <span><a href="https://www.reddit.com/r/orgmode/comments/ppay7m/orgmode_is_amazing_consider_donating_to_support/">[comments]</a></span>
|
|
@ -1,3 +0,0 @@
|
|||
<img src="https://media.babylonbee.com/thumbs/article-10000-1-thumb.jpg"> <p>BERLIN—In an interview with CBS News, German Chancellor Adolf Hitler declared that anyone who attacks him or his methods is really attacking science itself. </p>
|
||||
<p>The post <a rel="nofollow" href="https://babylonbee.com/news/hitler-proclaims-anyone-who-attacks-him-is-attacking-science">Hitler Proclaims Anyone Who Attacks Him Is Attacking Science</a> appeared first on <a rel="nofollow" href="https://babylonbee.com">The Babylon Bee</a>.</p>
|
||||
|
|
@ -1 +0,0 @@
|
|||
<p><img src="https://thumbnails.lbry.com/knO-Nrlj31Y" width="480" alt="thumbnail" title="KDE Consistency 2021" /></p>Learn more at Akademy 2021, tomorrow!<br />...<br />https://www.youtube.com/watch?v=knO-Nrlj31Y
|
|
@ -1 +0,0 @@
|
|||
<p><img src="https://thumbnails.lbry.com/7DCSTzj-7D8" width="480" alt="thumbnail" title="KDE Floating Applets #Shorts" /></p>The devlog of how I'm implementing this feature will come soon, so subscribe! and donate blah blah blah<br /><br /><br />Stay updated: 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 />Background music by:<br />After The Fall - https://www.youtube.com/channel/UCGQErWWbH15OMutnpM2vW7w<br />KaizanBlu - https://www.youtube.com/channel/UCUtxQO1jg3bJcRjBWnYAzmw<br />Low FM - https://www.youtube.com/channel/UC831upHpo4t748vRdHSWDmA<br />Idyllic - https://www.youtube.com/watch?v=8QgbdivnDDs&t=92s<br />Evol - https://www.youtube.com/watch?v=F-dDQmDVNzk&t=4s<br />...<br />https://www.youtube.com/watch?v=7DCSTzj-7D8
|
|
@ -1 +0,0 @@
|
|||
<!-- SC_OFF --><div class="md"><p>So don’t know why but Picom is using this high, this makes my pc to ramp up</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Kyxic"> /u/Kyxic </a> <br/> <span><a href="https://www.reddit.com/r/archlinux/comments/q74o28/picom_using_25_cpu/">[link]</a></span>   <span><a href="https://www.reddit.com/r/archlinux/comments/q74o28/picom_using_25_cpu/">[comments]</a></span>
|
|
@ -1,19 +0,0 @@
|
|||
<p>Recently I stumbled upon <a href="https://github.com/semiosis/pen.el">pen.el</a> which interacts with language models, like OpenAI GTP-3.</p>
|
||||
|
||||
<p>This is interesting. Loosely thinking, language models are good complement to Emacs as both are operating on plain text.</p>
|
||||
|
||||
<p>I tried pen.el on a Docker container, but it didn’t work out of box at my first try.</p>
|
||||
|
||||
<p>Also, I look at the <a href="https://beta.openai.com/docs/api-reference/introduction">OpenAI API documentation</a> and it doesn’t seem hard to build a wrapper around it.</p>
|
||||
|
||||
<p>After a weekend’s work, here is the first implementation of <a href="https://github.com/junjizhi/aide.el">aide.el</a>.</p>
|
||||
|
||||
<blockquote>
|
||||
<p>Fun fact: The repo name <strong>aide</strong> is generated by <a href="https://beta.openai.com/examples/default-product-name-gen">OpenAI Product Name Generator</a>, which reads like AI + IDE, or AI Dwells (in) Emacs :P</p>
|
||||
</blockquote>
|
||||
|
||||
<p>Think of aide.el as a thin wrapper around APIs like OpenAI.</p>
|
||||
|
||||
<p>Currently <code class="language-plaintext highlighter-rouge">aide.el</code> implementation is minimal: You select a region of text in Emacs, run <code class="language-plaintext highlighter-rouge">M-x aide-openai-completion</code>, and Emacs shows how AI responds to it.</p>
|
||||
|
||||
<p><a href="https://github.com/junjizhi/aide.el">Try it out</a> and let me know what you think!</p>
|
|
@ -1 +0,0 @@
|
|||
<table> <tr><td> <a href="https://www.reddit.com/r/unixporn/comments/qyz5jd/qtile_scrot/"> <img src="https://preview.redd.it/qen8itx7az081.png?width=640&crop=smart&auto=webp&s=1017f8e5f73406535017043392bbb0e6b501dc05" alt="[ qtile ] scrot" title="[ qtile ] scrot" /> </a> </td><td>   submitted by   <a href="https://www.reddit.com/user/cr2o"> /u/cr2o </a> <br/> <span><a href="https://i.redd.it/qen8itx7az081.png">[link]</a></span>   <span><a href="https://www.reddit.com/r/unixporn/comments/qyz5jd/qtile_scrot/">[comments]</a></span> </td></tr></table>
|
|
@ -1,77 +0,0 @@
|
|||
<p>How can we get org-mode to emphasize things smartly? Let’s find out.</p>
|
||||
|
||||
<p>Background: After <a href="https://emacstil.com/til/2021/11/26/make-org-emphasis-code-verbatim-bold-look-nicer/">hiding the markers and making them colorful</a>,
|
||||
I want to make the act of emphasis as easy as possible.</p>
|
||||
|
||||
<p>The <code class="language-plaintext highlighter-rouge">M-x org-emphasize</code> or <code class="language-plaintext highlighter-rouge">C-c C-x C-f</code> is close but does not meet my
|
||||
expectation because:</p>
|
||||
|
||||
<ul>
|
||||
<li>It prompts me to input the marker, which
|
||||
is extra overhead</li>
|
||||
<li>It requires me to mark the region first. Too much ceremony needed.</li>
|
||||
</ul>
|
||||
|
||||
<p>Basically, I need a command that can do what I mean
|
||||
(<a href="https://en.wikipedia.org/wiki/DWIM">DWIM</a>).</p>
|
||||
|
||||
<p>My editing intention goes something like: <strong>Depend on the cursor position, it
|
||||
either emphasizes the current word, or starts a new emphasis region.</strong></p>
|
||||
|
||||
<p>I found <a href="https://emacs.stackexchange.com/a/14586">this SO
|
||||
answer</a>. With some tweaks, I
|
||||
had a working solution:</p>
|
||||
|
||||
<div class="language-elisp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">;; Adapted from https://emacs.stackexchange.com/a/14586</span>
|
||||
<span class="p">(</span><span class="nb">defun</span> <span class="nv">org-emphasize-dwim</span> <span class="p">(</span><span class="k">&optional</span> <span class="nb">char</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="nb">unless</span> <span class="p">(</span><span class="nv">region-active-p</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="nv">jz/maybe-mark-word</span><span class="p">))</span>
|
||||
<span class="p">(</span><span class="nv">org-emphasize</span> <span class="nb">char</span><span class="p">))</span>
|
||||
|
||||
<span class="p">(</span><span class="nb">defun</span> <span class="nv">org-emphasize-with-verbatim-dwim</span> <span class="p">()</span>
|
||||
<span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="nv">org-emphasize-dwim</span> <span class="nv">?=</span><span class="p">))</span>
|
||||
|
||||
<span class="p">(</span><span class="nb">defun</span> <span class="nv">org-emphasize-with-code-dwim</span> <span class="p">()</span>
|
||||
<span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="nv">org-emphasize-dwim</span> <span class="nv">?~</span><span class="p">))</span>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>I use <code class="language-plaintext highlighter-rouge">code</code> and <code class="language-plaintext highlighter-rouge">verbatim</code> a lot, so I created two dedicated
|
||||
functions for them: <code class="language-plaintext highlighter-rouge">(org-emphasize-with-verbatim-dwim)</code> and
|
||||
<code class="language-plaintext highlighter-rouge">(org-emphasize-with-code-dwim)</code>.</p>
|
||||
|
||||
<p>Below is the implementation of <code class="language-plaintext highlighter-rouge">(jz/maybe-mark-word)</code>.</p>
|
||||
|
||||
<div class="language-elisp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="nb">defun</span> <span class="nv">jz/cursor-outside-of-any-word</span> <span class="p">()</span>
|
||||
<span class="p">(</span><span class="nb">not</span> <span class="p">(</span><span class="nv">bounds-of-thing-at-point</span> <span class="ss">'word</span><span class="p">)))</span>
|
||||
|
||||
<span class="p">(</span><span class="nb">defun</span> <span class="nv">jz/cursor-at-beginning-of-a-word</span> <span class="p">()</span>
|
||||
<span class="p">(</span><span class="nb">eq</span> <span class="p">(</span><span class="nv">point</span><span class="p">)</span> <span class="p">(</span><span class="nb">car</span> <span class="p">(</span><span class="nv">bounds-of-thing-at-point</span> <span class="ss">'word</span><span class="p">))))</span>
|
||||
|
||||
|
||||
<span class="p">(</span><span class="nb">defun</span> <span class="nv">jz/maybe-mark-word</span> <span class="p">()</span>
|
||||
<span class="s">"Mark the current word. If cursor is outside of a word bounds, mark the empty position."</span>
|
||||
<span class="p">(</span><span class="nv">interactive</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="nb">unless</span> <span class="p">(</span><span class="nb">or</span> <span class="p">(</span><span class="nv">jz/cursor-outside-of-any-word</span><span class="p">)</span> <span class="p">(</span><span class="nv">jz/cursor-at-beginning-of-a-word</span><span class="p">))</span>
|
||||
<span class="p">(</span><span class="nv">backward-word</span><span class="p">))</span>
|
||||
<span class="p">(</span><span class="nb">unless</span> <span class="p">(</span><span class="nv">jz/cursor-outside-of-any-word</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="nv">mark-word</span><span class="p">)))</span>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p><strong>The gist is to prevent calling <code class="language-plaintext highlighter-rouge">(backward-word)</code> if the cursor is at
|
||||
the beginning of a word, or outside of a word</strong>.</p>
|
||||
|
||||
<p>Finally, I bind the functions with backtick key because I found myself
|
||||
rarely use it, so I bind the keystrokes:</p>
|
||||
|
||||
<div class="language-elisp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">(</span><span class="nb">defun</span> <span class="nv">jz/org-mode-hook</span> <span class="p">()</span>
|
||||
<span class="p">(</span><span class="nv">local-set-key</span> <span class="p">(</span><span class="nv">kbd</span> <span class="s">"M-`"</span><span class="p">)</span> <span class="ss">'org-emphasize-with-verbatim-dwim</span><span class="p">)</span>
|
||||
<span class="p">(</span><span class="nv">local-set-key</span> <span class="p">(</span><span class="nv">kbd</span> <span class="s">"`"</span><span class="p">)</span> <span class="ss">'org-emphasize-with-code-dwim</span><span class="p">))</span>
|
||||
|
||||
<span class="p">(</span><span class="nv">add-hook</span> <span class="ss">'org-mode-hook</span> <span class="ss">'jz/org-mode-hook</span><span class="p">)</span>
|
||||
</code></pre></div></div>
|
||||
|
||||
<p>Right now if I press the <code class="language-plaintext highlighter-rouge">`</code> or <code class="language-plaintext highlighter-rouge">M-`</code> key, Emacs emphasizes the
|
||||
current word correctly as I like!</p>
|
Loading…
Add table
Add a link
Reference in a new issue