Ads by Google

Thursday, December 8, 2011

Monday, December 5, 2011

The History of Unix

Just stumbled on this fantastic IEEE article on the The Strange Birth and Long Life of Unix;  A fantastic read, worth the 15 minutes of time in knowing how Unix came about.

Unix: an emasculated version of Multics!

Thursday, December 1, 2011

Third Emacs pretest out

The third Emacs pretest is now out.  Binaries and tarballs can be found here.  The NEWS file will have the list of changes.

Moving buffers between windows

If you're new to emacs, it might be a good idea to read this post to know the difference between frames and windows before you can follow this post.

I had to do some fair amount of coding recently with lots of interlinked files.  With so many windows open and with my limited screen estate, I soon settled on a 3 window layout with the screen split horizontally and the top half split again into 2.  This way I could read code flowing off to the right on the bottom half while referring to the called functions in the other 2 windows on top.


But I soon found myself switching to those buffers to read a bit more on the definitions and losing my window layout.  A quick ask on gnu.emacs.help turned up this emacswiki page, the last elisp function that I reproduce below was perfect for my needs.

(defun rotate-windows ()
  "Rotate your windows"
  (interactive)
  (cond ((not (> (count-windows)1))
     (message "You can't rotate a single window!"))
    (t
     (setq i 1)
     (setq numWindows (count-windows))
     (while  (< i numWindows)
       (let* (
          (w1 (elt (window-list) i))
          (w2 (elt (window-list) (+ (% i numWindows) 1)))
         
          (b1 (window-buffer w1))
          (b2 (window-buffer w2))
         
          (s1 (window-start w1))
          (s2 (window-start w2))
          )
         (set-window-buffer w1  b2)
         (set-window-buffer w2 b1)
         (set-window-start w1 s2)
         (set-window-start w2 s1)
         (setq i (1+ i)))))))


There are a number of other options available too as mentioned by Sundar Vasan in his post. They give your more options and key bindings to use.

Monday, November 28, 2011

Gnus Tip: Customising the position of point when replying

If you have a need to top post or inline or below the mail depending on whom and where you're replying to, Gnus allows you to customise it by setting message-cite-reply-position whose doc string is reproduced below

message-cite-reply-position is a variable defined in `message.el'.
Its value is traditional
Documentation:
*Where the reply should be positioned.
If `traditional', reply inline.
If `above', reply above quoted text.
If `below', reply below quoted text.
Note: Many newsgroups frown upon nontraditional reply styles. You
probably want to set this variable only for specific groups,
e.g. using `gnus-posting-styles':

  (eval (set (make-local-variable 'message-cite-reply-above) 'above))

I've highlighted the warning just in case you missed it. :-)

Hat tip to Eric Abrahamsen's reply to a poster.  And in his post, you can see an example customisation of gnus-posting-styles to do group specific behaviour of reply.

Friday, November 4, 2011

VimOrganizer, an Org-mode clone in Vim

I seemed to have missed this announcement.  For vim users, apparently, there is a way of using vim with org-mode.  The good news is that you use vim, the bad news is that it does use Emacs at the backend to work on the files. :-)

The relevant links are
An intro to some of the stuff in the new version is here:
https://github.com/hsitz/VimOrganizer/blob/master/intro.txt
Git page is here:
https://github.com/hsitz/VimOrganizer

And the page on Vim's website is here:
http://www.vim.org/scripts/script.php?script_id=3342

Wednesday, November 2, 2011

Second Emacs Pretest Available

The second Emacs Pretest is now available for testing.  The windows build announcement can be found here.   The link on the right, next to the popular posts links you to the Windows binaries.

Tuesday, November 1, 2011

It's these little things....in Emacs

You know why I continue to use emacs?  It's those little things that DTRT.  So, here I am looking at some octave code and trying to look at a function definition in another file.

% Randomly select 100 data points to display
rand_indices = randperm(m);
sel = X(rand_indices(1:100), :);

displayData(sel);
^Point is here
fprintf('Program paused. Press enter to continue.\n');
pause;


Any other editor, I'd have to do one or the other; Go to File-->Open.... or switch to Explorer view and open the file by double clicking on it.

In Emacs, I just do M-x ffap at point and it simply prompts me with the completed file name and waits for me to hit RET.

Awesome.

Sunday, October 30, 2011

Searching the Internet from any buffer in Emacs

From the post here by Peter Munster, here's a method to search for any keyword that you're reading in the emacs buffer.

(defun pm/region-or-word (prompt)
  "Read a string from the minibuffer, prompting with PROMPT.
If `transient-mark-mode' is non-nil and the mark is active,
it defaults to the current region, else to the word at or before
point. This function returns a list (string) for use in `interactive'."
  (list (read-string prompt (or (and transient-mark-mode mark-active
                                     (buffer-substring-no-properties
                                      (region-beginning) (region-end)))
                            (current-word)))))
 
(defun pm/google (string)
  "Ask a WWW browser to google string.
Prompts for a string, defaulting to the active region or the current word at
or before point."
  (interactive (pm/region-or-word "Google: "))
  (browse-url (concat "http://google.com/search?num=100&q=" string)))

This will work if you have set

;;point to the appropriate browser
(setq browse-url-firefox-program "C:/Program Files/Mozilla Firefox/firefox.exe")

(setq browse-url-browser-function 'browse-url-firefox
          browse-url-new-window-flag nil
          browse-url-firefox-new-window-is-tab t)


Put this in your .emacs and when you see a word or highlight a region, issue a M-x pm/google (you can rename the function to a mnemonic, if you want to) and it will search for the word before point or region in google.  You probably would want to change the search engine if you want to some other search.

Friday, October 21, 2011

Direct links to mail messages in Gmail through Org-mode

Here's something I didn't know was possible.  It's possible for org-mode links to point to Gmail's individual emails.  This thread on the list outlines the different options and caveats to do it from various posters.

And do note this post on how to refer to individual mail messages in the most general case.

Thursday, October 20, 2011

Sunday, October 16, 2011

Emacs Column Editing Cua Mode

Not sure whether it's been seen before but here goes.


Generating PNG images of math equations in LaTeX

This is an interesting thread  on comp.text.tex, which discusses various options of generating PNG images of your LaTeX math equations.  Useful when you want to embed in a webpage or Word documents (at least compared to the built-in option).

Tuesday, October 4, 2011

Emacs Poll on the DEL key

This might look a bit weird for some OS users but if you want to influence Emacs key chord behaviour implementation for the DEL key, now is the time to get involved.  I quote partially from the post by Dr. Richard Stallman

In Emacs 24, now in pretest, a change is being considered for ASCII DEL (on most keyboards, the Backspace key) and the Delete function key.  The change affects the case of an active region that was not dragged with the mouse.  The change is that these commands would delete the region, rather than just one character as now.

Read the post and thread in full (search for poll) and drop your feedback to the asked questions to the mail id listed in the post.  And spread the word.

Monday, September 26, 2011

First Emacs Pretest Out

From the emacs-dev list, here's the announcement of what will eventually be 24.1.  To see what's new check here.  Thanks to Eli Zaretskii for pointing it out.

Friday, September 23, 2011

Getting python-mode completion to work in Emacs

If you have issues with getting python-mode completion to work in the Windows port of Emacs, this post might be of help.

Monday, September 19, 2011

A beta launch that may end in failure for google+

I believe google+ is headed for an also ran status against Facebook.   I wish I were wrong but I don't see anything dramatic that would cause people to come to google+ in droves.  (Well, they could, if Zuckerberg says something silly about users' intelligence and privacy again)

I think the biggest mistake was to launch google+ without a complete superset of features of facebook  plus the things google wanted. 

Think about it, if the experience is not seamless and does not do it the way facebook users think it should, why would they shift? Unequivocally, their target is facebook users and not new users.  if it's going to woo them, the system had better be complete for them to use it like before and better.  Unlike Gmail, which was in beta for quite some time where features were slowly added/removed before removing the covers, google+ should have been compelling in all respects to sway facebook users from the get go.

Apart from circles and privacy thingy(which sort of backfired with their 'real names' banning fiasco), what exactly is compelling about google+?  On the other hand, if they had apps on facebook(why not?), Ipads, Android phones, Google Apps, Wallet and Merchant services all tied together at the google+ launch, maybe they'd have had a better chance. Currently, curiosity will drive things for a while but most users would drift back to facebook because that's where their friends are and most importantly, facebook does put in the same features as google+, probably the next month or so.  All the less reason to switch to google+.

I don't see how they can improve unless they give some feature to clone the current facebook user data and import into google+ with the least disruption to the user(I mean, the  facebook user allows for some sort of 'import' to their google+ account).  Or just buy Ebay with its Paypal system and turn it into one huge noisy marketplace.

An individual datapoint:  I'm on google+ but not in facebook (where I probably won't register) but all my friends and colleagues are on facebook.  Apart from a few who created their ids(I suspect, just to lock in their name profile in google+), pretty much no activity happens in my google+ account.

Which is saying something about me, my circle or google+ ! :-)

Wednesday, September 7, 2011

The State of Desktop Search

Everyone might be talking about the cloud buzz and all that but there are still a significant lot carrying around laptops and desktops with monstrous hard disks. The Register paper has an interesting article on local search  in the light of Google's dropping support and EOL'ing of Google Desktop software.  The author bemoans the lack of good alternatives or rather the options one has,(if one was not happy with Google Desktop) that at present don't seem to be good enough for the task at hand.

It's not pretty.

We get 2TB HDDs for about $100 and given the hoarder mentality that makes people fill it faster and faster compared to the earlier HDDs, we have a big problem.  An insane amount of file clutter and no good methods to find the document with a specific text, photo or information.


On the XP machine that I use, the local search interface is....well...sad and could do with a dedicated tool to help users search.  A bit strange that Microsoft does not seem to have anything to address this. hmmm...though I vaguely remember seeing some papers on semantic filesystems and other stuff by Microsoft back in the days when NTFS was being hyped about.

The unix find, locate, slocate, rlocate  custom built scripts seem to be what passes for cutting edge for rooting through your HDDs; makes you look victorious in the smugly, sad, nerdy way. Which, truth be told, is what I end up doing when I'm not working with Microsoft files.

I looked up a few pieces of software mentioned in the forums but it all seemed a bit much while a few posters in that forum carped, "organise the stuff beforehand".

Very helpful, that.

What do you use to root through your hard disk?

Seagate FreeAgent GoFlex Desk 2 TB USB 2.0 External Hard Drive STAC2000100 (Black)Western Digital My Passport Essential SE 1 TB USB 3.0/2.0 Ultra Portable External Hard Drive (Black)

Sunday, September 4, 2011

The Land of Lisp music video

Well, I never thought I'd see this sort of thing.  Via Tassilo Horn on Emacs-dev, here's a Lisp Music video.

Sample lyric line ' I eat parentheses for breakfast'.  :-)



Practical Common LispANSI Common LISP

Sunday, August 28, 2011

Thursday, August 25, 2011

CC Mode 5.32 released

Read the announcement here.  It can be downloaded here.
C Primer Plus (5th Edition)C Programming Language (2nd Edition)Introduction to Java Programming, Comprehensive (8th Edition)

Emacs Environment Variables

This probably pertains more to Win32 Emacs than *nix based Emacs as the problems are likely to manifest in Windows where things land up in places where you least expect it.   At least on *nix systems, the process of finding out which configuration files are read is straightforward from  etc to the shell configuration files( .profile, .rc), in that order.

On Windows, I have no idea where things are read and in what order.   So how do we find out what are the values set for HOME, USER etc on Emacs?

M-x getenv will provide a prompt that lists all the set variables.  It comes with completion, so one should be able to see the entire list of set variables that Emacs has read and is using.  So, if you're wondering where the TEMP files are being stored,a M-x getenv RET TEMP would spit out the value stored by Emacs.

So, that's how one queries for the environment variables but how does one go about changing them?

We use M-x setenv to set the values for the session temporarily as in
M-x setenv RET TERM RET dumb

Please note these changes do impact or change the OS set values but is limited to the current Emacs session.  If you want to make those new values available for all future sessions, add something similar to your  .emacs. For e.g. to set the TERM value, do
(setenv "TERM" "emacs")

A good discussion on using the above information to selectively set certain values can be found on this gmane emacs thread.

The process-environment variable has the list of overridden environment variables for subprocesses to inherit launched from within Emacs.  It would get modified by issuing a setenv command. The doc strings for getenv,setenv (by using C-h f ) has more information on their usage.
Windows 7: The Missing ManualLearning the bash Shell: Unix Shell Programming (In a Nutshell (O'Reilly))

Thursday, August 18, 2011

Emacs Speaks Statistics Tutorial

From the org-mode mailing list, here's a tutorial announcement and link to Emacs and ESS tutorial.  You can find the slides and reference cards on ESS and a bit of org-mode for R users at the above site.  And probably invite the author to come and give a talk. :-)

 A First Course in Statistical Programming with RR Cookbook (O'Reilly Cookbooks)

Wednesday, August 10, 2011

Saturday, July 30, 2011

Emacs GPL violation and a mature response

Actually it should read as non compliance but I'll go with what I see on the interwebs.   Anyways, it appears that some grammar files are not included in the distribution and Dr. Stallman rightly acknowledgement the error and suggested a remediation.


What I don't understand is, why people are worked up over this.  It appears to be a mistake and the developers are trying to fix it.  It's not like they bundled it and made a few millions of it and then got pantsed.  I always thought that it'd be a kinder version of 'cease and desist' or else....they themselves stop distribution of their own code.


Anyways, here's another take on the same, mirroring my own views in a more mature fashion.

Friday, July 22, 2011

TeX Live 2011 release available

Looks like the TeXLive 2011 binaries are now available along with a recommendation to do a network install instead of  a iso download and then installing.


Thursday, July 21, 2011

A Visual Guide to Narrowing in Emacs

 Every once in a while, you'd hear someone talk about narrowing in Emacs and you'd wonder what they're talking about.  The idea behind narrowing is that, you might be interested in only a certain portion of the file/buffer you're working on and you'd like to work on that portion alone and nothing else.  Narrowing allows you to do that by simply eliminates from your viewing, any other extraneous lines other than the highlighted ones.  Here's an example


In the screenshot above, let's say I want to work on the rows only upto to 10-Jan-2006 in a file containing 1000s of rows.  Mark the region and hit C-x n n.

 The rest of the lines are gone and only the marked region is left.  Now, you can work on the narrowed region as usual; the normal editing editing commands apply. Once you've completed the changes, you can get your complete buffer back by using C-x n w which widens the buffer or cancels narrowing.  For example, I've changed ABB to XXX in the narrowed region and reverted to the normal buffer by C-x n w.

 That's it. A couple of points are in order. It is disabled by default, so you'd want to enable it by adding the following to your .emacs
;;;enable narrowing
(put 'narrow-to-region 'disabled nil)
If you're confused whether narrowing is in effect or not, the modeline should have the word Narrow in it as a visual indication.  Lastly, the hidden text and lines are not gone even if you save with narrowing in effect, so you really don't need to panic that you've accidently overwritten the entire file or any other pant turding fear!

Friday, July 15, 2011

Gnus Tip: Viewing old messages of the thread

What follows depends on the server's retention policy for messages or articles. On high volume newsgroups, it might not get all the articles.  And it may not be that reliable as the  servers may not thread the articles properly.

The simplest method is to use A T to retrieve the entire thread when the cursor is on a article.  The second option is to use A R which fetches articles that are mentioned in the references header.  And lastly, if you want to find out to which post was the current article you're looking at references, use ^ that fetches the parent article.
 

 These options are available on the Article menu option as you can see in the above screenshot.
 Backup & Recovery: Inexpensive Backup Solutions for Open SystemsPro Data Backup and RecoveryThe Tyranny of E-mail: The Four-Thousand-Year Journey to Your Inbox

Wednesday, July 13, 2011

A new release of PuTTY....after 4 years

From the Putty mailing list, here's the announcement and the list of changes.   For those using cygwin, minTTY is the supposedly the cygwin implementation using some of the same codebase.   MinTTY is part of the cygwin core package, so the new changes may propagate after some time into MinTTY and come through the cygwin update routine.
UNIX and Linux System Administration Handbook (4th Edition)Unix in a Nutshell, Fourth EditionAutomating Linux and Unix System Administration (Expert's Voice in Linux)

Tuesday, July 12, 2011

Open Source Firms: Pawns in Corporate Warfare?

This story on HP support for Enterprise DB is a few days old.  While the article goes into a lot of details on the technical and pricing proposed, the last paragraph caught my eye.


Rather than messing around, HP should buy out IBM's stake in EnterpriseDB and just finally get itself a database of its own to sell. Apotheker has software aspirations, and while he is at it, he should get serious and buy Red Hat, too. That would give HP the operating system, middleware, and database options to counter both Oracle and IBM. While EnterpriseDB has grown decently, from 75 customers in 2006 to nearly 800 by the end of last year, it could grow a lot faster with the HP R&D and sales channel behind it. Buying Red Hat is just obvious.

What does this mean for Open Source firms?  Mostly, the product is being supported probably not on the merits of the technology but possibly on a scorched earth, no prisoners taken battle between big firms.  Sure, they get investments and buyouts but it appears it will be mostly towards warding off competition or a bargaining chip against a short term threat. In hindsight, MySQL and OpenOffice come to my mind though I have no numbers to back up how well they're doing post their purchase in terms of development support or sales.  MySQL I believe was purchased by Sun over disputes with Oracle over Database licenses on multicore chips?

And I wouldn't be surprised if they were let adrift by the firms once their perceived threats have receded.  Since these are open source firms that are acquired with possible community feedback and patches, wonder how the free contributors/ developers would feel about this?

It does remind one of the African saying "When Elephants fight, it's the grass that suffers"
Understanding Open Source and Free Software LicensingThe Innovator's Dilemma: The Revolutionary Book that Will Change the Way You Do Business (Collins Business Essentials)

Sunday, July 10, 2011

Converting Inkscape Svg layers into Beamer overlays

This might be useful for those using Inkscape and know something about Beamer.  If you don't know anything about LaTeX, then this is not going to be useful.  From the project page

takes an Inkscape .svg as input, and generates pdf files corresponding to each of the layers and a LaTeX file that uses the LaTeX Beamer commands to incrementally overlay them. 

If you use Beamer to make your presentations and Inkscape to draw, then this might be potentially useful though I daresay people would tend to use PGF with BeamerPGF examples can be found here.
Presentation Zen: Simple Ideas on Presentation Design and DeliveryThe Presentation Secrets of Steve Jobs: How to Be Insanely Great in Front of Any AudienceTypesetting Tables with LaTeX

Saturday, July 9, 2011

Gnus Tip: Deleting Incoming mail files automatically

When Gnus reads in incoming mail, it stores a copy of the slurped file as Incomingxxxx in the ~/Mail folder as a backup.  These files get deleted by default after 10 days.  If you need to change it to something else or delete it immediately upon reading into Gnus, add the following to your .gnus or gnus.el file.

;;if retrieving from spool, delete temp file after 1 day(s)
(setq mail-source-delete-incoming 1) ;; change 1 to t to immediately delete or any number
(setq mail-source-delete-old-incoming-confirm nil)

More information on these and other options can be found in the Mail Source Customization in the Gnus Manual.

qmailPGP & GPG: Email for the Practical ParanoidThe Book of IMAP: Building a Mail Server with Courier and Cyrus

Friday, July 8, 2011

Gnus Tip: Show unread articles in Summary Buffer

The simplest way to show a mix of read and unread messages in your Summary Buffer is to add the following to the Group Parameters.

((display . 100))

You can change that number which tells Gnus to display the last 100 articles to any number that you want.  And while you're at it, you might as well read the other customisation options to Group Parameters.

The Exim SMTP Mail Server: Official Guide for Release 4sendmail, 4th EditionPro Open Source Mail: Building an Enterprise Mail Solution (Expert's Voice in Open Source)

Thursday, July 7, 2011

Org-mode 7.6 released

From the org-mode mailing lists, a new release of org-mode can be downloaded here or here.

Key new features include OpenDocument support, new keybindings, babel and lilypond support apart from bug fixes.

If you use git, you may have to do a git pull to get the latest.

 Getting Things Done: The Art of Stress-Free ProductivityLeave the Office Earlier: The Productivity Pro Shows You How to Do More in Less Time...and Feel Great About ItYour Creative Brain: Seven Steps to Maximize Imagination, Productivity, and Innovation in Your Life (Harvard Health Publications)

The End of Patents?

In a article titled In a Bill, Wall Street Shows Its Clout, the NYT outlined a bill which is winding its way through the US Congress for approval that outlines a fantastic opt-out-if-i-don't-feel-like-paying by Financial firms.

Now, the issue is not the about the firms themselves but the language in the bill.

Some quotes

The provision even allows “retroactive reviews of approved business method patents, allowing the financial services industry to challenge patents that have already been found valid both at the U.S. Patent and Trade Office and in Federal Court,”
 ...
It covers patents for “a financial product or service” as well as “corresponding apparatus for performing data processing or other operations used in the practice, administration, or management of a financial product or service.”

Basically, it allows firms to challenge and invalidate patents and processes that were already approved by Courts and the Patent Office. 

How and why on earth would anyone file for patents then, if this gets through?  Imagine, slogging on a very clever solution and that gets usurped by a version of the Greater Common Good theory (albeit for some vested interest).  That a patent allows an inventor a limited monopoly to make money is one key incentive...take away that, what's in it for him?


Please don't say, let them go the trade secret route where it can be reverse engineered in a matter of months.

And of course, there is the massive damage to Patent Firms, companies that have amassed portfolios of patents; their business model is in tatters.  Lots of companies make money by simply licensing patents and they'd no longer have a revenue stream from their patents.

It really would be the end of patents.
Patents and How to Get One: A Practical HandbookIntellectual Property: The Law of Trademarks, Copyrights, Patents, and Trade Secrets for the ParalegalThe Entrepreneur's Guide to Patents, Copyrights, Trademarks, Trade Secrets & Licensing

Wednesday, July 6, 2011

Calfw - A calendar framework for Emacs

From the org-mode mailing lists, here's an interesting view of the same agenda/calendar of org-mode similar to what you see in Google Calendar developed by SAKURAI Masashi.




This is not part of the org-mode development tree and you'd have to download the package from the github repository.   It might be a good idea to try it and give your feedback on the thread here.


Getting Things Done: The Art of Stress-Free ProductivityGTD® System GuidesReady for Anything: 52 Productivity Principles for Getting Things Done