<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Emacs on Bz01&#39;s blog</title>
    <link>https://www.dwarfb.in/tags/emacs/</link>
    <description>Recent content in Emacs on Bz01&#39;s blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 27 Oct 2024 12:29:08 +0530</lastBuildDate>
    <atom:link href="https://www.dwarfb.in/tags/emacs/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Optional dependency loading in Emacs, a good idea?</title>
      <link>https://www.dwarfb.in/blog/optional-dependency-loading-in-emacs/</link>
      <pubDate>Sun, 27 Oct 2024 12:12:00 +0530</pubDate>
      <guid>https://www.dwarfb.in/blog/optional-dependency-loading-in-emacs/</guid>
      <description>&lt;p&gt;Hey guys!&#xA;I  have gotten a sudden motivation to refactor my nixos dotfiles, and I have an idea, don&amp;rsquo;t know if it&amp;rsquo;s good or not so here it is:&lt;/p&gt;&#xA;&lt;p&gt;While developing code, I feel like your system should have 0 development dependencies, all of them should be project dependencies instead. However my text editor has certain configuration files for all languages, so it has packages installed for all of the possible languages and frameworks and tools that i&amp;rsquo;ll be using.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How Emacs taught me programming</title>
      <link>https://www.dwarfb.in/blog/how-emacs-taught-me-programming/</link>
      <pubDate>Sun, 15 Sep 2024 16:14:00 +0530</pubDate>
      <guid>https://www.dwarfb.in/blog/how-emacs-taught-me-programming/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been using emacs for around 4 years now, and as I&amp;rsquo;m entering the 2nd year of my college, I can&#xA;feel I&amp;rsquo;ve grown significanly along with my text editor.&lt;/p&gt;&#xA;&lt;p&gt;Emacs (and Linux) has taught me a lot about Software Engineering. Reading other people&amp;rsquo;s&#xA;configuration files, writing my own unique snippets, and playing with packages has really helped me&#xA;learn programming. Many programmers advice to make a &amp;ldquo;project&amp;rdquo; to really get a grasp of programming&#xA;and get experience, for me a large part of that was emacs. While I was using emacs to code, I was&#xA;also learning how to read the manual, refer the web to figure out problems, and gather help from&#xA;forums(You guys rock).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ricing Org Mode</title>
      <link>https://www.dwarfb.in/blog/ricing-org-mode/</link>
      <pubDate>Sun, 23 Apr 2023 23:24:00 +0530</pubDate>
      <guid>https://www.dwarfb.in/blog/ricing-org-mode/</guid>
      <description>&lt;p&gt;A majority of emacs users are absolute die-hard fans of org mode, and wouldn&amp;rsquo;t be able to live without it. And it makes sense too, it&amp;rsquo;s a tool that you can use in whatever workflow you prefer, which is really powerful. However as a relatively new emacs users (only 2 years!), I couldn&amp;rsquo;t really get org mode. I never felt satisfied when using it, as for me it seemed like an old technology, especially for a person who&amp;rsquo;s used to the web apps, which have a totally different UI .&lt;/p&gt;</description>
    </item>
    <item>
      <title>Quickly toggle Eshell in emacs</title>
      <link>https://www.dwarfb.in/blog/quickly-toggle-eshell-in-emacs/</link>
      <pubDate>Thu, 13 Apr 2023 22:27:00 +0530</pubDate>
      <guid>https://www.dwarfb.in/blog/quickly-toggle-eshell-in-emacs/</guid>
      <description>&lt;p&gt;One of my Emacs&amp;rsquo; favourite features is Eshell. However recently I wanted to create a function, that&#xA;automatically toggles eshell, like vscode, and gives priority to the project root (if in project).&#xA;This little code snippet does exactly that:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(defun binary-eshell/toggle-eshell ()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (interactive)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (let ((eshell-buffer-name (binary-eshell/eshell-buffer-name)))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (if (binary-eshell/eshell-toggled-p)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (delete-windows-on eshell-buffer-name)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (progn&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (split-window-below)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (if (project-current)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            (let ((default-directory (project-root (project-current))))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              (eshell)))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (eshell)))))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(defun binary-eshell/eshell-toggled-p ()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Checks if eshell is toggled.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (let ((eshell-buffer-name (binary-eshell/eshell-buffer-name))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (result))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (dolist (element (&lt;span style=&#34;color:#a6e22e&#34;&gt;window-list&lt;/span&gt;) result)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (if (string= eshell-buffer-name (&lt;span style=&#34;color:#a6e22e&#34;&gt;buffer-name&lt;/span&gt; (&lt;span style=&#34;color:#a6e22e&#34;&gt;window-buffer&lt;/span&gt; element)))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          (setq result &lt;span style=&#34;color:#66d9ef&#34;&gt;t&lt;/span&gt;)))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    result))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(defun binary-eshell/eshell-buffer-name ()&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Returns the name of the eshell buffer. It works on the basis of the following rule:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;If the current buffer is part of a project, then name it on the basis of the project,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;else name it on the basis of default-directory.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (let ((eshell-buffer-name))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    (if (project-current)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        (setq eshell-buffer-name&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;              (&lt;span style=&#34;color:#a6e22e&#34;&gt;concat&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;*eshell-&amp;#34;&lt;/span&gt; (project-name (project-current)) &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;*&amp;#34;&lt;/span&gt;))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      (setq eshell-buffer-name (&lt;span style=&#34;color:#a6e22e&#34;&gt;concat&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;*eshell-&amp;#34;&lt;/span&gt; default-directory &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;*&amp;#34;&lt;/span&gt;)))))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Call binary-eshell/toggle-eshell and voila! It opens an eshell window, for you to work on!&#xA;With this, I have hopefully shown you how you can incorporate eshell even more into your workflow.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
