Slack Emacs



Both Emacs and Vim are designed by coders, for coders, have insane amounts of extensions, have scripting (in Lisp, infamously for Emacs), and are frequently used with built in tools that let coders navigate through source code, run compilers & other programming tools, get post-mortems from crashed code fed through the debugger, etc. Load the Elisp file like this: (load 'ol-emacs-slack.el') (require 'ol-emacs-slack) Then visit an Emacs Slack buffer and run org-store-link to store a pure Org Link to that buffer. Ideas on how to use this. An article in The Next Web proclaimed 'Slack is quietly, unintentionally killing IRC,' and this switch has also come to many open source communities. The developers behind Wordpress, for example, have switched to Slack for their team communications. But Slack is a closed source SaaS tool, and it's far from the only name in the game.

  1. Emacs Slack Client

Too long; didn't read

I like my Emacs modeline to be clean. Emacs Slack uses Circe'stracking.el and I show here how to mute it so that new Slackconversations leave you focused.

Emacs-slack send file

The hack for now is (defun tracking-status () ') in yourconfiguration, while hopefully this PR will get merged soon.

The problem

Slack

My Emacs modeline is precious. I like to keep it minimal: filecharacteristics, lines, major mode and Org clocking.

A lot of modes propose their alerts to appear in the modeline. Forsome time, for example, I used happily mu4e-alert, and I ended uprealizing that little blinking in the modeline disrupted myconcentration. Some users would likely find counterproductive to havefeeds, emails and Slack running in Emacs if you care for yourconcentration (for example, I am referring here to Manuel Uberti'srecent post).

I like these tools in Emacs because I can customize them to myworkflow: having Slack conversations end up in my Org Agenda and beingable to access them with one click facilitates my work while delayingdistractions.

Emacs Slack notifications gave me some troubles though: any newmessage in my agenda would also have an entry in my modeline.Distraction!

It is a problem indeed

The funny thing is that you end up doing bad stuff, although you knowit is deleterious. As soon as I receive a Slack message in a channel Ihave joined, I end up instinctively clicking on the modeline entryEmacs Slack created for me. Naturally, most of the time is a waste oftime, and I interrupted my work for nothing.

Other nasty bit? There is a notification for each channel that hadsome activity. If you have many channels, the list of channel namesoccupy the whole modeline! Goodbye dear Org Clock, goodbye columnnumber!

Or not?

And there is a solution

Well absolutely not! I started looking for an Emacs Slack variable tocustomize, and I discovered the mode uses a third party library fortracking buffers activity: Circe's tracking.el. And they have thevariable I was looking for: tracking-max-mode-line-entries! You canlimit the 'abusive' occupation of the modeline by (setqtracking-max-mode-line-entries 1): this will limit the number ofentries in the modeline to 1.

Emacs

As you can imagine that is insufficient for me, so I immediately try(setq tracking-max-mode-line-entries 0). Unluckily that uncovers abug: there is still an entry in my modeline. So I need to hack my waythrough, you can get rid of the function altogether by overwriting thefunction that generates the modeline string (defun tracking-status ()nil).

That really felt a hack, so I also opened an issue and now a PR toallow fellow distraction-free users to have it their way.

In my fixing effort I also discovered there is an alternative testinglibrary for Emacs from the same author of Circe:https://github.com/jorgenschaefer/emacs-buttercup. I will likely writesomething about it because I like testing and I typically use ERTwhich comes by default.

Conclusion

Keep your state of flow distraction free! Here I showed how for methat means to keep my modeline free from Slack notifications, and Ihope you find your own peace of mind while you are at work.

Emacs Slack Client

I wish you mindful hacking!