# Emacs Lisp: Toggle Between a Clojure String and Keyword

DevFeed: [Emacs Lisp: Toggle Between a Clojure String and Keyword](<https://devfeed.tech/articles/emacs-lisp-toggle-between-a-clojure-string-and-keyword-31901.md>)

Original publisher: [Read original article](<http://blog.jayfields.com/2013/05/emacs-lisp-toggle-between-clojure.html>)

Author: Jay (noreply@blogger.com)

Published: 2013-05-02T14:41:00Z

Content type: tutorial

Language: en

Sources: [Jay Fields](<https://devfeed.tech/sources/jay-fields.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [ClojureScript](<https://devfeed.tech/topics/clojurescript.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [conversion](<https://devfeed.tech/tags/conversion.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [emacs-lisp](<https://devfeed.tech/tags/emacs-lisp.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [string](<https://devfeed.tech/tags/string.md>)

## AI overview

This article presents an Emacs Lisp solution for toggling between Clojure strings and keywords, motivated by a refactoring task that required converting multiple Clojure keywords to strings. It also references a video demonstrating the behavior.

## Source excerpt

When I was doing a fair bit of Ruby I often used the TextMate's shortcut (Ctrl+:) to convert a Ruby String to a Symbol or a Ruby Symbol to a String. It's something I've periodically missed while doing Clojure, and yesterday I found myself in the middle of a refactoring that was going to force the conversion of 5+ Clojure Keywords to Strings. The following emacs lisp is my solution for toggling between Clojure Strings and Keywords. The standard disclaimers apply - it works on my machine, and I've never claimed to know emacs lisp well. A quick video of the behavior: © Jay Fields - www.jayfields.com