<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Code on Noetic Nought</title>
    <link>https://punchagan.muse-amuse.in/tags/code/</link>
    <description>Recent content in Code on Noetic Nought</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>© 2006-2026 CC-BY-SA-4.0</copyright>
    <lastBuildDate>Wed, 22 Nov 2017 10:18:00 +0530</lastBuildDate>
    <atom:link href="https://punchagan.muse-amuse.in/tags/code/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Preview: A visualization git repository viewer</title>
      <link>https://punchagan.muse-amuse.in/blog/preview-a-visualization-git-repository-viewer/</link>
      <pubDate>Wed, 22 Nov 2017 10:18:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/preview-a-visualization-git-repository-viewer/</guid>
      <description>&lt;p&gt;A few weeks ago, I was watching a talk title &lt;a href=&#34;https://www.youtube.com/watch?v=fThhbt23SGM&#34;&gt;Design is a Search Problem&lt;/a&gt; by&#xA;&lt;a href=&#34;https://twitter.com/mbostock&#34;&gt;@mbostock&lt;/a&gt; of d3 fame, which he gave a couple of years ago while he was still&#xA;working at the New York Times.&lt;/p&gt;&#xA;&lt;p&gt;Primarily, he&amp;rsquo;s trying to drive home the point that the process of coming up&#xA;with a good design (for a data visualization) is a hard problem &amp;ndash; there are a&#xA;few thumb rules and philosophical guidelines on how to come up with one, but&#xA;there are no silver bullets to come up with a good design for every scenario.&lt;/p&gt;&#xA;&lt;p&gt;He makes the case for a process that lets you efficiently try out a lot of&#xA;designs to see what works and what doesn&amp;rsquo;t. In the latter part of his talk he&#xA;goes on to demo an internal tool at NYT called Preview, that they use view,&#xA;explore and contribute to each others&amp;rsquo; work. I hoped that in the two years since&#xA;the talk was given, this tool would&amp;rsquo;ve been open-sourced, but it was not to be.&lt;/p&gt;&#xA;&lt;p&gt;So, I started working on my own project, also called &lt;a href=&#34;https://github.com/punchagan/preview&#34;&gt;Preview&lt;/a&gt;, that has a similar&#xA;set of features to those described in the talk. Even if I am not working in a&#xA;visualization team, I think it would be pretty useful to have such a tool to&#xA;explore the work of other people to learn more about their process, when coming&#xA;up with a visualization/design.&lt;/p&gt;&#xA;&lt;p&gt;Currently, Preview lets you keep track of all the repositories of a single&#xA;user/organisation on GitHub. Any repository with an &lt;code&gt;index.html&lt;/code&gt; file is assumed&#xA;to be a repository of interest, and tracked.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/ox-hugo/repo-listing.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;It also lets you view the screenshots for a repository over all the commits in&#xA;the repository. This is intended to be some sort of a visual version of git log.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/ox-hugo/screenshots-delhi-traffic-story.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;You can also view any repository at the latest commit on any branch.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://punchagan.muse-amuse.in/ox-hugo/preview-branches.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;The tool is pretty new and quite brittle right now, but already quite functional&#xA;and useful, I think. If you do give it a spin, I&amp;rsquo;d love to hear your comments&#xA;and feedback.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Say Howdy with Emacs!</title>
      <link>https://punchagan.muse-amuse.in/blog/say-howdy-with-emacs/</link>
      <pubDate>Thu, 28 May 2015 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/say-howdy-with-emacs/</guid>
      <description>&lt;p&gt;Staying in touch with people is something I&amp;rsquo;m not very good at.  Since I am not&#xA;on popular (among my friends/family) networks &amp;ndash; FB and Whatsapp &amp;ndash; I don&amp;rsquo;t&#xA;even see random updates from people, to get some sense of being in touch.&lt;/p&gt;&#xA;&lt;p&gt;I recently read some old posts by Sacha Chua and was inspired by how much code&#xA;she had for &lt;a href=&#34;http://sachachua.com/blog/category/geek/emacs/bbdb/&#34;&gt;contact management&lt;/a&gt; in her old blog posts.  I was inspired by &lt;a href=&#34;http://sachachua.com/blog/2005/05/keeping-in-touch/&#34;&gt;this&#xA;post&lt;/a&gt; in particular to try and be more meticulous about how I stay in touch with&#xA;people. Michael Fogleman &lt;a href=&#34;https://mwfogleman.github.io/posts/08-01-2015-emacs-can-keep-in-touch.html&#34;&gt;blogged&lt;/a&gt; about his contact management work-flow using&#xA;&lt;code&gt;keepintouch&lt;/code&gt;. It seemed to do most of what I wanted, but I wanted this to be&#xA;integrated with my &lt;code&gt;org-contacts-db&lt;/code&gt; and I felt having native elisp code would&#xA;make it easier to hook up email, chat, etc. to this.&lt;/p&gt;&#xA;&lt;p&gt;I ended up writing a small utility called &lt;a href=&#34;https://github.com/punchagan/howdy/&#34;&gt;howdy&lt;/a&gt; to help me keep in touch with&#xA;people. It currently has only a couple of features:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;kbd&gt;M-x howdy&lt;/kbd&gt; lets me update the last contacted timestamp for a contact.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Shows me contacts that I&amp;rsquo;m out of touch in the agenda, once I add the&#xA;following snippet to an agenda file.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-org&#34; data-lang=&#34;org&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;​* Howdy&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  %%(howdy-howdy)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I also have a few hooks to hook up jabber messages and email to update the db.&#xA;I&amp;rsquo;ve added them to &lt;code&gt;howdy-hooks.el&lt;/code&gt; in case anybody else wants to use them.&#xA;They can also be used as examples to write other hooks. Feel free to contribute&#xA;other hooks or suggest improvements.  The library also ships with a modest test&#xA;suite, that will hopefully make it easier for others to contribute.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m looking forward to experimenting with this over the next few weeks and&#xA;improving it. Hopefully, it&amp;rsquo;ll help me keep in touch, better than I do now.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Martin Fowler on Refactoring @ RubyRogues</title>
      <link>https://punchagan.muse-amuse.in/blog/martin-fowler-on-refactoring-rubyrogues/</link>
      <pubDate>Sat, 25 Oct 2014 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/martin-fowler-on-refactoring-rubyrogues/</guid>
      <description>&lt;p&gt;I stumbled on a &lt;a href=&#34;http://rubyrogues.com/178-rr-book-club-refactoring-ruby-with-martin-fowler/&#34;&gt;Ruby Rogues podcast&lt;/a&gt; yesterday, which had &lt;a href=&#34;http://martinfowlwer.com&#34;&gt;Martin Fowler&lt;/a&gt; as the&#xA;guest.  I really enjoyed the discussion on Refactoring (the noun, the verb and&#xA;the book!)&lt;/p&gt;&#xA;&lt;p&gt;Martin clarified in the podcast that refactoring (the verb/process) is a&#xA;sequence of very small refactorings, while you keep making sure that you can&#xA;run the test suite always.  A refactoring (noun) is a change where you change&#xA;the structure of the code without any externally observable changes, with the&#xA;intent of making it easier to understand and cheaper to change in future.&lt;/p&gt;&#xA;&lt;p&gt;I also really liked the metaphor of a &amp;lsquo;healthy code base&amp;rsquo;.  Refactoring is,&#xA;then, the process of keeping healthy &amp;ndash; exercise, speaking metaphorically.  You&#xA;can stack up all the exercise you need to do, until you get really unfit.&#xA;Refactoring, similarly, needs to be done regularly, to keep the code base&#xA;healthy.  This lets you go faster, in the future.&lt;/p&gt;&#xA;&lt;p&gt;I also really liked the advise about trying to push back the mental contexts&#xA;you build, while trying to debug/understand some code that is not very clear,&#xA;by refactoring the code to make it clearer.  Code needn&amp;rsquo;t be one big chunk of&#xA;cryptographic text.  Code is writing.  It should be clear and understandable.&#xA;Or, at least we should strive to make it so!&lt;/p&gt;&#xA;&lt;p&gt;The discussion, as always on this podcast, was very lively, pleasant and&#xA;enjoyable! Enjoy!&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Simple org-clock and gnome/pidgin integration</title>
      <link>https://punchagan.muse-amuse.in/blog/simple-org-clock-and-gnomepidgin-integration/</link>
      <pubDate>Wed, 22 Oct 2014 16:43:35 -0400</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/simple-org-clock-and-gnomepidgin-integration/</guid>
      <description>&lt;p&gt;&lt;strong&gt;See update &lt;a href=&#34;#orge999abb&#34;&gt;below&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I have been trying to get back to using org-mode and its clocking&#xA;functionality, more often than not.  I used to use it a lot, a few years ago,&#xA;and haven&amp;rsquo;t been using it, since I had been in my last job.&lt;/p&gt;&#xA;&lt;p&gt;To help with it, I decided to integrate clocking in and out with changing&#xA;status on Pidgin, and turning notifications on and off in Gnome.  Here&amp;rsquo;s a few&#xA;lines of code that does this for me.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defadvice&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;org-clock-in&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;after&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;pc/org-clock-in&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kp&#34;&gt;&amp;amp;optional&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;select&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;start-time&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;Turn gnome notifications off.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;dbus-send-signal&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;nb&#34;&gt;:session&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;org.gnome.SessionManager&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;/org/gnome/SessionManager/Presence&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;org.gnome.SessionManager.Presence&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;SetStatus&amp;#34;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;shell-command&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;purple-remote setstatus?status=unavailable&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defadvice&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;org-clock-out&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;after&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;pc/org-clock-out&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kp&#34;&gt;&amp;amp;optional&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;switch-to-state&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;fail-quietly&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;at-time&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;Turn gnome notifications back on.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;dbus-send-signal&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;nb&#34;&gt;:session&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;org.gnome.SessionManager&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;/org/gnome/SessionManager/Presence&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;org.gnome.SessionManager.Presence&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;SetStatus&amp;#34;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;shell-command&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;purple-remote setstatus?status=available&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;update-span-class-timestamp-wrapper-span-class-timestamp-and-lt-2014-11-01-sat-and-gt-span-span&#34;&gt;Update &lt;span class=&#34;timestamp-wrapper&#34;&gt;&lt;span class=&#34;timestamp&#34;&gt;&amp;lt;2014-11-01 Sat&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://baali.muse-amuse.in&#34;&gt;@baali&lt;/a&gt; tried to use my code, and it turns out it didn&amp;rsquo;t work for him, because I&#xA;forgot to mention that &lt;code&gt;(ad-activate &#39;org-clock-in)&lt;/code&gt; needs to be run, after the&#xA;&lt;code&gt;defadvice&lt;/code&gt; code.  I have no idea how it worked for me, without doing that.&#xA;May be because I have &lt;code&gt;defadvice&lt;/code&gt; for other functions?&lt;/p&gt;&#xA;&lt;p&gt;Also, while debugging this, I found that &lt;code&gt;defadvice&lt;/code&gt; is a deprecated way of&#xA;doing this, and &lt;code&gt;add-function&lt;/code&gt; is the way to go now.  But, instead of advising&#xA;the function, I decided to make use of &lt;code&gt;org-clock-in-hook&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Here is the new code.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defun&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;pc/turn-off-notifications&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;Turn gnome notifications off.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;dbus-send-signal&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;nb&#34;&gt;:session&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;org.gnome.SessionManager&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;/org/gnome/SessionManager/Presence&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;org.gnome.SessionManager.Presence&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;SetStatus&amp;#34;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;shell-command&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;purple-remote setstatus?status=unavailable&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defun&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;pc/turn-on-notifications&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;Turn gnome notifications back on.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;dbus-send-signal&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;nb&#34;&gt;:session&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;org.gnome.SessionManager&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;/org/gnome/SessionManager/Presence&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;org.gnome.SessionManager.Presence&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;s&#34;&gt;&amp;#34;SetStatus&amp;#34;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;shell-command&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;purple-remote setstatus?status=available&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;add-hook&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;org-clock-in-hook&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;pc/turn-off-notifications&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;add-hook&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;org-clock-out-hook&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;pc/turn-on-notifications&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Recurse Center, 2014-07-06</title>
      <link>https://punchagan.muse-amuse.in/recurse-center/recurse-center-2014-07-06/</link>
      <pubDate>Mon, 07 Jul 2014 23:28:39 -0400</pubDate>
      <guid>https://punchagan.muse-amuse.in/recurse-center/recurse-center-2014-07-06/</guid>
      <description>&lt;p&gt;I took it easy during the weekend, and went on a nice camp with my a cousin&amp;rsquo;s&#xA;family to TobyHanna State Park for a day or so, and spent the remaining (long)&#xA;weekend at their place in PA.  It was a pretty nice break!&lt;/p&gt;&#xA;&lt;p&gt;Yesterday evening, I talked to Madhu about how ugly my code looked while I was&#xA;trying to use &lt;code&gt;libclang&lt;/code&gt;, and he told me that he found a lot of wrapped C++/C&#xA;libraries end up being that way, and I also realized that using the Python AST&#xA;library seemed much cleaner, because it just contained Python objects, but&#xA;representing C/C++ objects in an AST and interacting with them in Python, isn&amp;rsquo;t&#xA;that clean.&lt;/p&gt;&#xA;&lt;p&gt;I cleaned up my code, and removed all the ugly regexes to use libclang to do&#xA;the parsing of the libs, and get the source code.  I basically got all the&#xA;tests passing, but they were taking an order of magnitude longer to run.  So, I&#xA;guess the next step is to cache things somehow.&lt;/p&gt;&#xA;&lt;p&gt;I also added support for viewing the sources of built-in types.  It was pretty&#xA;simple, once I had everything working with libclang.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>A smarter 404 page</title>
      <link>https://punchagan.muse-amuse.in/blog/a-smarter-404-page/</link>
      <pubDate>Mon, 11 Nov 2013 12:36:53 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/a-smarter-404-page/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://twitter.com/avudem&#34;&gt;Voodoo&lt;/a&gt; found a broken link referring to a one of my posts, on Quora.&#xA;Given that I have changed my site generator a bunch of times now, it&#xA;is quite possible that there are other broken links at various other&#xA;places.  So, I implemented a smart &lt;a href=&#34;https://punchagan.muse-amuse.in/hack&#34;&gt;404 page&lt;/a&gt; for the site, yesterday.&#xA;It is very similar to something I came across on &lt;a href=&#34;http://brettterpstra.com/2013/04/07/fun-with-intelligent-404-pages/&#34;&gt;brettterpstra&lt;/a&gt;&amp;rsquo;s site.&#xA;I just hooked up &lt;a href=&#34;http://kiro.me/projects/fuse.html&#34;&gt;fuse.js&lt;/a&gt; with Nikola&amp;rsquo;s &lt;a href=&#34;http://getnikola.com/handbook.html#local-search&#34;&gt;tipue-search plugin&lt;/a&gt;&amp;rsquo;s output&#xA;file.  My glue code essentially, just figures out the search term from&#xA;the URL, performs a Fuse search on the json data created by Nikola&amp;rsquo;s&#xA;search plugin, and returns a list of top 5 results.  It just took me&#xA;about an hour to write, but is pretty useful, I think.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://punchagan.muse-amuse.in/hack&#34;&gt;(View source of the 404 page)&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Bookmarks and Quotes plugin</title>
      <link>https://punchagan.muse-amuse.in/blog/bookmarks-and-quotes-plugin/</link>
      <pubDate>Sat, 19 Oct 2013 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/bookmarks-and-quotes-plugin/</guid>
      <description>&lt;p&gt;I used to have a separate page for bookmarks and quotes on the old&#xA;blog.  They will now be shared as regular posts with 5 or more&#xA;bookmarks/quotes.  I use a bookmarklet in my browser to capture links&#xA;to an org-file using org-capture protocol and then I have a small&#xA;plugin to Nikola, that looks at such captured bookmarks and quotes and&#xA;makes new posts out of them.  This workflow is inspired by Brett&#xA;Trepestra&amp;rsquo;s &lt;a href=&#34;http://brettterpstra.com/2013/01/15/a-web-excursions-system-for-static-blogs/&#34;&gt;web excursions&lt;/a&gt; plugin.&lt;/p&gt;&#xA;&lt;p&gt;The plugin is currently a part of my blog source, and not published to&#xA;Nikola&amp;rsquo;s plugin repository since it is very specific to my setup.  But&#xA;if anybody is interested, I can publish the code somewhere public.&lt;/p&gt;&#xA;&lt;p&gt;If you are interested to get these links and bookmarks into your feed reader,&#xA;you can subscribe to their feed: [quotes], &lt;a href=&#34;https://punchagan.muse-amuse.in/tags/cat_bookmarks.xml&#34;&gt;bookmarks&lt;/a&gt;.  These posts will also&#xA;make it to the main feed, though.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE &lt;span class=&#34;timestamp-wrapper&#34;&gt;&lt;span class=&#34;timestamp&#34;&gt;[2015-11-15 Sun 20:45]&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The quotes feed no longer exists!&lt;/li&gt;&#xA;&lt;li&gt;The bookmarks feed doesn&amp;rsquo;t really get too many updates. I use pinboard for my&#xA;bookmarks, now.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
    </item>
    <item>
      <title>GitHub Cue: Recommendations for GitHub Repos</title>
      <link>https://punchagan.muse-amuse.in/blog/github-cue-recommendations-for-github-repos/</link>
      <pubDate>Fri, 05 Aug 2011 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/github-cue-recommendations-for-github-repos/</guid>
      <description>&lt;p&gt;If you aren&amp;rsquo;t already aware of it, I&amp;rsquo;m one of those people who&#xA;goes around saying, &amp;ldquo;GitHub is my Facebook&amp;rdquo;.  I spend quite a lot&#xA;of time on GitHub, browsing the work of various people, looking at&#xA;loads of interesting stuff that people built.  I keep jumping&#xA;between people pages and projects using the Watchers/Watching &amp;amp;&#xA;Followers/Following pages.  This way, I do come across interesting&#xA;people and projects, but the SNR is too low.  I wanted a better&#xA;way to be able to see stuff, that I find interesting.  That&amp;rsquo;s how&#xA;the idea for this Chromium app &amp;ndash; GitHub Cue &amp;ndash; was born.&lt;/p&gt;&#xA;&lt;p&gt;@baali and I hacked on this, during the last few days and got it&#xA;working.  It works as follows, (from the README) &amp;mdash;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Scrapes all the descriptions of the repositories being watched&#xA;by the user.&lt;/li&gt;&#xA;&lt;li&gt;Key terms are extracted from this description text using the&#xA;Yahoo Term Extractor.&lt;/li&gt;&#xA;&lt;li&gt;A list of languages is obtained, based on the languages of the&#xA;repositories, the user if watching.&lt;/li&gt;&#xA;&lt;li&gt;GitHub searches are performed for a combination of 3 randomly&#xA;chosen languages and 5 random key terms.&lt;/li&gt;&#xA;&lt;li&gt;10 random repositories out of all these, are shown.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This is a very simplistic algorithm, but works decently for my&#xA;purposes.  Ideally, I would&amp;rsquo;ve liked to use a Collaborative&#xA;Filtering algorithm, but I found the data to be too sparse, and&#xA;the amount of computation to be too much to be done on the fly.  I&#xA;wasn&amp;rsquo;t really interested in pre-computing stuff and putting it&#xA;onto my server.  I settled down to the next best thing I could&#xA;think of.&lt;/p&gt;&#xA;&lt;p&gt;I would appreciate any further ideas and suggestions.  Thanks!&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>GetHub: Chrome Notifications for Github updates</title>
      <link>https://punchagan.muse-amuse.in/blog/gethub-chrome-notifications-for-github-updates/</link>
      <pubDate>Wed, 02 Mar 2011 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/gethub-chrome-notifications-for-github-updates/</guid>
      <description>&lt;p&gt;Over the last two days, I hacked up my first Chrome extension.&#xA;I&amp;rsquo;ve been using Chrome only for the past couple of weeks or so and&#xA;I begin to like it, though some of the extensions aren&amp;rsquo;t as mature&#xA;as I would&amp;rsquo;ve liked.&lt;/p&gt;&#xA;&lt;p&gt;The original idea was floated by my friend,  Madhu, and Lee helped&#xA;me quite a bit, while I was working on it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-does-it-do&#34;&gt;What does it do?&lt;/h2&gt;&#xA;&lt;p&gt;It is a simple extension, that shows pop-ups, whenever there is&#xA;an update in your GitHub &amp;ldquo;Wall&amp;rdquo; (yes, this is a Facebook world)&#xA;or News Feed as they call it.&lt;/p&gt;&#xA;&lt;p&gt;After installation, you will need to save your &lt;code&gt;username&lt;/code&gt; and&#xA;&lt;code&gt;token&lt;/code&gt; for the extension to work.&lt;/p&gt;&#xA;&lt;h2 id=&#34;where-to-get-it&#34;&gt;Where to get it?&lt;/h2&gt;&#xA;&lt;p&gt;Presently, you will need to get it from GitHub.&lt;/p&gt;&#xA;&lt;p&gt;I might add it to the Chrome Web Store, once I see more people&#xA;using it.  I couldn&amp;rsquo;t justify, to myself, paying the initial&#xA;one-time verification fee that Google asks for.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: &lt;span class=&#34;timestamp-wrapper&#34;&gt;&lt;span class=&#34;timestamp&#34;&gt;[2011-03-04 Fri] &lt;/span&gt;&lt;/span&gt; Added GetHub to the store&lt;/p&gt;&#xA;&lt;h2 id=&#34;comments-and-feedback&#34;&gt;Comments and Feedback&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Feel free to write to me at &lt;code&gt;punchagan+gethub@jeemail.com&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Or file issues at GitHub.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Happy GitHubbing!&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Git powered wikis improved: My bit</title>
      <link>https://punchagan.muse-amuse.in/blog/git-powered-wikis-improved-my-bit/</link>
      <pubDate>Fri, 04 Feb 2011 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/git-powered-wikis-improved-my-bit/</guid>
      <description>&lt;p&gt;I accidentally came across the blog-post Git-powered wikis&#xA;improved - GitHub. And this particular paragraph caught my&#xA;eye:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;The new editor has the capability to support every markup&#xA;language that GitHub Wikis support. If you&amp;rsquo;re a fan of Markdown,&#xA;Textile, pod or RDoc, the function bar buttons (e.g. bold,&#xA;italic, underline, etc.) will now work. We&amp;rsquo;ve even written brand&#xA;new inline help for many of GitHub Wiki&amp;rsquo;s supported markup&#xA;languages.&lt;/p&gt;&#xA;&lt;p&gt;The language definitions the editor uses are JSON-based and easy&#xA;to edit. If you&amp;rsquo;d like us to support a markup language that we&#xA;don&amp;rsquo;t currently support, Gollum, GitHub&amp;rsquo;s wiki software, is&#xA;entirely open source &amp;ndash; fork our code and send us a pull request&#xA;with changes that support your choice language.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I sent a quick patch for org-mode in the function bar, and it has&#xA;been accepted.  :)&lt;/p&gt;&#xA;&lt;p&gt;If not anything more, I hope, at least a couple of curious people&#xA;will explore org-mode and find it useful.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Raise windows (on current desktop) xdotool &amp; bash</title>
      <link>https://punchagan.muse-amuse.in/blog/raise-windows-on-current-desktop-xdotool-bash/</link>
      <pubDate>Sat, 06 Nov 2010 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/raise-windows-on-current-desktop-xdotool-bash/</guid>
      <description>&lt;p&gt;I posted a snippet &lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; of python code that used xdotool to&#xA;raise windows.  I got one patch from dusual &lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; that&#xA;enabled raising of windows in the current workspace only.&lt;/p&gt;&#xA;&lt;p&gt;More importantly, Jordan gave a one-liner &lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt; in bash,&#xA;that could do the same thing as my long and elaborate python&#xA;snippet.  I had a feeling that this would be much shorter in bash,&#xA;but I don&amp;rsquo;t feel comfortable writing bash scripts. :P&lt;/p&gt;&#xA;&lt;p&gt;Below is a bash snippet that tries to incorporates both the&#xA;changes. :)&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;found&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; win in &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;xdotool search --class &lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;xdotool get_desktop_for_window &lt;span class=&#34;nv&#34;&gt;$win&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt; -eq &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;xdotool get_desktop&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;then&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;found&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;1&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; break&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$found&lt;/span&gt; -eq &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt; xdotool windowactivate &lt;span class=&#34;nv&#34;&gt;$win&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: When you&amp;rsquo;ve visual effects enabled (the default option on&#xA;Ubuntu), getting the current desktop/workspace doesn&amp;rsquo;t work,&#xA;probably because Root Window properties are being messed around by&#xA;it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Note2&lt;/strong&gt;: &lt;code&gt;search&lt;/code&gt; takes an option &lt;code&gt;--screen&lt;/code&gt;. It&amp;rsquo;d be nice if it&#xA;also had an option &lt;code&gt;--desktop&lt;/code&gt;.  This task could then be done in&#xA;a one-liner.&lt;/p&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;My python snippet&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:2&#34;&gt;&#xA;&lt;p&gt;dusual on twitter&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li id=&#34;fn:3&#34;&gt;&#xA;&lt;p&gt;Jordan&amp;rsquo;s one liner&amp;#160;&lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>A couple of counting functions</title>
      <link>https://punchagan.muse-amuse.in/blog/a-couple-of-counting-functions/</link>
      <pubDate>Fri, 17 Sep 2010 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/a-couple-of-counting-functions/</guid>
      <description>&lt;p&gt;I had a strict character limit of 180 chars for something I was&#xA;writing. I just wrote a simple function to count characters in a&#xA;region or a buffer. Another function to count the words.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defun&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;count-chars&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;Count the number of chars in a buffer or region.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;interactive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;let*&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;beg&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;region-active-p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;region-beginning&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;point-min&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;         &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;end&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;region-active-p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;region-end&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;point-max&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;         &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;number-to-string&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;end&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;beg&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defun&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;count-words&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;Count the number of words in a buffer or region.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;interactive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;let*&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;beg&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;region-active-p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;region-beginning&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;point-min&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;         &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;end&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;region-active-p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;region-end&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;point-max&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;         &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;count&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;save-excursion&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;goto-char&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;beg&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;while&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;point&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;end&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;forward-word&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setq&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;count&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;1+&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;count&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;int-to-string&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;count&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>org/elisp - sorting list of org-links on description</title>
      <link>https://punchagan.muse-amuse.in/blog/orgelisp-sorting-list-of-org-links-on-description/</link>
      <pubDate>Fri, 20 Aug 2010 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/orgelisp-sorting-list-of-org-links-on-description/</guid>
      <description>&lt;p&gt;A small utility function that I used to sort the names of people&#xA;who commented on my blog.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defun&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;org-get-link-desc-from-list&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&amp;#34; Get link description of a list item containing just links &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;let*&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;item-beg&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;point&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;item-end&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-end-of-item&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;cur-item&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;buffer-substring-no-properties&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                  &lt;span class=&#34;nv&#34;&gt;item-beg&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;item-end&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;goto-char&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;item-beg&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-columns-compact-links&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;cur-item&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;sort-lines&lt;/code&gt; wasn&amp;rsquo;t good enough for me, since it was sorting&#xA;alphabetically and it ended up being the sorted order of the urls&#xA;and not the names. This function, when used with&#xA;&lt;code&gt;org-sort-entries-or-items&lt;/code&gt; gave me what I wanted.&lt;/p&gt;&#xA;&lt;p&gt;Thanks to benny (on #org-mode), I also learnt the difference&#xA;between &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;let*&lt;/code&gt;.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Refile to date-tree</title>
      <link>https://punchagan.muse-amuse.in/blog/refile-to-date-tree/</link>
      <pubDate>Fri, 30 Jul 2010 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/refile-to-date-tree/</guid>
      <description>&lt;p&gt;Useful to refile notes to the journal file, which is a&#xA;date-tree. &lt;code&gt;org-refile&lt;/code&gt; isn&amp;rsquo;t convenient to refile stuff to a&#xA;date-tree.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-emacs-lisp&#34; data-lang=&#34;emacs-lisp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defun&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;my/org-refile-to-journal&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;Refile an entry to journal file&amp;#39;s date-tree&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;interactive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;require&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;org-datetree&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;journal&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;expand-file-name&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;journal.org&amp;#34;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;org-directory&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setq&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;or&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-entry-get&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;point&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;TIMESTAMP_IA&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                        &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-entry-get&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;point&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;TIMESTAMP&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setq&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;nthcdr&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;parse-time-string&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setq&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;list&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;cadr&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                          &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;car&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                          &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;caddr&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-cut-subtree&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;with-current-buffer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;or&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;find-buffer-visiting&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;journal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                             &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;find-file-noselect&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;journal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;save-excursion&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-datetree-file-entry-under&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;current-kill&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;post-date&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;bookmark-set&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;org-refile-last-stored&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;Refiled to %s&amp;#34;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;journal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setq&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;this-command&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;my/org-refile-to-journal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;defun&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;my/org-agenda-refile-to-journal&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s&#34;&gt;&amp;#34;Refile the item at point to journal.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;interactive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;let*&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;marker&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;or&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-get-at-bol&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;org-hd-marker&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                     &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-agenda-error&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;         &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;buffer&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;marker-buffer&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;marker&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;         &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;pos&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;marker-position&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;marker&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;with-current-buffer&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;buffer&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;save-excursion&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;save-restriction&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;widen&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;goto-char&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;marker&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-remove-subtree-entries-from-agenda&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;my/org-refile-to-journal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-agenda-redo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-defkey&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;org-agenda-mode-map&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;kbd&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;C-c C-S-w&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;my/org-agenda-refile-to-journal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;org-defkey&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;org-mode-map&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;kbd&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;C-c C-S-w&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;my/org-refile-to-journal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Enjoy!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Update &lt;span class=&#34;timestamp-wrapper&#34;&gt;&lt;span class=&#34;timestamp&#34;&gt;[2016-06-16 Thu]&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt; &lt;a href=&#34;https://twitter.com/raamdev&#34;&gt;Raam Dev&lt;/a&gt; pointed me to an &lt;a href=&#34;http://emacs.stackexchange.com/questions/21322/preventing-org-cut-subtree-from-appending-subsequent-cuts-to-previous-kill-ring&#34;&gt;issue&lt;/a&gt; and a suggested fix, that&#xA;I have updated the above code with.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Thanks Sacha</title>
      <link>https://punchagan.muse-amuse.in/blog/thanks-sacha/</link>
      <pubDate>Fri, 30 Jul 2010 00:00:00 +0530</pubDate>
      <guid>https://punchagan.muse-amuse.in/blog/thanks-sacha/</guid>
      <description>&lt;p&gt;I just wanted to thank Sacha Chua for bearing with my newbie elisp&#xA;code and trying out org2blog.&lt;/p&gt;&#xA;&lt;p&gt;Also, thanks for the two patches she sent.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Feature addition - Posting sub-trees instead of whole buffers.&#xA;I had this feature in mind, and had started working on it after&#xA;her request, but she was too quick for me! ;)&lt;/li&gt;&#xA;&lt;li&gt;Cleaning up of the code that uploads images.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I&amp;rsquo;m loving it!&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
