[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell-CLI for Emacs
From: |
Yuri Khan |
Subject: |
Re: shell-CLI for Emacs |
Date: |
Mon, 26 Aug 2013 11:03:39 +0700 |
On Mon, Aug 26, 2013 at 7:56 AM, Emanuel Berg <embe8573@student.uu.se> wrote:
>> That's the primary benefit of all DWIM hacking, after all, for
>> both you and Emacs!
>
> DWIM, is that what I'm doing? Why did you say that? I'm to read
> the Wikipedia article tonight - never heard of it, but intuitively
> I like it.
>
> add_dic () { sudo tar -xvjf $1 -C /usr/share/stardict/dic; }
What you are doing here is just programming: replacing a long precise
command with a shorter but still precise command.
DWIM is a technique of replacing a precise command with one that is in
some way imprecise. You misspell a command, something behind the
scenes corrects it for you (seen in zsh). You don’t specify a
parameter, it picks a default that is sensible for some people in some
cases, but not universally (e.g. git push).
You should be reading not Wikipedia but The Jargon File:
http://www.catb.org/~esr/jargon/html/D/DWIM.html . It explains well
why one man’s Do What I Mean is another’s Damn Warren’s Infernal
Machine.