Category Archives: emacs

Reading these posts, you can probably tell that I really, really like the Emacs text editor.

View my Emacs configuration.

Check out Planet Emacsen to read other Emacs geeks’ blogs. For all things Emacs, check out the EmacsWiki.

New to Emacs? Start here:

Emacs Hangout 2015-04-15 show notes

We chatted about packages, packaging, databases, and the upcoming Emacs conference.

Event page: https://plus.google.com/events/c3igul0rj6cfc1qbcar91lrcj0s

What’s this Emacs Hangout thing about? This is an informal way for Emacs geeks to get together and swap tips/notes/questions. You can find the previous Hangouts or sign up for the mailing list at http://sachachua.com/blog/tag/emacs-hangout/ .

Upcoming Emacs Hangouts:

Emacs Lisp Development Tips with John Wiegley
April 28, 2015 Tue 4:00 PM Toronto time (8 PM GMT)

Emacs Hangout
April 30, 2015, at 2 PM Toronto time (6 PM GMT, 8 PM CET):

Want to find out about upcoming hangouts? You can sign up for notifications at http://eepurl.com/bbi-Ir or follow the Emacs conferences and hangouts page.

Timestamps are approximate since I was a little distracted. =)

  • 0:25:14 8:26 PM whoops, forgot to keep track of stuff. Before this: conversation about Unity/C#/etc. in Emacs; Spacemacs
  • 0:26:33 Howard demonstrates literate database queries with a remote SQL server. SSH tunnel + –protocol=tcp
  • 0:28:55 Naming the results of queries and then using them in a different calculation
  • 0:30:39 Hmm, might be a good technique for exploring old databases
  • 0:31:13 sx.el – StackExchange client
  • 0:34:16 howdoi-emacs
  • 0:34:57 sx setup, sx-tab-all-questions
  • 0:35:59 hydra sample use cases: opening files and directories, changing the quotation of strings, mode switching
  • 0:37:30 clone indirect buffers
  • 0:39:35 Cask
  • 0:43:27 use-package
  • 0:44:57 paradox
  • 0:49:11 packages
  • 0:56:02 Emacs conference stuff
  • 1:05:11 weird Emacs things =)
  • 1:07:43 Next up: literate config (Dylan, Sean)
  • 1:13:19 wrapped up

Text chat and links:

me 8:08 PM By the way, we can use this text chat as a backchannel. After the chat, I’ll copy it and share it with the show notes so that other people can grab links.
Howard Abrams 8:14 PM Here is my investigation of my save hooks in case you can kick off some sort of script: http://howardism.org/Technical/Emacs/save-hooks.html
me 8:15 PM External to Emacs, but possibly interesting: https://github.com/infospace/guard-java
Dylan Thiedeke 8:16 PM You said there was a ruby-guard? I will have to look into that for authoring and editing cookbooks and recipes for use with Chef
me 8:17 PM https://github.com/guard/guard ?
Dylan Thiedeke 8:18 PM Awesome! Will definitely be looking at that thanks Sacha
Swaroop C H 8:20 PM csharp layer – https://github.com/syl20bnr/spacemacs/blob/064a598bff56f7cef1ac2ddf1c43684357dde56a/contrib/lang/csharp/README.md ?
M. Ian Graham 8:21 PM Nice link Swaroop, I’ll see if I can pull it in
me 8:25 PM http://emacswiki.org/emacs/GnuGlobal
Swaroop C H 8:26 PM https://github.com/syl20bnr/spacemacs/pull/1169
Sod Oscarfono 8:32 PM +1 for being a bassist!
M. Ian Graham 8:32 PM https://github.com/vermiculus/sx.el
Howard Abrams 8:32 PM Here is the blog post about the literate database work: http://howardism.org/Technical/Emacs/literate-database.html
me 8:34 PM https://github.com/arthurnn/howdoi-emacs
Zachary Kanfer 8:48 PM There’s an Emacs song: https://www.gnu.org/fun/jokes/welcome-to-gnu-emacs.html and http://www.emacswiki.org/emacs/LyricMode
Samer Masterson 8:53 PM gimmie a sec, getting headphones
me 8:56 PM Question from a viewer: Why would someone use both Cask and use-package at the same time https://raw.githubusercontent.com/rejeep/emacs/master/init.el ?
Sod Oscarfono 8:57 PM i’m an ex-event manager… i’d be keen on helping get one happening in oceania
me 8:57 PM Oooooh
Sod Oscarfono 8:57 PM nz or aus maybe
Samer Masterson 8:57 PM https://goo.gl/forms/tv0sDuApd8
Dylan Thiedeke 8:57 PM Sod I’m in AU. Not qualified enough to present but would help out if I could
Sod Oscarfono 8:59 PM thanks Dylan. perfect/ any ideas on a rough idea of numbers of emacs users globally? by region? hard to quantify i realise but are we talking hundreds, thousands, hundreds of thousands do you think? keen as Samer… i’m nowhere near as proficient with emacs, or programming as most here but i have many other skills.. event management, audio engineer, graphic design and close connection with large format commercial printer
Dylan Thiedeke 9:03 PM Sod in Australia I couldn’t even imagine a number. Maybe poll the #emacs IRC channel on friend and the emacs group on G+
me 9:03 PM Sod: Woohoo! Awesomeness.
Dylan Thiedeke 9:04 PM Sod I’m not a programmer either but use emacs for documentations and starting to use it for project management with org-mode etc
Sod Oscarfono 9:04 PM community is the magic word when talking to me
Samer Masterson 9:04 PM emacsconf.github.io/emacsconf2015
Sod Oscarfono 9:05 PM feel free to add me Dylan we can fire some ideas back and forth. maybe a poll of interest in a local conf or meetup
me 9:06 PM Sod, Dylan: Neato!
Howard Abrams 9:07 PM I’m sorry, but I have to leave as well. Thanks for the fun and I will listen to the rest later.

2015-04-08 Emacs Lisp Development Tips with John Wiegley

You can find John Wiegley on Twitter (@jwiegley) or at http://newartisans.com/.

0:00:00 Paredit mode. Start with it from day 1! Matching pairs of parentheses, won’t let you delete one without the other. Inserts appropriate newlines, too
0:03:56 Emacs as a Lisp environment. (Also, Helm is what’s responsible for the display.) Evaluating a function makes it available in the global scope, which has all these functions and commands you can do. This makes it easy to iteratively develop your functions, because you can just execute things directly.
0:05:08 Without (interactive), you can’t call functions with M-x. You can use M-: or put the call in your scratch buffer.
0:06:00 command-log-mode
0:06:47 pp-eval-last-sexp. Check out http://github.com/jwiegley/dot-emacs for other config things
0:07:14 debugging. e to evaluate within the current context. Also, stepping, quit.
0:08:09 Edebug with C-u C-M-x. Interactive debugging. SPC moves you forward, one Lisp form at a time. It shows you results in the minibuffer. You can descend into Lisp forms or go into functions. ? shows keybindings. Check out the Emacs Lisp chapter on EDebug, highly recommendeg.
0:09:25 You can also use the (debug) form to go to the debugger.
0:10:26 eldoc: Seeing arguments in the minibuffer as you type, because no one remembers all the arguments anyway. eldoc-mode, or add (turn-on-eldoc-mode) to your config.
0:11:30 What functions should you call in the first place? What concepts? Emacs predates many standard terms, so that’s why things are a little confusing. Ex: “frames” and “windows” are not what you might think they are. OS window = frame. Area within Emacs = window. Opposite of HTML. Use the Emacs tutorial C-h t.
0:13:04 Read the Emacs Lisp intro, which you can get to with C-h i (which lists the manuals that are available). Read the Emacs Lisp manual too.
0:14:03 Other weird terms: point, mark, marker. (point) vs (point-marker).
0:15:35 C-h f (describe-function) shows the help for the function. Nearly all functions you’ll probably call are documented well. Lots of options. Check out C-h f for interactive, for example.
0:17:17 C-h v (describe-variable).
0:17:46 More in-depth documentation: C-h i, go to the Emacs Lisp manual, then use i to view the index.
0:18:22 info-lookmore shows you the Info documentation for the symbol under point. Works for other Lisps too (ex: Common Lisp)
0:19:46 Sanity-checking paired parentheses with M-x check-parens. Handy for adding to your after-save-hook in Emacs Lisp mode.
0:20:40 Paredit editing capabilities. Ex: C-k kills the current sexp. paredit-raise-sexp replaces the parent sexp with the following sexp. slurping and barfing. Barfing – spitting out an element from the list form. C-{ or C-} (with suggested keybindings). C-( and C-) are slurping, which pulls forms in. Works for strings, too.
0:22:38 Maximum barfage and slurpage. Useful for slurping everything in, for example. paredit-slurp-all-the-way-forward.
0:24:13 redshank (companion to paredit) for refactoring. Ex: redshank-condify-form converts an if to a cond for when you realize you’ve got more than two conditions.
0:25:05 M-1 M-( surround the next one thing with parens
0:25:25 redshank: wrap a let, change if to a when, etc.
0:25:52 C-h k (describe-key) shows what a keyboard shortcut or menu item will do.
0:27:26 Took a while to get used to paredit, but you eventually get into the zen of paredit.
0:27:54 Linter – M-x elint-current-buffer. Loads every module that your code depends on (so the first time is slow), and then shows you style notes.
0:28:50 C-q for manually inserting parentheses
0:29:10 Helm, which shows you all the other stuff that matches your query. Lets you select by regex, multiple patterns, etc. Much nicer and more interactive.
0:30:29 Profiler M-x elp-instrument-function, then call the function, then elp-results will show you the time it took to execute. Results aggregate, and are reset when you call elp-results.
0:32:30 Measuring memory consumption. Also, internal representation of lists. reverse vs. nreverse. Like nconc, nreverse, setcar, setcdr. This can greatly speed up your code, if you can avoid using the garbage collector. EmacsWiki – memory-use-counts, but not particularly helpful? Another package that extends the Emacs Lisp profiler? Avoid premature optimization.
0:38:55 elint and flycheck? flycheck’s designed for external processes, so that might be a challenge. Possibility: use async to spawn another Emacs? Doesn’t seem to be available yet.
0:40:40 ert
0:48:11 testcover, coveralls.io, undercover.el
0:48:13 Read Emacs Lisp manual, etc.
0:48:20 Creating a mode. You don’t have to make it from scartch – start by copying someone else, and then strip away everything you don’t want.
0:49:58 checkdoc – checks the style of your documentation strings.
0:51:30 defining a minor mode
0:56:08 when to define a major mode – structure of your buffer

The balance between doing and improving – evaluating yak-shaving

A reader wrote:

… I came to realize that many Emacs users seem to spend a great deal of time learning about Emacs, tweaking it, and writing new extensions, rather than getting non-Emacs-related work done. Sometimes it feels as though heavy Emacs users actually get less done overall, if you consider only non-Emacs-related tasks. My question is, is it possible to get work done in Emacs, without most of that work being Emacs-related?

It got me thinking about skills or tools that can be used to improve themselves, and the balance between using and improving tools.

2015-03-15c Skills or tools that can be used to improve themselves -- index card #learning #bootstrapping

2015-03-15c Skills or tools that can be used to improve themselves – index card #learning #bootstrapping

Not all skills or tools can be used to improve themselves. I’m learning how to sew, but that doesn’t lead to making my sewing machine better (aside from fiddling with the dials).

Here are some skills that can be used reflexively:

  • Philosophy asks questions about good questions to ask
  • Learning about learning helps you learn more effectively
  • Woodworkers and machinists have a tradition of making their own tools
  • 3D printers can print parts for their own models
  • You can program tools to help you program better: testing, version control, project management, etc.

Although making your own tools takes time, here are some advantages of doing so instead of buying them off the shelf:

  • You understand the internals better, and you can appreciate the subtleties
  • You can customize it to fit the way you work
  • You can create different variants for greater flexibility. Mass customization can’t anticipate or cost-effectively provide all the different types of things people may want.
  • As your skills and needs increase, you can create better and better tools for yourself.

Many programmers spend time deliberately improving their toolkits; if they don’t, they stagnate. At the basic level, people try programs or frameworks that other people have created. The next level might be scripting things to work together. A third level might be writing customizations or extensions, and a fourth level might be creating entirely new tools or frameworks. Beginner programmers might start at the first level of reusing other people’s code, but wizardly performance often involves a mix of the other levels.

So the question is: How can we balance doing things and improving things?

No one can answer this for you.

Me, I tend to avoid hard deadlines and I do things faster than people expect them to be done, so I have plenty of leeway to improve my tools – which helps me be even more effective, so it’s a virtuous cycle.

You’ll need to find your own balance. You might get urgent stuff out of the way first, and then figure out how to balance smaller requests with investing in capabilities.

Here’s something I put together to help you figure out where you might be in terms of balance. Alternatively, if you’re thinking about whether to pick up a skill or tool that can be used to improve itself, you can use this to evaluate what you read from people sharing their experiences with the tool. Can they find a good balance for themselves, or are they frustrated by the challenges of getting something to work?

2015-03-16a The balance between using and improving tools -- index card #learning #bootstrapping

2015-03-16a The balance between using and improving tools – index card #learning #bootstrapping

  • “I have what I need in order to work.” This is the basic scenario. People focus on doing things instead of improving things.
  • I can keep pushing, but performance is dropping, so I should invest time in maintenance.” It’s like the way a knife or a saw dulls over time. When you notice diminishing returns, it might be good to invest some time in maintenance. It’s not an urgent need, but it can pay off.
  • I’d better take care of this now before it becomes a problem.” This is like maintaining a car or taking care of your health. A little time now can avoid big problems later.
  • Grr, it’s broken. I have to fix it before I can work.” If you let things go for too long, or if you’re working with something finicky, you’ll be forced into maintenance mode. For example, some 3D printers require a lot of fiddling. Watch out for this scenario.
  • It’s fine the way it is, but I know I can make it better.” The way you’re currently doing things is okay, but you know (from your experience or from what you’ve read of other people) that you can invest a little time to work more effectively. You might even know the return on investment. It’s easy to decide whether you should just go ahead with the status quo or invest the time in improving.
  • It’s fine the way it is, but I think I can make it better.” The way you’re currently doing things is okay, but you have some ideas that might make it even better. If you think those ideas might be worth it, it might be good to give yourself a time limit for exploring those ideas so that you don’t get distracted. Alternatively, you can save it for a slower time.
  • I’m waiting or stuck, so I might as well work on tools.” Maybe you’re waiting for feedback from someone else. Maybe you’re waiting for programs to compile or tests to pass. Why not spend a little time exploring how to make your tools a little better?
  • I’m doing this for fun/learning.” Tool improvement can become more enjoyable than some of the other ways you used to like spending time. For example, you might find yourself wanting to watch a screencast or try out a tweak instead of watching TV or browsing random sites on the Internet. You don’t have to completely replace other activities, you just have to shift a little time from things that have less value to you.
  • I can’t write about my actual work, but I can write about this.” If you’re wondering about yak-shaving propensity based on the blog posts you’re reading, consider: do people write about their improvements instead of the work that they’re doing because their work is confidential or hard to explain? Maybe they think blog posts about improvements are more interesting. Maybe they’re writing about improvements in the process of figuring things out (which in an excellent process, by the way). All these things can skew your perception of how much time people spend doing things versus improving things, and how much they accomplish within that time.

In terms of Emacs, these things mostly apply to me:

  • “I’m doing this for fun/learning” – Emacs tickles my brain, and the community is wonderful.
  • “I can’t write about my actual work, but I can write about this” – I suppose I could write more about the other stuff I’m interested in (sewing? cooking?), so there’s that. However, the consulting stuff is covered by agreements, and that’s a small fraction of my life anyway.

I assume other geeks are rational, especially if they have a lot of experience with it and other tools. Therefore, if people spend time tweaking (while avoiding the consequences of low performance), I assume it’s because they see the value of doing so (whether the pay-off is certain or not). On the surface, an effective person’s behaviour might resemble an ineffective person’s behaviour – six hours sharpening the saw for two hours of work, or six hours procrastinating and two hours of cramming? But if you look at:

  • if they get stuff done
  • whether other people are happy with their performance, or if they generally appear successful in their endeavours
  • how happy they are about the process

then you can get a better idea of whether it’s working for them.

As you think about your own balance or read other people’s blogs, can you identify what scenarios you and other people might resonate with? Am I missing any that I should add to the list? Please comment below!

Emacs Hangout 2015-03-18 show notes

We chatted about Org coolness and workflows; learning Emacs and deliberate practice; speech recognition; alternate layouts.

Event page: https://plus.google.com/events/cbj3rg26d8j9ifaiff5uq00ncr4

What’s this Emacs Hangout thing about? This is an informal way for Emacs geeks to get together and swap tips/notes/questions. You can find the previous Hangouts or sign up for the mailing list at http://sachachua.com/blog/tag/emacs-hangout/ . The next Emacs Hangout will be on April 15, 2015, at 8 PM Toronto time (12 midnight GMT): https://plus.google.com/events/c3igul0rj6cfc1qbcar91lrcj0s Want to get notified about upcoming hangouts? You can sign up for notifications at http://eepurl.com/bbi-Ir .

Experimenting with org-timer. Times are approximate, despite the seeming precision. =)

  • 0:00:12 Intros
  • 0:04:22 Howard – Prettify Your Quotation Marks
  • 0:06:37 Org Mode Spreadsheets
  • 0:12:44 org-aggregate
  • 0:12:50 summing up tables
  • 0:15:38 Hiding things from export with :PRIVATE: .. :END:
  • 0:16:30 Navigation
  • 0:17:10 Relative line numbers
  • 0:19:32 Org prettiness: org-bullets
  • 0:20:51 EMagicians Starter Kit
  • 0:26:23 More table stuff
  • 0:27:32 Org Mode workflows, reasons to use Org
  • 0:28:16 Org to replace Markdown, executable code samples, etc. Literate programming. Attachments.
  • 0:29:34 Org tables
  • 0:30:11 Literate programming, technical notes
  • 0:30:49 Links
  • 0:31:54 Keeping all your notes, reference information, and so forth
  • 0:32:25 As a simple database
  • 0:34:59 Leo’s demo: Org task management, scheduling, linking, refiling, org-pomodoro (with sound and tweaks) and time reporting
  • 0:44:47 clock reports, clocktable
  • 0:46:09 C-u org-refile
  • 0:47:53 tagging strategies (prefixes, @ for contexts, etc.), search
  • 0:49:45 using org-drill
  • 0:51:19 scheduling vs using agendas
  • 0:51:34 org-habits for visualizing consistency
  • 0:54:34 erc and other IRC clients
  • 0:55:20 devices
  • 0:56:47 Other apps like Wunderlist – tasks to synchronize; work/home separation
  • 0:59:44 org-trello – close, but no cigar
  • 1:00:26 orgzly
  • 1:01:44 MobileOrg =( hasn’t been updated in a long time, etc.
  • 1:03:15 org-timer, meeting notes, colouring neato
  • 1:05:37 spacemacs as a way for Vi converts to try Emacs out
  • 1:06:47 keybindings – rebind lots, or not? a few frequently used ones? ErgoEmacs?
  • 1:10:23 hydra, key-chord, prefixes, see Sacha’s config for making key-chord more specific
  • 1:12:52 pair-programming? tmux and different modes?
  • 1:13:09 httpd, impatient-mode, multi-tty?
  • 1:18:04 deliberate practice and learning new things
  • 1:18:41 putting new things in a temporary section (1 month)
  • 1:19:02 reading blog posts (ex: planet.emacsen.org), reading configs, doc.norang.ca/org-mode.html
  • 1:21:29 cheat sheet
  • 1:22:14 another vote for a staging area (experimental.el)
  • 1:24:35 blogging is awesome, org2blog, etc.
  • 1:28:59 edebug is a great way to explore how things work
  • 1:31:39 watching over people’s shoulders when it comes to Emacs; Hangouts, virtual conference? Moderators are helpful. Handing a virtual microphone out – moderator names someone who can then check in, ask the question, etc. monitoring comments. (Could use help reaching out to speakers, organizing schedule, etc.)
  • 1:34:55 Speech interface: less navigation, just commands. Better speech integration – requires C, or can be done with Emacs Lisp? What you’re operating on is different. Intent (what has to happen) vs action (what to do), audio wizards with contextual grammar. Pretty far out still. Translating dictation-friendly names to code-friendly names and vice versa.
  • 1:42:02 Quick wins: accelerators, focusing on intent
  • 1:44:19 Context
  • 1:46:03 LaTeX for math notes? Export to LaTeX or HTML with images, inline images. LyX if you need WYSIWYG? Snippets can help you work at a higher level (instead of memorizing a lot)
  • 1:48:52 Alternative keyboard layouts and keybindings; also, typing less (abbreviations, expansions, thinking, etc.), Kinesis
  • 1:53:57 Speech recognition. Saying things again instead of editing.
  • 1:58:06 Suggestions – more Org workflows, chatting leading up to the next Hangout, asking for help

Text chat:

Philip Stark 8:04 PM This one?
Cameron Desautels 8:04 PM yup
Howard Abrams 8:04 PM Yes!
Cameron Desautels 8:04 PM If you guys haven’t seen this, we should all try to contribute and help out: https://github.com/sachac/emacsconf2015/blob/gh-pages/index.org
me 8:08 PM (Dan: I muted you because of background noise, but you can always unmute yourself when you’re ready to ask a question )
Jonathan Hill 8:10 PM does anybody know how to full screen the hang out? I guess I could just full-screen chrome on the mac..
me 8:10 PM If you reduce your font size a lot, the main screen gets bigger, but let me just ask Howard to increase his text scale
Leo Ufimtsev 8:11 PM Btw, I came across an aggregator module: https://github.com/tbanel/orgaggregate allows sql-like aggregation for tables
Jonathan Hill 8:14 PM Howard, I’ve got a sidebar question about how you’re jumping around with the cursor seemingly arbitrarily when you can find a convenient spot to answer.
me 8:15 PM He might not see the chat while screensharing, so maybe you can ask out loud when there’s a gap
Cameron Desautels 8:15 PM Could be the mouse Though it took me a minute to realize that.
me 8:16 PM By the way, the nifty bullets on the headings are probably because of org-bullets.el, if you like that effect
Jonathan Hill 8:16 PM his modeline is gorgeous
Cameron Desautels 8:16 PM That’s likely powerline. https://github.com/milkypostman/powerline (Busted!)
me 8:17 PM <laugh> Ooh, relative line numbers
Cameron Desautels 8:19 PM I think I have some bad lag. Sorry about that. My ISP is terrible.
jason Peak 8:22 PM hi everyone, sorry I’m late
Leo Ufimtsev 8:23 PM I don’t think I’ll have time to prepare org-aggregator in this hangout. I can show a org-dot-emacs setup thou. Or some stuff on time-reporting
me 8:23 PM No worries!
jason Peak 8:24 PM yep
Philip Stark 8:26 PM how do you increase the font quickly?
Cameron Desautels 8:26 PM C-x C-=
Philip Stark 8:26 PM and decrease would be C-x C–?
Cameron Desautels 8:27 PM (text-scale-adjust) yep!
Philip Stark 8:27 PM great, thanks.
Will Monroe 8:28 PM I spend most of my time in emacs in org-mode FWIW
Leo Ufimtsev 8:30 PM I’m on twice. My hangouts crashed on my phone, (black screen). @Sacha would you be able to kick out my 2nd instance? (the one with black screen, not the one with picture)
Leo Ufimtsev 8:31 PM thanks
jason Peak 8:31 PM Complete beginner – I like the idea of using org as an organically developing a database of My stuff
Cameron Desautels 8:32 PM Will: that’s interesting. Do you want to speak about your uses? You might have a unique perspective.
Jonathan Hill 8:32 PM WOW That’s absurdly powerful, S
Will Monroe 8:33 PM Cameron: I’d be glad to. Very much a beginner though! ; )
Cameron Desautels 8:33 PM There are other beginners here—it’s probably exactly what they’d need!
Philip Stark 8:34 PM yeah
Leo Ufimtsev 8:35 PM I could show some things if folks are interested.
Howard Abrams 8:40 PM Can’t believe that Chrome crashed and I lost the chat history… I’ll try to catch up.
Philip Stark 8:41 PM http://0paste.com/7356-3b5998af chat history so far.
Will Monroe 8:45 PM Is that ticking?
Howard Abrams 8:46 PM The problem with demonstrating org-mode is not revealing too much about ourselves. Good thing we’re among friends, eh?
Cameron Desautels 8:46 PM haha, indeed
Philip Stark 8:46 PM indeed. and on youtube :S
Cameron Desautels 8:46 PM Just don’t read the comments. :p
Will Monroe 8:46 PM Ha!
jason Peak 8:47 PM how many tags is too much ?
me 8:47 PM Heh. Should I redact this text chat segment from the show notes?
jason Peak 8:47 PM how many tags are too many ?
Will Monroe 8:48 PM That’s a great question.
jason Peak 8:48 PM loaded question; just curious about others no mic, Sacha thanks, Will!
Jonathan Hill 8:49 PM someone has a lot of static on their mic
me 8:50 PM That’s Leo’s background noise, oh well.
Philip Stark 8:50 PM That’s Leo, I think. he’s probably on a phone.
me 8:50 PM <laugh!>
jason Peak 8:51 PM I’ve wondered about namespacing tags; org does not support namespaces as part of its tag data structure, though? Maybe I need to make it ?!!
me 8:51 PM I recognize that technique
jason Peak 8:51 PM thank you! yes
me 8:51 PM jason: You can probably combine a tag with other search filters, like the category (file)
Cameron Desautels 8:52 PM org-habit
jason Peak 8:53 PM sacha: thank you, I will exploreit
me 8:53 PM
Cameron Desautels 8:54 PM His setup minds me of mine from a couple years back…these days I use org-mode less because I want my tasks and calendar notifications on all of my devices. *reminds me
Will Monroe 8:54 PM I would love to hear about simple setups for erc
Philip Stark 8:55 PM What is erc?
Will Monroe 8:55 PM or any other emacs irc client
Howard Abrams 8:56 PM I like circe.
Jonathan Hill 8:58 PM Cameron, what about a cloud-based sort or read-only solution like syncing your stuff on dropbox or google drive or something? s/sort or/sort of/
Cameron Desautels 8:59 PM Yeah, I’ve actually tried that sort of thing, exporting an HTML version of my list into Dropbox so I could read it on any of my devices.
Howard Abrams 8:59 PM http://goo.gl/uWjFye
Cameron Desautels 8:59 PM But I’d really like r/w access on multiple platforms.
Cameron Desautels 9:00 PM And more ability to filter on the go.
Leo Ufimtsev 9:01 PM Sorry about vacum cleaning noise >_<
jason Peak 9:01 PM trello is great! not sure about the integration
Cameron Desautels 9:02 PM http://www.orgzly.com/
Jonathan Hill 9:02 PM There’s MobileOrg in the App Store for IOS
Leo Ufimtsev 9:04 PM I was wondering about that. Nifty.
jason Peak 9:04 PM very nice!
Jonathan Hill 9:04 PM does org-calendar interface with Exchange calendar with a tolerable level of setup pain?
Will Monroe 9:05 PM Jonathan: someone recently released an interface for Exchange.
Cameron Desautels 9:05 PM https://github.com/syl20bnr/spacemacs
Will Monroe 9:06 PM It was announced on the listserv…can’t recall the name. But it was within the last few weeks.
Leo Ufimtsev 9:09 PM I use a different keyboard layout “Colemak” (like modern Dvorak). I found emacs was more friendly for non-standard keyboard layouts like colemak.
jason Peak 9:09 PM I’m back, but only to say goodbye for now; Sacha, everyone, thanks for all you’ve shared; I look forward to being back here soon…
Leo Ufimtsev 9:09 PM take care
Will Monroe 9:09 PM bye jason!
Will Monroe 9:14 PM Leo: thanks for mentioning that. I’ve wondered about other keyboard layouts being more /less appropriate for emacs too.
Howard Abrams 9:17 PM I need to run, but I wanted to point out this gist that I wrote today … https://gist.github.com/howardabrams/67d60458858f407a13bd
me 9:19 PM (I use Dvorak, and haven’t remapped extensively – I mostly keep things the same, although my key-chords are Dvorak-friendly)
Leo Ufimtsev 9:20 PM http://doc.norang.ca/org-mode.html http://emacs.stackexchange.com/ <<< very good place for asking for help http://www.emacswiki.org/emacs/OrgDotemacs << organise your .emacs in orgmode
Cameron Desautels 9:26 PM https://gist.github.com/camdez/c0f4c53ee847d5d1e2f0 ^ That’s how I add my experiments. Nothing fancy, but it gets the job done. If you use org-mode you could use capture targets for something similar.
Will Monroe 9:29 PM Thanks, Cameron! That’s a great idea. I like the idea of keeping new and potentially unstable functions in a separate file…and the idea of commenting on them could lead to a nice diary of sorts.
Cameron Desautels 9:30 PM Exactly. Plus I don’t commit this so I don’t have to be embarrassed about pushing gross code to my public config.
me 9:30 PM Cameron: Hah! That’s a great idea. Although maybe I’ll keep the weird area in my config, just because
Cameron Desautels 9:31 PM Oh, and I load it like this so someone can pull down my config and have it still work whether or not the file exists: (load camdez/experiments-file ‘no-error)
Will Monroe 9:34 PM Thanks!
Jonathan Hill 9:35 PM @cameron I didn’t know about ‘no-error. neat trick
Leo Ufimtsev 9:35 PM Use trello lol
Cameron Desautels 9:39 PM Jonathan: really that argument can be anything non-nil, I just use that symbol name so it’s self-explanatory.
Jonathan Hill 9:39 PM Thinking Miserable? was that the phrase?
Cameron Desautels 9:40 PM ¯\_(ツ)_/¯ I’m not entirely sure how we got here.
me 9:41 PM It’s a thread from near the beginning of the Hangout in a Q&A question (Eric said he might have something to demo), so it’s not quite connected to the conference conversation
Leo Ufimtsev 9:41 PM Is the voice recognition business cross-platform or specific to windows/mac/linux?
me 9:41 PM (Although we can continue that in the backchannel if people have ideas/suggestions)
Cameron Desautels 9:42 PM Ah! Ok. I must have missed the thread.
Eric S. Johansson 9:42 PM https://docs.google.com/drawings/d/1M-TzfRaSaAhFXQk1OmcmHNOaW31_7W_7q0bf8CAJqSw/edit
Leo Ufimtsev 9:46 PM Btw, does anyone use Emacs with Latex.>? for math notes..?
Will Monroe 9:50 PM Sacha (or anyone): this is a much earlier comment you made, but I’d be interested in hearing about your experience using the “standard” Emacs keybindings with Dvorak some time. Maybe during the next Emacs Meetup!
Jonathan Hill 9:54 PM /me E I gather that’s likely not what you actually said. I seem to have gotten stuck on it, though
Will Monroe 9:56 PM Thanks for the advice, everyone. This was the first time I’ve been able to interact with so many Emacs users. Hope to return next month and perhaps again at the possible conference. All the best!
Cameron Desautels 9:57 PM Take care, Will. Nice to meet you.
me 9:57 PM See you!
Leo Ufimtsev 9:57 PM See you next time :-=
Will Monroe 9:57 PM You too! Mabye next time I’ll have something to share.
Jonathan Hill 9:58 PM /me C let me get your info before we go if you don’t mind oops

Emacs Org Mode and the power of plain text

When I build a tool for other people to use and I want to store data, I usually have to think in terms of relational databases: tables, fields, and queries. There are other kinds of databases out there, like ones with flexible documents or ones that are optimized for graphs, but I haven’t gotten the hang of them yet.

When I build a tool for myself and I want to store data, I usually use plain text. (Or maybe a spreadsheet, but now that I’m getting the hang of Org Mode tables, I’m leaning more and more towards text.)

2015-02-02 Plain text -- index card #data #organization #pkm #org

2015-02-02 Plain text – index card #data #organization #pkm #org

I like the flexibility of plain text. Sometimes I want to organize my thoughts in an outline or an index. Sometimes I want to make a graph, like the way I wanted to visualize how my goals are related to each other. Sometimes I change my mind about what I want. (All the time, actually. =) ) Plain text lets me add structure the way I want to. It’s all in my text editor, so I can move things around or reorganize things using the tools in Emacs.

Sure, sometimes I mess up because of formatting mistakes or the lack of validation. For example, typos in my personal ledger show up when the numbers don’t match my bank balances or there’s a new category with a misspelled name. But these are easy enough to catch and fix, and I can’t completely guard against them with a database anyway. And it’s nice to know that version control can let me visually step through the changes or recover from mistakes.

What about speed? Databases can be much faster than plain text for large quantities of data, for sure. I tend to work with pretty small quantities of data. For example, my blog index has 3257 lines, and the file that I’m drafting this in is under a megabyte. Even with whatever Emacs Lisp I’ve written to extract or cross-reference data, I’m still mostly bottlenecked by my brain instead of my computer. Sure, it took me a little longer to figure out how to do table calculations using Org Mode, but now that I have some notes on that, I should be able to come up with future calculations more easily. Besides, if I need to analyze things quickly, I can export and then crunch the numbers using a different tool.

Speaking of tools, staying with lightly-structured plain text lets me build a toolkit of text manipulation techniques. When I’m editing things in Emacs, scripting with Emacs Lisp, searching with grep, or writing Javascript/Ruby/Perl code to work with text, I’m developing skills that I can use in a wide range of situations.

If you’re interested in keeping your data in plain text with Org Mode, here are some tips that can help you learn how to work with your information.

Start with tables

  1. Learn how to use keyboard shortcuts to create, move, or delete rows and columns.
  2. Learn how to sort tables.
  3. Learn how to use the column with specifier (ex: <10>) to limit the displayed size of your column while still being able to add more information.
  4. Use Org Mode’s support for calculations to do math or perform other operations on your table.

Consider using properties

Org tables don’t do well with paragraphs or more complex information, so you might want to use Org subtrees with properties.

You can use Org columns to display property values, or use Org dynamic blocks to put a summary of the values into your Org Mode file. See org-collector.el for a propview report.

If you want more control, you can work with the information using Emacs Lisp. You can use org-entry-get, org-entry-get-multivalued-property, or org-entry-get-with-inheritance to get the value of the property. If you want to go through all the subtrees (or a subset of them), use org-map-entries to call your own function at each of the matching headlines in the scope. org-heading-components will give you the information from the current heading, and you can use org-end-of-subtree to give you the boundary of the subtree if you want to process it further.

You can parse Org Mode lists with org-list-struct. I haven’t dug into this deeply yet, but it looks interesting.

Parse free-form text

In addition to working with tables and properties, you can write functions that use regular expressions or other techniques to extract data from text. re-builder can be useful for visual feedback while you’re figuring out the right regular expression to build. Remember, you’re in Emacs, so you don’t have to come up with the perfect regular expression that extracts all the data in one go. You can search for a regular expression, use a command like forward-line, save something to a variable, and so forth. Try thinking about how you would do something by hand, and then using repeat-complex-command to see what functions Emacs called when you did that.

save-restriction, narrow-to-region, and save-excursion are very useful when it comes to limiting the scope of your processing or saving your position, so check them out in the Emacs Lisp manual.

I find plain text to be really useful when I’m figuring things out (so, all the time), since I don’t have to build a complex interface for working with it. As I learn more about Org Mode’s features, I find myself using it for more and more of my data. Org’s slogan is “Organize your life in plain text!” – and I think it just might be serious about that!