Posts about editinghttp://cestlaz.github.io/categories/editing.atom2018-09-19T23:47:48ZMike ZamanskyNikolaUsing Emacs Episode 49 mu4e-conversationhttp://cestlaz.github.io/posts/using-emacs-49-mu4e-conversation/2018-06-21T13:28:41-04:002018-06-21T13:28:41-04:00Mike Zamansky<div id="outline-container-org4a41587" class="outline-2">
<h2 id="org4a41587"></h2>
<div class="outline-text-2" id="text-org4a41587">
<p>
I've been using Emacs for email for a couple of years now. Not for
everything, for now my personal email is still Gmail but work is sent
and read through Emacs. I'm currently using <a href="https://www.djcbsoftware.nl/code/mu/mu4e.html">mu4e</a> and while it has a
few quirks and limitations, I like it very much. You can take a look
on how I configure and use it <a href="http://cestlaz.github.io/posts/using-emacs-39-mu4e/">here</a>.
</p>
<p>
The other day I saw <a href="https://www.reddit.com/r/emacs/comments/8qryri/mu4econversation_single_buffer_fullthread_display/">this</a> thread on Emacs about a new package -
<a href="https://gitlab.com/ambrevar/mu4e-conversation">mu4e-conversation</a>. It's a package that deals with email threads.
</p>
<p>
It's pretty cool. You can invoke it whenever you're in the headers
view you can just run <code>M-x mu4e-conversation</code> and it combines all the
email messages in the current thread into a single buffer.
</p>
<p>
It's pretty nice.
</p>
<p>
You can navigate between messages in the thread with <code>C-c C-n</code> and
<code>C-c C-p</code> and use most if not all of the usual mu4e goodness but on
top of that you can also toggle what the author calls tree mode by
hitting <code>V</code>. Tree mode turns the thread into an org-mode tree - also
extremely cool.
</p>
<p>
On top of this, you can also make mu4e your default viewing mode by
setting a single variable with <code>(setq mu4e-view-func 'mu4e-conversation)</code>.
</p>
<p>
Although it's very cool, I'm not sure if mu4e-conversation will find
its way into my workflow or not and probably won't know for a
while. This is mostly due to the fact that it's summer so work email
slows down and I won't have too many long threads to play with this
on.
</p>
<p>
I'll report back once I give it a fair shake but in the meantime if
anyone out there has had the time to play with it, let us know what
you think.
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/V5efS8uXANI" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>Using Emacs 48 Silversearcherhttp://cestlaz.github.io/posts/using-emacs-48-silversearcher/2018-04-22T17:28:41-04:002018-04-22T17:28:41-04:00Mike Zamansky<div id="outline-container-org2b8e3c6" class="outline-2">
<h2 id="org2b8e3c6"></h2>
<div class="outline-text-2" id="text-org2b8e3c6">
<p>
A couple of days ago I wrote about on my <a href="http://cestlaz.github.io/posts/unit-tests-grading-workflow">lab grading workflow</a>. In the
post I mentioned that I used Emacs to easily navigate between student
folders and files so I can actually look at their work in addition to
their programs output and test results.
</p>
<p>
The key is a combination of <code>dired</code> and <a href="https://github.com/Wilfred/ag.el">ag</a>, Emacs's interface to <a href="https://github.com/ggreer/the_silver_searcher">the
Silver Searcher</a> which is something like a recursive code grep on
steroids. I also briefly try to show <a href="https://github.com/mhayashi1120/Emacs-wgrep">wgrep</a> in the video which allows
you to edit Emacs grep buffers, effectively allowing you to make
changes across a set of files all at once. It ended up not working
with silversearcher - if anyone out there knows why, please chime in.
</p>
<p>
Enjoy:
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/-sFTkCQ774o" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>Using Emacs Episode 47 - Magithttp://cestlaz.github.io/posts/using-emacs-47-magit/2018-04-07T09:05:36-04:002018-04-07T09:05:36-04:00Mike Zamansky<div id="outline-container-org1582ecb" class="outline-2">
<h2 id="org1582ecb"></h2>
<div class="outline-text-2" id="text-org1582ecb">
<p>
I've been holding off on doing a <a href="https://magit.vc/">Magit</a> video for a while. Mostly
because I wasn't using it exclusively and also because there are
already a number of good Magit videos and resources out there.
</p>
<p>
What changed? Along with the new version of Magin, Jonas Bernoulli
wrote up <a href="https://emacsair.me/2017/09/01/magit-walk-through/">a walkthrough of the Magit interface</a>. For whatever reason,
it all finally clicked.
</p>
<p>
In spite of what the documentation says, Magit <b>is not</b> an interface
for git. Magit is a <b>command and control</b> center for git. You can
launch it just to execute some git commands but you can also leave it
up and running in an Emacs window or frame as a constant project
overview.
</p>
<p>
Wow. Mind blown!!!
</p>
<p>
If you use Emacs for Deveopment, you <b>have to</b> use Magit. If you don't
use Emacs, you can load it on the side for Magit. If you're not a
developer, learn to code so you can use Magit!!!!!
</p>
<p>
I tried to do justice to the package in the video. Magit along with <a href="https://orgmode.org/">Org
Mode</a> are arguably Emacs killer apps - enough in and of themselves to
justify using Emacs.
</p>
<p>
Check out the video:
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/1IYsiHXR620" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>Using Emacs 46 Auto Yasnippetshttp://cestlaz.github.io/posts/using-emacs-46-auto-yasnippets/2018-03-15T20:05:36-04:002018-03-15T20:05:36-04:00Mike Zamansky<div id="outline-container-orgd91d8fd" class="outline-2">
<h2 id="orgd91d8fd"></h2>
<div class="outline-text-2" id="text-orgd91d8fd">
<p>
The other day I discovered <a href="https://github.com/abo-abo/auto-yasnippet">auto-yasnippet</a>, another great package by
<a href="https://github.com/abo-abo">Oleh Krehel</a> or abo-abo.
</p>
<p>
It looks like it's going to be a great way to solve a particular
problem that come up now and again.
</p>
<p>
There are plenty of times when I want to create a number of similar
but slightly different blocks of text. The example on the project
site is:
</p>
<div class="highlight"><pre><span></span><span class="n">count_of_red</span> <span class="o">=</span> <span class="n">get_total</span><span class="p">(</span><span class="s">"red"</span><span class="p">);</span>
<span class="n">count_of_blue</span> <span class="o">=</span> <span class="n">get_total</span><span class="p">(</span><span class="s">"blue"</span><span class="p">);</span>
<span class="n">count_of_green</span> <span class="o">=</span> <span class="n">get_total</span><span class="p">(</span><span class="s">"green"</span><span class="p">);</span>
</pre></div>
<p>
You could use multiple cursors, a macro, or other methods to put in
the common text but you still have to deal with the parts of each line
that are unique, the red, green, and blue.
</p>
<p>
You could use a yasnippet but it's unlikely that you'll have a snippet
for every occasion. This is where auto-yasnippet comes in. You would
write the first line but add a tilda as a placeholder:
</p>
<div class="highlight"><pre><span></span><span class="n">count_of</span><span class="o">~</span><span class="n">red</span> <span class="o">=</span> <span class="n">get_total</span><span class="p">(</span><span class="s">"~red"</span><span class="p">)</span>
</pre></div>
<p>
and then invoke <code>aya-create</code>. This will get rid of the tildas and
create the auto-snippet. Then when you run <code>aya-expand</code> it will put in
the snippet with the tilda locations as placeholders.
</p>
<p>
Very cool.
</p>
<p>
Check out the video:
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/utrMabxgXbg" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>