Jorgen Schäfer: typo.el 1.0 released: An Emacs library for typographical editing

typo.el provides two modes. typo-global-mode provides a prefix map for a number of useful Unicode glyphs, while typo-mode changes the behavior of a number of keys in the current buffer.

The changed keys will try to smartly guess which Unicode glyph you wanted to enter from context. Most of them let you easily cycle through a selection in case the first one was not what you wanted.

Quotation Marks

“He said, ‘leave me alone,’ and closed the door.”

All quotation marks in this sentence were added by hitting the " key exactly once each. typo.el guessed the correct glyphs to use from context. If it gets it wrong, you can just repeat hitting the " key until you get the quotation mark you wanted.

M-x typo-change-language lets you change which quotation marks to use. This is also configurable, in case you want to add your own.

Dashes and Dots

The hyphen key will insert a default hyphen-minus glyph. On repeated use, though, it will cycle through the en-dash, em-dash, and a number of other dash-like glyphs available in Unicode. This means that typing two dashes inserts an en-dash and typing three dashes inserts an em-dash, as would be expected. The name of the currently inserted dash is shown in the minibuffer.

The full stop key will self-insert as usual. When three dots are inserted in a row, though, they are replaced by a horizontal ellipsis glyph.

Other Keys

Tick and backtick keys insert the appropriate quotation mark as well. The less-than and greater-than signs cycle insert the default glyphs on first use, but cycle through double and single guillemets on repeated use.

Prefix Map

In addition to the above, typo-global-mode also provides a globally-accessible key map under the C-c 8 prefix (akin to Emacs’ default C-x 8 prefix map) to insert various Unicode characters.

In particular, C-c 8 SPC will insert a no-break space. Continued use of SPC after this will cycle through half a dozen different space types available in Unicode.

Check the mode’s documentation for more details.

Download and Installation

Download typo.el and put it somewhere in your load-path.

Add the following to your .emacs:

(typo-global-mode 1)
(add-hook 'text-mode-hook 'typo-mode)
-1:-- typo.el 1.0 released: An Emacs library for typographical editing (Post Jorgen Schäfer (noreply@blogger.com))--L0--C0--November 27, 2014 09:45 AM

Jorgen Schäfer: Emacs: Search for Symbol at Point

One thing I regularly do is to try and look for other occurrences of the symbol at point in my buffer. This can serve as a poor man’s way of finding the definition or callers of a function, or uses of a variable. It’s kind of annoying to do that in Emacs by default, sadly. The following code from my .emacs will enable the key shortcut C-din isearch to yank the symbol at point into the search string. So C-s C-d will then start a search for that symbol, and already highlight it. Keep hitting C-s to move to further occurrences.

(define-key isearch-mode-map (kbd "C-d")
'fc/isearch-yank-symbol)
(defun fc/isearch-yank-symbol ()
"Yank the symbol at point into the isearch minibuffer.

C-w does something similar in isearch, but it only looks for
the rest of the word. I want to look for the whole string. And
symbol, not word, as I need this for programming the most."
(interactive)
(isearch-yank-string
(save-excursion
(when (and (not isearch-forward)
isearch-other-end)
(goto-char isearch-other-end))
(thing-at-point 'symbol))))
-1:-- Emacs: Search for Symbol at Point (Post Jorgen Schäfer (noreply@blogger.com))--L0--C0--November 27, 2014 09:43 AM

Grant Rettke: ALEC’s a Language for Expressing Creativity

ALEC is the new configuration of my Emacs/Organization-Mode system. Just wanted to share some thoughts on the experience. The code says a lot, and the text, too, but I’m more interested in the experience.

For context, this is the next step of TC3F.

If nothing else, just know that the tangle time went down from 10m to 27 seconds :).

This system has changed who I am and how I think. Because it is easier to focus on the tools rather than the intent, on the means vs. the end, I focus on this system, this configuration of Emacs. My system is a provider, a realization, of a language for expressing creativity. ALEC. ALEC’s a Language for Expressing Creativity. That is a truly and utterly beautiful thing to ponder.

The expression of creativity is why we are born human. Five of our senses go out into the world searching, always searching. In our time-space, the expressions that may be consumed by the eye (paintings, graphic arts) and consumed by the ear (music) are so, so lovely, and easy for us to understand (How do you address someone whose true name is Symphony?). We are here to let that voice sing, and we want all five senses to help do it, for the maximization of expressivity.

The song, that sweet celestial song, is sometimes more difficult for people to hear. The honey-kissed embrace of one’s love feels different than a song, and different than laughing at a joke, but they are all the creative act. Gardening, selling, collecting, tending… they are all part of the creative act that makes us again be born human. We always seem to focus on the configuration of those actions (time, space, causality, and identity), the build of those tools, necessary to perform the creative act. With time and patience, we will see the true nature of things. Part of the path is indeed attaining mastery. Mastery over ourselves, mostly, by some way that is gentle and kind. That action, that attempt, for me, has partially culminated in the aggregation of a lifetime of mastery of tools and programming languages and ideas and studies and training and collaboration and mystery and magic and laughing, in this birth, in the artifact called ALEC, and ALEC can only be expressed, for me, for now, with Emacs.

This system is no longer “Emacs”. It is not its disparate packages. They are tools, yes, and more importantly, they are expressions of creativity. Together in Emacs, in ALEC, they are composed, like parts of a symphony, together, to allow for the ultimate in the action creative expression. The tools themselves exhibit these traits, both in their implementation and their intent. That is traditional, in that, the properties and traits expressed by these “words”, these compositional units, have the properties and traits of the things expressed by these “words”. “Words” is the most expressive element that I can think of right now, for things that can be atoms, and yet be combined to form sentences, something larger and more expressive, in a particular language, which itself can quite magically express ideas, about itself, or about anything in existence.

It is like watching a beautiful lotus blooming, spreading its pedals, having been nourished by the fertile soil, protected in its pond, knowing that it must strive to reach higher, nurtured by Mother Sun. The very act, the ultimate act of creative expression, that very action contains itself and is culminated by itself. It is that which it is trying to achieve, and to be that, is to do that, for itself and for all of creation. This ultimate act of creative expression, is present in the manifestation of Emacs and the packages and the users who come together to form a perfect symphony of creative expression in a form that may be captured and represented as a computer file, so humble and modest, just like a small seed of a proud and mighty Redwood tree that will eventually reach hundreds and hundreds of feet into the sky and towards Mother Sun, contains that which it will become in it’s own existence, so too does contains its own beautiful destiny the seeds of beauty and creative expression that are produced with ALEC (in every form, not just the one described by this document of course!).

The blossoming of the expression of the computational act, and the petals that opened in the form of the Turing’s machine, Church’s Lambda calculus, and Post’s Production Systems, are beautiful, and still, are only petals, that carry the sweet fragrance, because a fragrance is part of a moment, which is finite, as is every configuration of this reality. The beauty is still as sweet. The key is seeing the inherent beauty, the source without start and without end, and then being able to see that in everyone and everything.

That thing, which was present before the expression of creativity, and will exist after it, which is not subject to the laws of time, space, causality, and identity, is the point that everyone surely wishes to re-visit. That quest, the great motivator of the most softly spoken and heartfelt desire, itself is surely yet another expression of that which is gentle and kind. The steps taken on that quest, despite being driven by that perfect intent, are still subject the four boundaries of this reality. Those actions, defined by configurations, like the petals of the lotus, retaining its sweet fragrance, can, will, and must fade, but, we will shine on in the sweet embrace of Mother Sun, knowing that loving and warm embrace of sweet perfection, in our one, and true, home.

-1:-- ALEC’s a Language for Expressing Creativity (Post Grant)--L0--C0--November 27, 2014 01:52 AM

Raimon Grau: Temporarily ignore people in IRC

I'm using irc more and more for my communication with others.  And spending more time in IRC means that it makes more sense to optimize it.  And also, erc is a good playground for us, elisp hackers :)

So when someone is bitching or saying nonsensic BS on some IRC channel (or slack, or hipchat, or anything that supports bitlbee), you can ignore him/her, but often you forget to unignore, and after a few hours they tell you something important and you just miss it.  Not good.

So here's a timed ignore command for erc


(
defun erc-cmd-TMPIG (&rest users)
(let ((b (current-buffer)))
(
dolist (user users)
(erc-process-input-line (format
"/ignore %s" user)))
(run-at-time (* 60 10) nil
(
lambda ()
(
dolist (user users)
(
with-current-buffer b
(erc-process-input-line (format
"/unignore %s" user))))))))


Yes, some of you reading this will be the victims of this... :)

EDIT: This code needs to be in a file with lexical scope active. otherwise, use lexical-let instead of let
-1:-- Temporarily ignore people in IRC (Post Raimon Grau (noreply@blogger.com))--L0--C0--November 26, 2014 05:15 PM

emacspeak: Announcing Emacspeak 41.0: NiceDog

Emacspeak 41.0—NiceDog—Unleashed!

1 Emacspeak-41.0 (NiceDog) Unleashed!

** For Immediate Release:

San Jose, Calif., (Nov 26, 2014) Emacspeak: Redefining Accessibility In The Era Of Web Computing –Zero cost of upgrades/downgrades makes priceless software affordable!

Emacspeak Inc (NASDOG: ESPK) --http://emacspeak.sf.net– announces the immediate world-wide availability of Emacspeak 41.0 (NiceDog) –a powerful audio desktop for leveraging today's evolving data, social and service-oriented Web cloud.

1.1 Investors Note:

With several prominent tweeters expanding coverage of #emacspeak, NASDOG: ESPK has now been consistently trading over the social net at levels close to that once attained by DogCom high-fliers—and as of November 2014 is trading at levels close to that achieved by once better known stocks in the tech sector.

1.2 What Is It?

Emacspeak is a fully functional audio desktop that provides complete eyes-free access to all major 32 and 64 bit operating environments. By seamlessly blending live access to all aspects of the Internet such as Web-surfing, blogging, social computing and electronic messaging into the audio desktop, Emacspeak enables speech access to local and remote information with a consistent and well-integrated user interface. A rich suite of task-oriented tools provides efficient speech-enabled access to the evolving service-oriented social Web cloud.

1.3 Major Enhancements:

  • Emacs EWW: Consume Web content efficiently. 📚
  • emacspeak-url-templates: Smart Web access. ♅
  • emacspeak-websearch.el Find things fast. ♁
  • emacspeak-google.el: Improved Google integration. ⁈
  • Calibre integration for searching and viewing epub 📚
  • Complete anything via company integration 🗜
  • Speech-enabled 2048 🂠
  • Emacspeak At Twenty -Historical Overview ⛬
  • gmaps.el: Find places, read reviews, get there. 🌐
  • Feed Browser Consume feeds post Google-Reader. ␌
  • Freebase Search: Explore freebase knowledge base. 🆓
  • Emacs 24.4: Supports all new features in Emacs 24.4. 🌚
  • And a lot more than wil fit this margin. …

1.4 Establishing Liberty, Equality And Freedom:

Never a toy system, Emacspeak is voluntarily bundled with all major Linux distributions. Though designed to be modular, distributors have freely chosen to bundle the fully integrated system without any undue pressure—a documented success for the integrated innovation embodied by Emacspeak. As the system evolves, both upgrades and downgrades continue to be available at the same zero-cost to all users. The integrity of the Emacspeak codebase is ensured by the reliable and secure Linux platform used to develop and distribute the software.

Extensive studies have shown that thanks to these features, users consider Emacspeak to be absolutely priceless. Thanks to this wide-spread user demand, the present version remains priceless as ever—it is being made available at the same zero-cost as previous releases.

At the same time, Emacspeak continues to innovate in the area of eyes-free social interaction and carries forward the well-established Open Source tradition of introducing user interface features that eventually show up in luser environments.

On this theme, when once challenged by a proponent of a crash-prone but well-marketed mousetrap with the assertion "Emacs is a system from the 70's", the creator of Emacspeak evinced surprise at the unusual candor manifest in the assertion that it would take popular idiot-proven interfaces until the year 2070 to catch up to where the Emacspeak audio desktop is today. Industry experts welcomed this refreshing breath of Courage Certainty and Clarity (CCC) at a time when users are reeling from the Fear Uncertainty and Doubt (FUD) unleashed by complex software systems backed by even more convoluted press releases.

1.5 Independent Test Results:

Independent test results have proven that unlike some modern (and not so modern) software, Emacspeak can be safely uninstalled without adversely affecting the continued performance of the computer. These same tests also revealed that once uninstalled, the user stopped functioning altogether. Speaking with Aster Labrador, the creator of Emacspeak once pointed out that these results re-emphasize the user-centric design of Emacspeak; "It is the user –and not the computer– that stops functioning when Emacspeak is uninstalled!".

1.5.1 Note from Aster,Bubbles and Tilden:

UnDoctored Videos Inc. is looking for volunteers to star in a video demonstrating such complete user failure.

1.6 Obtaining Emacspeak:

Emacspeak can be downloaded from Google Code –see http://code.google.com/p/emacspeak/ You can visit Emacspeak on the WWW at http://emacspeak.sf.net. You can subscribe to the emacspeak mailing list emacspeak@cs.vassar.edu by sending mail to the list request address emacspeak-request@cs.vassar.edu. The Emacspeak Blog is a good source for news about recent enhancements and how to use them. The WowDog release is at http://emacspeak.googlecode.com/svn/wiki/downloads/emacspeak-41.0.tar.bz2. The latest development snapshot of Emacspeak is always available via Subversion from Google Code at http://emacspeak.googlecode.com/svn/trunk/

1.7 History:

Emacspeak 41.0 continues to improve upon the desire to provide not just equal, but superior access — technology when correctly implemented can significantly enhance the human ability. Emacspeak 40.0 goes back to Web basics by enabling efficient access to large amounts of readable Web content. Emacspeak 39.0 continues the Emacspeak tradition of increasing the breadth of user tasks that are covered without introducing unnecessary bloatware. Emacspeak 38.0 is the latest in a series of award-winning releases from Emacspeak Inc. Emacspeak 37.0 continues the tradition of delivering robust software as reflected by its code-name. Emacspeak 36.0 enhances the audio desktop with many new tools including full EPub support — hence the name EPubDog. Emacspeak 35.0 is all about teaching a new dog old tricks — and is aptly code-named HeadDog in honor of our new Press/Analyst contact. emacspeak-34.0 (AKA Bubbles) established a new beach-head with respect to rapid task completion in an eyes-free environment. Emacspeak-33.0 AKA StarDog brings unparalleled cloud access to the audio desktop. Emacspeak 32.0 AKA LuckyDog continues to innovate via open technologies for better access. Emacspeak 31.0 AKA TweetDog — adds tweeting to the Emacspeak desktop. Emacspeak 30.0 AKA SocialDog brings the Social Web to the audio desktop—you cant but be social if you speak! Emacspeak 29.0—AKAAbleDog—is a testament to the resilliance and innovation embodied by Open Source software—it would not exist without the thriving Emacs community that continues to ensure that Emacs remains one of the premier user environments despite perhaps also being one of the oldest. Emacspeak 28.0—AKA PuppyDog—exemplifies the rapid pace of development evinced by Open Source software. Emacspeak 27.0—AKA FastDog—is the latest in a sequence of upgrades that make previous releases obsolete and downgrades unnecessary. Emacspeak 26—AKA LeadDog—continues the tradition of introducing innovative access solutions that are unfettered by the constraints inherent in traditional adaptive technologies. Emacspeak 25 —AKA ActiveDog —re-activates open, unfettered access to online information. Emacspeak-Alive —AKA LiveDog —enlivens open, unfettered information access with a series of live updates that once again demonstrate the power and agility of open source software development. Emacspeak 23.0 – AKA Retriever—went the extra mile in fetching full access. Emacspeak 22.0 —AKA GuideDog —helps users navigate the Web more effectively than ever before. Emacspeak 21.0 —AKA PlayDog —continued the Emacspeak tradition of relying on enhanced productivity to liberate users. Emacspeak-20.0 —AKA LeapDog —continues the long established GNU/Emacs tradition of integrated innovation to create a pleasurable computing environment for eyes-free interaction. emacspeak-19.0 –AKA WorkDog– is designed to enhance user productivity at work and leisure. Emacspeak-18.0 –code named GoodDog– continued the Emacspeak tradition of enhancing user productivity and thereby reducing total cost of ownership. Emacspeak-17.0 –code named HappyDog– enhances user productivity by exploiting today's evolving WWW standards. Emacspeak-16.0 –code named CleverDog– the follow-up to SmartDog– continued the tradition of working better, faster, smarter. Emacspeak-15.0 –code named SmartDog–followed up on TopDog as the next in a continuing a series of award-winning audio desktop releases from Emacspeak Inc. Emacspeak-14.0 –code named TopDog–was the first release of this millennium. Emacspeak-13.0 –codenamed YellowLab– was the closing release of the 20th. century. Emacspeak-12.0 –code named GoldenDog– began leveraging the evolving semantic WWW to provide task-oriented speech access to Webformation. Emacspeak-11.0 –code named Aster– went the final step in making Linux a zero-cost Internet access solution for blind and visually impaired users. Emacspeak-10.0 –(AKA Emacspeak-2000) code named WonderDog– continued the tradition of award-winning software releases designed to make eyes-free computing a productive and pleasurable experience. Emacspeak-9.0 –(AKA Emacspeak 99) code named BlackLab– continued to innovate in the areas of speech interaction and interactive accessibility. Emacspeak-8.0 –(AKA Emacspeak-98++) code named BlackDog– was a major upgrade to the speech output extension to Emacs.

Emacspeak-95 (code named Illinois) was released as OpenSource on the Internet in May 1995 as the first complete speech interface to UNIX workstations. The subsequent release, Emacspeak-96 (code named Egypt) made available in May 1996 provided significant enhancements to the interface. Emacspeak-97 (Tennessee) went further in providing a true audio desktop. Emacspeak-98 integrated Internetworking into all aspects of the audio desktop to provide the first fully interactive speech-enabled WebTop.

About Emacspeak:


Originally based at Cornell (NY) http://www.cs.cornell.edu/home/raman –home to Auditory User Interfaces (AUI) on the WWW– Emacspeak is now maintained on GoogleCode --http://code.google.com/p/emacspeak —and Sourceforge —http://emacspeak.sf.net. The system is mirrored world-wide by an international network of software archives and bundled voluntarily with all major Linux distributions. On Monday, April 12, 1999, Emacspeak became part of the Smithsonian's Permanent Research Collection on Information Technology at the Smithsonian's National Museum of American History.

The Emacspeak mailing list is archived at Vassar –the home of the Emacspeak mailing list– thanks to Greg Priest-Dorman, and provides a valuable knowledge base for new users.

1.8 Press/Analyst Contact: Tilden Labrador

Going forward, Tilden acknowledges his exclusive monopoly on setting the direction of the Emacspeak Audio Desktop, and promises to exercise this freedom to innovate and her resulting power responsibly (as before) in the interest of all dogs.

**About This Release:


Windows-Free (WF) is a favorite battle-cry of The League Against Forced Fenestration (LAFF). –see http://www.usdoj.gov/atr/cases/f3800/msjudgex.htm for details on the ill-effects of Forced Fenestration.

CopyWrite )C( Aster and Hubbell Labrador. All Writes Reserved. HeadDog (DM), LiveDog (DM), GoldenDog (DM), BlackDog (DM) etc., are Registered Dogmarks of Aster, Hubbell and Tilden Labrador. All other dogs belong to their respective owners.

-1:-- Announcing Emacspeak 41.0: NiceDog (Post T. V. Raman (noreply@blogger.com))--L0--C0--November 26, 2014 03:09 PM

Irreal: Installing a Lisp Development Environment on Windows

Chris Bagley (Baggers) has a nice video from last year on installing a Common Lisp development enironment on Windows. He walks us through installing Emacs, Slime, SBCL, and Quicklisp on a Windows machine. That includes defining a working directory and adjusting the path. If you find yourself condemned to work on Windows and would like to set up a Lisp environment, this is the video to watch. If you're a n00b and want to learn Lisp on a Windows machine, this is the video to watch.

You've still got to learn Emacs and Slime but when you do you have one of the best Lisp environments available. Speaking of Slime, Bagley has another video on using Slime. This demo appears to be on a Linux machine with a dark theme so it's a bit hard to see but it's really excellent. Watch it and try the things he demonstrates on your own machine and you're well on your way to mastering the Emacs/Slime environment.

Bagley has some other videos that I'll probably write about later. In the mean time, these two videos are an excellent way to get up to speed.

-1:-- Installing a Lisp Development Environment on Windows (Post jcs)--L0--C0--November 26, 2014 01:59 PM

Timo Geusch: Using ELPA with pinned packages in GNU Emacs 24.4

Yes, I promise I’ll shut up about Emacs package management via ELPA any minute now. Based on the feedback I had on my last post about using a combination of melpa and melpa-stable, I looked into using pinned packages via the package-pinned-packages variable that’s new in Emacs 24.4’s package.el. I couldn’t find any simple examples… Read More »

The post Using ELPA with pinned packages in GNU Emacs 24.4 appeared first on The Lone C++ Coder's Blog.

-1:-- Using ELPA with pinned packages in GNU Emacs 24.4 (Post Timo Geusch)--L0--C0--November 26, 2014 06:50 AM

sachachua: Using Org Mode to keep a process journal

I (re)started keeping a journal in Org Mode – chronologically-ordered snippets on what I’m doing, how I’m doing things, and how I’m thinking of improving. I’d mentioned the idea previously on my blog. In this post, I want to share the workflow and configuration that makes it easier for me to log entries.

When I’m on my personal computer, I use Org Mode’s org-capture command to quickly capture notes. I’ve bound org-capture to C-c r, a remnant from the way I still think of it as related to the even older org-remember and remember functions. Anyway, org-capture allows you to define several org-capture-templates, and it will display these templates in a menu so that you can choose from them when creating your note.

Here’s the template I’ve been using for my captures:

(setq org-capture-templates
      '(;; other entries
        ("j" "Journal entry" plain
         (file+datetree+prompt "~/personal/journal.org")
         "%K - %a\n%i\n%?\n")
        ;; other entries
        ))

This stores a link to the currently-clocked task and to whatever context I was looking at when I started the journal entry. It also copies the active region (if any), then positions my cursor after that text. Unlike the default template, this template does not include an Org heading. That way, I don’t have to think of a headline, and I can also just clear the buffer and close the window without adding lots of half-filled-in entries in my journal.

The file+datetree+prompt keyword means that the entries will be stored in ~/personal/journal.org in an outline corresponding to the year, month, and day that I specify. This makes it easy to write an entry for today or for any particular date. For example, I often find myself adding more notes for the previous day (-1) because of something I remembered.

I’m thinking of making Fridays my day for reviewing what I’ve learned and writing up more notes. With the date-tree structure, it’s easy to review my notes by day and look for little things to harvest.

If I know I want to revisit something, I can also add a TODO right in the journal entries using the regular Org syntax or as a keyword that I can search for. If it’s a separate heading (ex: *** TODO Take over the world), I can use org-refile to move it to its proper project.

When I want to flesh out those rough notes into a blog post, I can copy the entry to my blog post outline, fill in the details, and then use org2blog/wp-post-subtree to post it to WordPress. Alternatively, I might edit my rough notes in-place to make them ready to post, and then post them directly from that buffer (possibly changing the heading).

Since I’m not always on my personal computer, I need to be able to pull in notes from elsewhere. I can add quick notes to Evernote on my phone. So far, I’ve been okay with copying snippets manually. If I find that I’m creating lots of notes, though, I might look into reusing the code that I have for building my weekly review list from Evernote notes.

Time-wise, I find that spending 15-30 minutes at the end of the day helps me braindump the key points. If I take little writing breaks throughout the day, that helps me capture more details (especially in terms of development or technical troubleshooting). Re-reading my notes is part of my regular weekly review process, so it’s pretty quick (plus a little more time if I’m writing longer blog posts).

That’s how Org Mode helps me keep a process journal. It’s great to be able to quickly write notes in the same thing you use to do everything else, and to tweak your workflow. Whee!

The post Using Org Mode to keep a process journal appeared first on sacha chua :: living an awesome life.

-1:-- Using Org Mode to keep a process journal (Post Sacha Chua)--L0--C0--November 25, 2014 08:40 PM

Irreal: query-replace in Emacs 25.

A nice feature of the query-replace function is that you can scroll through the history of previous parameters and perhaps avoid retyping them. Unfortunately, you can't edit that history so if your new input is even a little bit different, you have to retype it. I've often wished for a little more flexibility in that area.

Artur Malabarba brings happy news: In Emacs 25 query-replace history is editable. Even nicer, you will be able to switch the arguments. That's another thing I've often wanted to do. I can hardly wait.

This is the first in a series Malabarba is doing on the new features of Emacs 25. Though it's doubtless some time away, I'm looking forward to getting my hands on these enhancements.

Every once in a while you hear some young whipper-snapper using Eclipse or some other horror claim that Emacs is old technology and essentially dead. The vigorous development going on in the Emacs community shows how wrong this is.

-1:-- query-replace in Emacs 25. (Post jcs)--L0--C0--November 24, 2014 12:39 PM

Phil Hagelberg: in which a shingle is hung out

Atreus production

Earlier this year I designed and built a small ergonomic mechanical keyboard. My original goal was just that of personal use; I wanted to take the joy of mechanical keyboards with me when I go work from coffee shops. I put the design on Github and documented my build process with photos, and once I finished my own keyboard I figured I'd be done with it. But a few of my friends were intrigued and asked me if I'd build them keyboards. I had a lot of fun constructing my first one, so I agreed to build a few more to sell to friends.

Once I got going, one thing led to another, and I started getting queries from friends-of-friends. I put up a web site with an order form, and orders started trickling in. Due to the hand-wiring approach used the construction of these boards took a good four hours of nights and weekends, so a backlog started piling up. At this point I decided I could make myself less of a bottleneck by selling kits and allowing interested customers to do the assembly themselves. This was a big help, and it seemed people really liked the hands-on approach. There's nothing quite like the satisfaction of using hardware you've constructed yourself.

Atreus wiring

The "proper" way to make a keyboard is to build it around a circuit board. But circuit board design is its own skill, and their production benefits greatly from volume discounts, so it really didn't make sense for my own personal project. But once I started to get more orders it became clear that a circuit board would help a lot since the process of hand-wiring looks somewhat intimidating if you've never done any soldering before. I broke out KiCAD and started laying out a circuit board to hold the switches, diodes, and microcontroller after reading through some documentation and tutorials.

One side of Atreus PCB

I carefully laid out one side of the circuit board according to the row spacing and staggering used in the laser-cut case files without too much trouble. Each switch was connected to the others in the row with one pin and to the others in the column with the other, and each row and column was brought back in to the middle with the microcontroller. Then I hit a snag—the two halves of the Atreus keyboard are rotated inward at a 10° angle, but when I went to rotate the design in KiCAD rather than rotating them as a unit, it simply applied the rotation to each component individually.

At that point I was starting to think I'd have to do all this trig by hand and enter the calculated coordinates one by one into KiCAD's edit boxes, which did not sound like fun. I asked on the Freenode channel and found to my delight that the new file format for KiCAD is based on s-expressions! It can all be easily manipulated programmatically. Since the data includes symbols with leading digits in their names, the Clojure reader couldn't handle it, but Racket didn't have a problem with it. So I put together some Racket code to run the trig necessary to calculate the switch and diode positions.

Atreus PCB

Anyway, I just finished assembling my first circuit-board-based keyboard, and it works nicely. It's dramatically easier than the hand-wired variant, even such that my six-year-old son wants to build his own. I had to make one change to give clearance for the micro-USB connector, but I was able to apply this "revision" to my already-produced circuit boards with a hacksaw.

Up to this point I haven't publically promoted it much, but now that the circuit board is here I'm prepared to handle a greater volume of orders. So if you're interested in building your own mechanical travel keyboard or want to hack some hardware designed using Lisp, take a look at http://atreus.technomancy.us.

-1:-- in which a shingle is hung out (Post Phil Hagelberg)--L0--C0--November 24, 2014 08:22 AM

Endless Parentheses: Debugging Emacs-Lisp Part 1: Earn your independence

Running into errors is not only a consequence of tinkering with your editor, it is the only road to graduating in Emacs. Therefore, it stands to reason that Emacs would contain the most impressive debugging utilities know to mankind, Edebug.

Learning to Edebug is the right decision for anyone who doesn't know how to Edebug.

  • It's easy as pie, you have no excuse not to learn it.
  • It helps you solve your own problems. Not that the community isn't helpful, it just allows you to help yourself—which will eventually allow you to help the community.
  • If you're a newcomer, it will teach you more about elisp than most tutorials out there.
  • If you're anything other than a newcomer, then it's about time and you should be ashamed of yourself.

A quick first stop

Before delving into Edebug, you should be aware of toggle-debug-on-error and toggle-debug-on-quit. Though not as powerful as the alternative, they're a quick'n dirty way to get a backtrace of your problem.

How to Edebug a function

  1. Go to where the function is defined. You can usually do that with C-h f (which calls describe function) or just M-x find-function.
  2. Press C-u C-M-x. This turns on Edebug for that function.
  3. Now, just invoke the function (or some other command that calls that function).

The next time the Edebugged function gets called, Emacs will display its source code and will take you through it step-by-step. Press n to continue to the next step or c to stop fooling around and skip to the end.

For instance, to solve the issue that lead me to write this, we could perform the following sequence of commands:

M-x find-function RET package-menu--generate RET
C-u C-M-x
M-x paradox-list-packages RET

Once a function has been instrumented, it will trigger Edebug every time it is called. To undo this effect (to remove instrumentation) simply visit its definition again and hit C-M-x without the prefix.

Comment on this.

-1:-- Debugging Emacs-Lisp Part 1: Earn your independence (Post)--L0--C0--November 24, 2014 12:00 AM

Chen Bin (redguardtoo): Debug efficiently in Emacs

Please note:

  • I use javascript as a use case. The solution is generic enough to be applied to any language. At the end of the article, Emacs Lisp is used as another example.
  • I'm good at most debuggers. The point of this article is to deal with more difficult issues the debugger can not handle.
  • My code quality is fine. It handles all the corner cases I've met. For example, single quote and double quotes will be escaped properly.

Problem

As a freelancer I am often required to debug legacy javascript code from some huge "enterprise"" applications.

The only way to debug such application is to insert as many as possible logging code, watch the output, and think.

So my problem is how to insert logging code as quickly as possible.

Solution

My solution is Yasnippet. Yasnippet allow me to insert executable Emacs Lisp code in its snippet. I will Sotake full advantage of that feature.

Logging simple JS variable

Given a variable name like "var1", I need insert javascript code as below:

console.log("var1=", var1)

Snippet: https://github.com/redguardtoo/emacs.d/blob/master/snippets/js-mode/logobject.yasnippet

This snippet need you input variable name once.

Logging complex JS variable

In real world, the JS variable is often a string like "MyController.servicea.find('.class').attr1" which I hate to type.

So the solution is that I copy the JS variable into kill ring where my snippet will read the variable name.

Snippet: https://github.com/redguardtoo/emacs.d/blob/master/snippets/js-mode/log-recent-kill-ring.yasnippet

Logging JS function name when it's called

In below example, I need insert "console.log('hello is called');" in function "hello":

function hello() {
  console.log('hello is called');
}

Snippet: https://github.com/redguardtoo/emacs.d/blob/master/snippets/js-mode/log-which-function.yasnippet

This snippet use the Emacs command `which-function`. If you read the code of `which-function`, you will find that it's Imenu-mode who actually extracts the function name. But Imenu-mode requires you pre-define enough regular expressions.

Please check https://github.com/redguardtoo/emacs.d/blob/master/lisp/init-javascript.el. I have defined many regular expressions for AngularJS and JQuery.

The regular expressions could be used in both js-mode and js2-mode.

Logging JS function name with its parameters

JS example:

function hello(v1, v2,
               v3, v4) {
  console.log("v1=", v1, "v2=", v2, "v3=", v3, "v4=", v4);
}

I copy the parameter of JS function named "hello". It's just the content between "hello(" and ")", then Emacs Lisp code embedded in the snippet will parse and output the right content from kill ring.

Snippet: https://github.com/redguardtoo/emacs.d/blob/master/snippets/js-mode/log-which-function-with-para.yasnippet

BTW, since I use Evil, copy the parameter into kill-ring is as simple as pressing "yi(".

Insert JS debugger statement

@cjk provided this tip. The debugger like Firebug will pause at the debugger statement. It saves me the time to locate JS file, to go to the specific line and set breakpoint after re-deploying the application.

Snippets: https://github.com/redguardtoo/emacs.d/blob/master/snippets/js-mode/debugger.yasnippet

https://github.com/redguardtoo/emacs.d/blob/master/snippets/js-mode/debugger-cond-breakpoint-from-kill-ring.yasnippet

Bonus

Similar snippets for Emacs Lisp are defined HERE.

-1:-- Debug efficiently in Emacs (Post Chen Bin)--L0--C0--November 23, 2014 12:45 PM

Timo Geusch: Set up Emacs to use both melpa and melpa-stable

I’ve blogged about a little elisp snippet I use to install my preferred base set of Emacs packages before. Thanks for all the feedback, it definitely helped improve the code. One issue that kept annoying me is that there is no simple way to tell ELPA to mainly pull packages from melpa-stable and only fall… Read More »

The post Set up Emacs to use both melpa and melpa-stable appeared first on The Lone C++ Coder's Blog.

-1:-- Set up Emacs to use both melpa and melpa-stable (Post Timo Geusch)--L0--C0--November 22, 2014 05:24 AM

Julien Danjou: Distributed group management and locking in Python with tooz

With OpenStack embracing the Tooz library more and more over the past year, I think it's a good start to write a bit about it.

A bit of history

A little more than year ago, with my colleague Yassine Lamgarchal and others at eNovance, we investigated on how to solve a problem often encountered inside OpenStack: synchronization of multiple distributed workers. And while many people in our ecosystem continue to drive development by adding new bells and whistles, we made a point of solving new problems with a generic solution able to address the technical debt at the same time.

Yassine wrote the first ideas of what should be the group membership service that was needed for OpenStack, identifying several projects that could make use of this. I've presented this concept during the OpenStack Summit in Hong-Kong during an Oslo session. It turned out that the idea was well-received, and the week following the summit we started the tooz project on StackForge.

Goals

Tooz is a Python library that provides a coordination API. Its primary goal is to handle groups and membership of these groups in distributed systems.

Tooz also provides another useful feature which is distributed locking. This allows distributed nodes to acquire and release locks in order to synchronize themselves (for example to access a shared resource).

The architecture

If you are familiar with distributed systems, you might be thinking that there are a lot of solutions already available to solve these issues: ZooKeeper, the Raft consensus algorithm or even Redis for example.

You'll be thrilled to learn that Tooz is not the result of the NIH syndrome, but is an abstraction layer on top of all these solutions. It uses drivers to provide the real functionalities behind, and does not try to do anything fancy.

All the drivers do not have the same amount of functionality of robustness, but depending on your environment, any available driver might be suffice. Like most of OpenStack, we let the deployers/operators/developers chose whichever backend they want to use, informing them of the potential trade-offs they will make.

So far, Tooz provides drivers based on:

All drivers are distributed across processes. Some can be distributed across the network (ZooKeeper, memcached, redis…) and some are only available on the same host (IPC).

Also note that the Tooz API is completely asynchronous, allowing it to be more efficient, and potentially included in an event loop.

Features

Group membership

Tooz provides an API to manage group membership. The basic operations provided are: the creation of a group, the ability to join it, leave it and list its members. It's also possible to be notified as soon as a member joins or leaves a group.

Leader election

Each group can have a leader elected. Each member can decide if it wants to run for the election. If the leader disappears, another one is elected from the list of current candidates. It's possible to be notified of the election result and to retrieve the leader of a group at any moment.

Distributed locking

When trying to synchronize several workers in a distributed environment, you may need a way to lock access to some resources. That's what a distributed lock can help you with.

Adoption in OpenStack

Ceilometer is the first project in OpenStack to use Tooz. It has replaced part of the old alarm distribution system, where RPC was used to detect active alarm evaluator workers. The group membership feature of Tooz was leveraged by Ceilometer to coordinate between alarm evaluator workers.

Another new feature part of the Juno release of Ceilometer is the distribution of polling tasks of the central agent among multiple workers. There's again a group membership issue to know which nodes are online and available to receive polling tasks, so Tooz is also being used here.

The Oslo team has accepted the adoption of Tooz during this release cycle. That means that it will be maintained by more developers, and will be part of the OpenStack release process.

This opens the door to push Tooz further in OpenStack. Our next candidate would be write a service group driver for Nova.

The complete documentation for Tooz is available online and has examples for the various features described here, go read it if you're curious and adventurous!

-1:-- Distributed group management and locking in Python with tooz (Post Julien Danjou)--L0--C0--November 21, 2014 12:10 PM

Chen Bin (redguardtoo): Make web-mode support HTML with AngularJS data-binding

I find it very useful to use `M-x imenu` to jump to the AngularJS binding point of one HTML file.

Insert below code into ~/.emacs:

(eval-after-load 'web-mode
  '(progn
     ;; angular imenu
     (add-to-list 'web-mode-imenu-regexp-list
                  '(" \\(ng-[a-z]*\\)=\"\\([a-zA-Z0-9]*\\)" 1 2 "="))))
-1:-- Make web-mode support HTML with AngularJS data-binding (Post Chen Bin)--L0--C0--November 21, 2014 11:45 AM

John DeRosa: GNU Emacs for OS X is a Win

I’ve used Aquamacs for the past four years or so. It has its strong points.

But I’ve always been a little unhappy with its slow performance relative to native Emacs (I use a MacBook Pro), and its unique initialization and behaviors. I’m sure there are good reasons for every difference. But each difference, no matter how small, is a little more cognitive load. E.g., I never got used to M-x Info opening up in a new window somewhere on my screen…

Today, I decided to try Emacs for Mac OS X. Whoa! I love it! It’s Emacs, the whole Emacs, and nothing but the Emacs.  Win!

I even donated $50 to the project. So there!


Tagged: Emacs
-1:-- GNU Emacs for OS X is a Win (Post John)--L0--C0--November 20, 2014 06:23 PM

Grant Rettke: Don’t run mode hooks during org exports

binchen has a nice post about how to disable org mode hook execution during exports. It can be a surprise when you run in batch mode and your export breaks because of dependency failures. Oh yea, the major mode hooks run during export even though you personally are not opening a buffer, Emacs is doing so!

Here is his solution:

(defun is-buffer-file-temp ()
  (interactive)
  "If (buffer-file-name) is nil or a temp file or HTML file converted from org file"
  (let ((f (buffer-file-name))
        (rlt t))
    (if f
        (if (and (not (string-match temporary-file-directory f))
                 (not (file-exists-p (replace-regexp-in-string "\.html$" ".org" f))))
          (setq rlt nil)))
    rlt))

Interesting.

-1:-- Don’t run mode hooks during org exports (Post Grant)--L0--C0--November 20, 2014 04:28 PM

Endless Parentheses: Emacs Rocks Again!

The emacs community received some fantastic news yesterday.

Magnar Sveen's blog, What the emacs.d?!, was the greatest inspiration behind Endless Parentheses, and these 5 extra minutes of content from him cheered up my entire day.

Comment on this.

-1:-- Emacs Rocks Again! (Post)--L0--C0--November 19, 2014 12:00 AM

sachachua: Emacs: Limiting Magit status to a directory

I’m probably using Git the wrong way. In addition to the nice neat repositories I have for various projects, I also sometimes have a big grab-bag repository that has random stuff in it, just so that I can locally version-control individual files without fussing about with Emacs’ numbered version systems. Sometimes I even remember to organize those files into directories.

When you have a Git repository that’s not one logical project but many little prototypes, using Magit status to work across the entire project can sometimes mean running into lots of distracting work in progress. I wanted a way to limit the scope of Magit status to a specific directory.

Here’s the experimental code I came up with:

      (defvar sacha/magit-limit-to-directory nil "Limit magit status to a specific directory.")
      (defun sacha/magit-status-in-directory (directory)
        "Displays magit status limited to DIRECTORY.
Uses the current `default-directory', or prompts for a directory
if called with a prefix argument. Sets `sacha/magit-limit-to-directory'
so that it's still active even after you stage a change. Very experimental."
        (interactive (list (expand-file-name
                            (if current-prefix-arg
                                (read-directory-name "Directory: ")
                              default-directory))))
        (setq sacha/magit-limit-to-directory directory)
        (magit-status directory))

      (defadvice magit-insert-untracked-files (around sacha activate)
        (if sacha/magit-limit-to-directory
            (magit-with-section (section untracked 'untracked "Untracked files:" t)
              (let ((files (cl-mapcan
                            (lambda (f)
                              (when (eq (aref f 0) ??) (list f)))
                            (magit-git-lines
                             "status" "--porcelain" "--" sacha/magit-limit-to-directory))))
                (if (not files)
                    (setq section nil)
                  (dolist (file files)
                    (setq file (magit-decode-git-path (substring file 3)))
                    (magit-with-section (section file file)
                      (insert "\t" file "\n")))
                  (insert "\n"))))
          ad-do-it))

      (defadvice magit-insert-unstaged-changes (around sacha activate)
        (if sacha/magit-limit-to-directory
            (let ((magit-current-diff-range (cons 'index 'working))
                  (magit-diff-options (copy-sequence magit-diff-options)))
              (magit-git-insert-section (unstaged "Unstaged changes:")
                  #'magit-wash-raw-diffs
                "diff-files"
                "--" sacha/magit-limit-to-directory
                ))
          ad-do-it))

      (defadvice magit-insert-staged-changes (around sacha activate)
        "Limit to `sacha/magit-limit-to-directory' if specified."
        (if sacha/magit-limit-to-directory
            (let ((no-commit (not (magit-git-success "log" "-1" "HEAD"))))
              (when (or no-commit (magit-anything-staged-p))
                (let ((magit-current-diff-range (cons "HEAD" 'index))
                      (base (if no-commit
                                (magit-git-string "mktree")
                              "HEAD"))
                      (magit-diff-options (append '("--cached") magit-diff-options)))
                  (magit-git-insert-section (staged "Staged changes:")
                      (apply-partially #'magit-wash-raw-diffs t)
                    "diff-index" "--cached" base "--" sacha/magit-limit-to-directory))))
          ad-do-it)))

Now I can bind C-x v C-d to sacha/magit-status-in-directory and get something that lets me focus on one directory tree at a time. You can see my config in context at http://sachachua.com/dotemacs#magit

It feels like I’m probably trying to do things the Wrong Way and I should probably just break things out into separate repositories. Even though I realized this early on, though, I ended up digging into how to implement it just for the sheer heck of seeing if Emacs would let me do it. =) I don’t know how often I’ll use this function, but it was a good excuse to learn more about the way Magit works.

It took me an hour to find my way around magit.el, but that’s more my fault than the code’s. At first I tried to override magit-diff-options, but I eventually remembered that the paths need to come at the end of the command line arguments. (I had a cold! My brain was fuzzy!) It was fun poking around, though. Looking forward to learning even more about Magit!

The post Emacs: Limiting Magit status to a directory appeared first on sacha chua :: living an awesome life.

-1:-- Emacs: Limiting Magit status to a directory (Post Sacha Chua)--L0--C0--November 18, 2014 01:00 PM

Wilfred Hughes: Editing Julia code (with Emacs!)

I’m a big admirer of the Julia programming language: it’s a fast general-purpose language with a nice syntax, macros, and a decent package manager.

No respectable up-and-coming language should be without good editor support. I’ve been polishing the Emacs mode, and learnt a lot about the language. If you’re writing Julia code, or integrating an editor, this should be interesting to you.

Syntax highlighting

Syntax highlighting is hard, and it’s rather challenging in Julia. We’ll look at some corner cases of syntax highlighting in Julia, so I’ll show code snippets along with screenshots of how this code is currently highlighted in Emacs.

I’ve written a complete Julia syntax highlighting test file which exercises all the different syntactic features of the language. You can use this to test Julia support in your editor of choice.

Highlighting function calls

Julia supports two ways of declaring functions, which the docs describe as ‘basic’ and ‘terse’.

function f(x,y)
    x + y
end

f(x,y) = x + y

We want to highlight keywords (such as function and end) and to highlight function names (f in this example). This is pretty straightforward: we can write a regular expression that spots either the keyword function or a symbol followed by something roughly like (.*?) =.

We can also define functions in an explicit namespace. This is also straightforward, we just highlight the last symbol after the dot.

function Foo.bar(x, y)
    x + 1
end

A function definition may also include type variables. This isn’t too difficult to handle either, we just need to adjust our terse regular expression to step over the curly brackets.

elsize{T}(::AbstractArray{T}) = sizeof(T)

function elsize{T}(::AbstractArray{T})
    sizeof(T)
end

However, highlighting gets harder with nested brackets.

cell(dims::(Integer...)) = Array(Any, convert((Int...), dims))

At this point, our naive regular expression falls down. We need to count brackets, or write a crude parser. The Emacs editing mode doesn’t yet handle this case.

Macro usage

Highlighting macros is easy. There are some awkward syntactic edge cases but these don’t affect highlighting.

@hello_world! foo

Built-in functions

Julia has a lot of built-in functions. After some discussion, we felt that it wasn’t worth special-casing functions that are keywords in other languages, such as throw and error.

throw(foo)
error("foo", bar, "baz")

Strings and characters

Julia has a lovely syntax here, but it takes a little care to highlight correctly.

For characters, Julia uses single quotes, but it also supports ' as an operator. This gives very readable mathematical formulae.

# Characters
x = 'a'
y = '\u0'

# Not characters
a = b' + c'

Julia’s string syntax allows multi-line strings, triple-quoted strings, regular expression literals, byte array literals and (particularly nifty) version number literals.

x = "foo
bar"
x = """hello world"""
x = "hello $user"
x = r"foo.*"ismx
x = v"0.1"
x = b"DATA\xff\u2200"

We are handling most of this syntax in the Emacs mode, but it’s not perfect yet. I think we should highlight interpolated values in strings. See my test file for a full set of examples.

Comments

Julia’s comment syntax is also very nice. There are single-line and multi-line comments, and they support arbitrary nesting.

# I'm a comment.

#= I'm a 
multi-line comment. =#

#= I'm a #= nested =# comment. =#

Emacs makes it easy for us to support all this different variants, so we’ve supported this for a long time.

Type declarations

You can declare your own types in Julia.

type Foo
    x::Bar
end
immutable Foo
    x::Bar
end

abstract Foo <: Bar

This is mostly a case of knowing all the keywords for type declaration, so it’s straightforward.

The operator <: is particularly tricky. It is used in type declarations to declare subtypes, but it’s also used a boolean operator to see if one value is a subtype of another x <: y. I believe this is impossible to highlight correctly in all cases.

# I can't see how to highlight the first 'T' here.
same_type_numeric{T<:Number}(x::T, y::T) = true

We can cheat by having a full list of built-in types in our highlighting code, so we highlight most subtype declarations correctly.

Type annotations

Julia supports optional type annotations in functions and on variables. These are simple to highlight, but we need to get :: right before dealing with quoted symbols.

f(x::FooBar) = x

function foo()
    local x::Int8 = 5
    x
end

Variable declarations

Julia has a local keyword which lets you introduce local variable bindings. I’d love to highlight this correctly too.

global x = "hello world", y = 3

let x = 1
    x + 1
end

function foo()
    local x = 5
    x + 1
end

This requires parsing to handle correctly, so we don’t handle it yet. We can’t simply look for commas, as there may be arbitrary Julia expressions used.

# 'b' is not declared as a variable here.
global x = foo(a, b), y = 3

Colons and quoting

The hardest part of Julia’s syntax is :. There have also been users confused by this syntax.

# Quoted symbols
x = :foo
y = :function
foo[:baz]
[1 :foo]

# Not quoted symbols
foo[bar:end]
foo[bar:baz]
x = :123
for x=1:foo
    print(x)
end

I’ve opened a pull request that enables Emacs to handle the most common usages correctly, but this is very hard to get right in all cases.

Numbers

Finally, Julia has a really neat numeric syntax. It supports all the literals you could possibly want. It also lets you write 2x as a shorthand for 2 * x, which makes many equations in Julia much more similar to a maths textbook.

x = 0x123abcdef
x = 0o7
x = 0b1011
x = 2.5e-4

# Equivalent to '2 * x'
y = 2x

The Emacs mode currently doesn’t highlight these, but we probably should. Some Emacs modes highlight numbers, some don’t, but for a language with a focus on scientific computing, it would make sense to highlight numbers. It’s particularly helpful to help readers see that 2x is two separate symbols.

Conclusions

Julia’s syntax isn’t completely set in stone, but I doubt much of the syntax will change in ways that affect highlighting. The syntax favours readability over simple parsing (a great tradeoff), so writing a highlighter takes some careful thought.

Once you’ve got syntax highlighting working, it’s much easier to handle indentation. I think Emacs’ ability to indent Julia is pretty good (this blog post is plenty long enough without getting into indentation) and this is because it can fairly robustly identify block delimiters for highlighting.

Finally, it’s also desirable to have as-you-type syntax checking and linting. Flycheck will add support for this using Lint.jl as soon as Lint.jl/Julia performance is good enough to run on demand without a persistent process.

If you do encounter a bug with Emacs and Julia, there’s a ‘julia-mode’ issue label to track any bugs.

Happy hacking!

-1:-- Editing Julia code (with Emacs!) (Post Wilfred Hughes (me@wilfred.me.uk))--L0--C0--November 16, 2014 12:00 AM

Mickey Petersen: Emacs's switch to Git

After nearly ten months of hard work, Eric S Raymond (esr) has finished the transition from Bazaar to Git, and in the process cleaned up 29 years of ossified CVS references and other source control flotsam. ESR calls it “geologic strata” and he’s not even kidding. 29 years of continued development makes it unavoidable. If you haven’t been keeping up I suggest you read his article on the conversion.

The move to Git, I think, is a big one. Like it or not, but it won the source control fight. Bazaar lost (not that it ever had a chance of winning); Mercurial lost too (and it did have a chance of winning.) Git’s the right choice; it will significantly reduce the barrier to entry for new developers — well, you still need to sign over your code to the FSF, but it’s easier.

Lars Ingebrigtsen has written a great tutorial for newcomers interested in contributing to Emacs. I had no idea it was that easy to find and push bug fixes out. There’s a fancy Emacs package, debbugs, that makes it easy to do so (obviously.)

I hope the switch to git will renew interest in committing to Emacs.

-1:-- Emacs's switch to Git (Post)--L0--C0--November 14, 2014 09:55 AM

Emacs Redux: Quickly Open an Info Manual

Every Emacs user knows that Emacs ships with plenty of built-in documentation in the GNU info format (they don’t call it a self-documenting editor for no reason). Most Emacs users know how to access that built-in documentation with C-h i (M-x info) and some Emacs users even know that the Emacs manual can be opened directly with C-h r (M-x info-emacs-manual).

If you know the name of the manual you’re looking for, however, there’s a nice little-known alternative to using C-h i - the info-display-manual command. When you run it you’ll be prompted in the minibuffer for the name of the manual you’d like to view (manual name completion is available).

To give you a more concrete example of the command’s advantage over info let’s try to open the Emacs Lisp manual with both commands. With info you’ll have to type the following:

1
M-x info RET m elisp RET

And the alternative would be:

1
M-x info-emacs-manual RET elisp RET

If you like the command I’d suggest binding it to some keybinding:

1
(define-key 'help-command (kbd "C-i") 'info-display-manual)
-1:-- Quickly Open an Info Manual (Post)--L0--C0--November 13, 2014 01:25 PM

Emacs Redux: Emacs's Development has Migrated to Git

The long wait is over - Emacs’s development has finally migrated from bazaar to git.

Now you don’t have any excuses not to contribute to Emacs!

If you’re wondering where to start I’d suggest taking a look at this short article.

-1:-- Emacs's Development has Migrated to Git (Post)--L0--C0--November 13, 2014 01:19 PM

John DeRosa: Back to the Future

After my embarrassing post about anaconda, I’ve awakened a Jonesing for working again in Lisp. I think I’ll look for a project to contribute to — maybe start by fixing some minor bugs in an Emacs package, or something similar.


Tagged: Emacs, Lisp
-1:-- Back to the Future (Post John)--L0--C0--November 12, 2014 10:41 PM

Alex Schroeder: Oddmuse Development

Magit is cool. It works on my Emacs on Windows, too. Git integration! The picture shows that it uses ASCII art to visualize and colorizes the branching and merging. This also shows that I shouldn’t be developing on multiple machines.

Tags: RSS RSS

-1:-- Oddmuse Development (Post)--L0--C0--November 11, 2014 10:25 AM

Bozhidar Batsov: The Road to CIDER 0.8

I’m planning to release the long overdue CIDER 0.8 at clojure/conj 2014. I’ll be giving a talk there that will be mostly about CIDER, so this seems like a pretty good idea to me.

I’d like to ask you to do a bit of extra testing to the current snapshot builds, so we can deliver a solid release (if we’re lucky – the most solid ever). Guess you should pay extra attention to the new features.

If you want to get some issue fixed in time for 0.8 you’d better get started right away.

Thanks in advance for your help!

-1:-- The Road to CIDER 0.8 (Post)--L0--C0--November 10, 2014 01:27 PM

Mathias Dahl: Cake. Can have. Eat too.

A while ago, a friend of mine shared this informative article about why Atom (a new text editor by the Github team, it seems) cannot replace Vim. The author talks about the very useful composability property of Vi(m) and ends his article with this (do read the complete article though, especially if you are quite new to Vi(m)):
A new, shiny, modern editor could one-up Vim by fixing some (or hopefully all) of these issues. But before an editor can replace Vim, it needs to learn everything that 1976 has to teach — not just the lesson of Emacs, but also the lesson of vi.
Well, it might not be very "shiny", and "modern" is, I guess, very subjective, but there is already an editor that both have awesome extensibility and, optionally, strict modal behaviour with a "command" mode.

Which editor it is? Emacs, of course. Just fire up viper-mode, or pick one of the more modern Vi(m) emulation packages like Evil (here is a list of different emulation modes for Emacs) and you can now have your cake and eat it too.

Mmm. Cake.

-1:-- Cake. Can have. Eat too. (Post Mathias Dahl (noreply@blogger.com))--L0--C0--October 28, 2014 09:38 PM

Mathias Dahl: Keyboard activated favorites menu using "simple menu items"

Some time back I wanted to create a keyboard activated menu with one-key access to some favorite commands that I did not want to give one-key bindings in the global keymap and for which I do not want to type the names on the M-x prompt. I was going to write my own command to read the key for the favorite command. However, it turns out Emacs already had more or less what I wanted in the form of simple menu items.

I chose to use the "apps" key (on keyboards with two Windows keys, it's the key to the right of the right Windows key, with a little menu symbol on it) since I did not use that for anything in Emacs.

Here is how to try this little hack out (FYI the key/command combinations below are just examples and not the actual keys and commands I wanted to use):

(defvar my-favorties-map (make-sparse-keymap "Favorites"))

(define-key global-map (kbd "<apps>") my-favorties-map)

(define-key my-favorties-map (kbd "f") 
  (cons "Find file"
        'find-file))

(define-key my-favorties-map (kbd "s")
  (cons "Save current buffer"
        'save-buffer))

(define-key my-favorties-map (kbd "i")
  (cons "Kill buffer"
        'kill-buffer))

After evaluating the above, when typing the "apps" key, the following "menu" will be displayed in the echo minibuffer:

 Favorites: i = Kill buffer, Save current buffer, Find file

It does what I want, although it is a little bit peculiar in how it decides for what bindings it will show X = Command for, and not. Seems that if the name of the menu item/command begins with the same letter/key that is bound to the command, it will not show it.

So, there it is, an instant little text based menu for executing favorite commands.

Enjoy!

-1:-- Keyboard activated favorites menu using "simple menu items" (Post Mathias Dahl (noreply@blogger.com))--L0--C0--October 28, 2014 09:36 PM

Got Emacs?: Update your package search url as melpa.milkbox.net is now melpa.org

It's been a couple of days but the url has changed to melpa.org. You may need to change your .emacs file  from ("melpa" . "http://melpa.milkbox.net/packages/") to ("melpa" . "http://melpa.org/packages/")
-1:-- Update your package search url as melpa.milkbox.net is now melpa.org (Post sivaram (noreply@blogger.com))--L0--C0--October 26, 2014 02:09 AM

Sebastian Wiesner: Flycheck 0.21 released

I’ve just released Flycheck 0.21, the result of two months of work. It’s already on MELPA and Marmalade, so take a look at the release annoucement and the changelog, and update Flycheck with M-x list-packages RET U x.

Enjoy the new release, and many many thanks for your support!

-1:-- Flycheck 0.21 released (Post)--L0--C0--October 26, 2014 12:00 AM