Giter Site home page Giter Site logo

log's Introduction

Emojimacs

Sunday, December 31th, 2017.

So I set myself three goals for today:

  • See emojis inside Emacs.
  • Search and insert emojis inside Emacs.
  • Figure out an easy way to type emoji combos. (The native macOS Command-Ctrl-Space picker disappears every time you type out an emoji, so it sucks for making sequences like 😂😂😂😂😂 or combos like 🍑💨.)

Obs.: when I say “emoji” I’m referring to Unicode emojis. There are different solutions depending on whether you want to display Github or other types of emoji too.

1A) Seeing emojis, first pass

The Spacemacs emoji layer uses an emoji package that hasn’t seen an update in a while.

So I went with Iqbal Ansari’s emacs-emojify. Though it also doesn’t include the latest emoji, as evidenced by the glaring omission of the Colbert emoji 🤨, it does have a more recent last commit date.

It worked, and I could see emoji images, albeit a bit large and not too pretty.

But then I found out kind of by accident that actually Emacs did support native emojis on macOS (including the Colbert!), but that they were removed, and that it was a big scandal. Who knew emoji could get so heated 🌶!

To be fair, though I use proprietary hardware and software (MBP & MacOS), I sympathize very much with the FOSS cause and I understand the reasoning behind GNU Emacs’ decision. The interoperability argument and the analogy to web standards and Embrace-Extend-Extinguish are also sound.

But by then I had spent almost a day on this emoji thing, and I was hellbent on getting my funnies right!

1B) Seeing emojis, final solution

So I scraped emacs-emojify from my configs and went back to the drawing board. Another couple pomodoros and googles later I had come up with the solution, which I’ll present below without more pointless narration:

  • First of all you have to be compiling Emacs from source. Thankfully I was already running Remacs, which for now requires you to build from source, so I already had a cloned repo and the longer first compilation done. It’s super easy to do, you should totally check it out. Then,
  • git revert 9344612d3cd164317170b6189ec43175757e4231
  • ./configure --with-ns
  • make && make install
  • Add (set-fontset-font t 'symbol (font-spec :family "Apple Color Emoji") frame 'prepend) to spacemacs/user-config in your .spacemacs.

And you’re done!

UPDATE: now you don’t even need to do the git revert yourself if you’re on Remacs, because this PR by yours truly has landed. W00t! 😈🙌

2) Searching and inserting emojis

Emojify could’ve just worried about displaying emojis and called it a day. It would have still made it a great package. But it went further and implemented two insertion modes, and it deserves credit for that.👏👏👏

Though I couldn’t make the emojify-apropos-emoji copy commands work, the emojify-insert-emoji worked pretty well.

So while I’m no longer using emojify’s emoji displaying features, it’s definitely back on my packages list for inserting (some) emojis.

I also tried company-emoji but couldn’t get it to work.

3) Emoji combos

Picking from a filterable list is fine when you want to insert one emoji.

But when you want to insert a handful, it becomes very tedious.

What I really wanted was a virtual keyboard with memory of the most recently inserted symbols.

This could be achieved by making emojify 1) sort emojis by MRU, 2) stay open after inserting a symbol, and 3) assign numbers to the first entries so you could type quick succession of 11243111 and have your complex multi-face emotional expression.

This sounds like a great PR for when I get into writing elisp.

Until then, I’ll be using Chrome’s address bar as a temp buffer to both use more recent emojis and to copy/paste my way to combos. Oh well 😞

I didn’t want to end on a sad note so here’s some sparkles 🎊🎉🎈🎆

Happy New Year!! 🤩🤩🤩

TODOs

Implement this vim tip in Spacemacs evil with various capitalization goodies

Meta TODO: make TODO headings render differently in org-ruby. This sucks.

Links

Seriously awesome extension that allows you to use Emacs to write to a textarea or contenteditable field in Chrome, while keeping them in sync in real time via websockets.

The only thing it’s missing is adding an “Edit” link to the page itself so you can dispatch the command with Vimium instead of mousing over to the extension button and clicking it.

TILs

C-c C-l lets you edit an org-mode link when the point is on it

Org WYSIWYGings

Saturday, December 30th, 2017.

I don’t know what I found so scary about #+BEGIN_SRC and #+END_SRC, but I appreciate the built-in syntax highlighting that comes with org-mode once you specify the language.

What I found out is that Org mode is more WYSIWYG than I had imagined. That’s cool but not so cool sometimes.

Like when I use =, i l= to add links, I’m barely aware of what the text format for links actually looks like. (I just googled it now and it’s [[url][text]]. And I can’t even figure out how to see the syntax string instead of the WYSIWYGed link :|)

I think I’d rather have all the actual characters visible, but styled differently to show syntax application, like with bold, where the text gets styled, but I still see the asterisks.

TODOs

Make live preview / hot reload possible with org-ruby

I want to know what my makeshift blog will look like before pushing to Github.

Passing on Magit for now

Friday, December 29th, 2017.

First of all, can we just assume free text like this (that is, text that’s inside a heading, but not one itself or not any other kind of data) is Markdown?

I miss the easy code blocks with 4 spaces and backticks, and googling org mode code block just scared the shit out of me.

I’m sure there are a bunch of keybindings to make the pill easier to swallow, but the bare syntax just looks like a lot of typing, and hard on the eyes.

Back to Bash

I figured out the basic Magit commands, squeezed a commit out, and managed to push it to Github. But boy was that clunky.

I’m especially disfond of what I could make the `git log` equivalent churn out. For some reason the diff lines were cut off at around 60% width.

Plus, I hadn’t set up `evil-magit`, so I kept spitting out unwanted commands whilst trying to navigate text, it was a mess. (I later found out that the git layer includes evil-magit, but I managed to make a mess anyway. On a happier note, I found out that `=` replaces backticks for inline code formatting.)

It’s also hard to compete with my terminal-based git-fu, with all my beautiful auto-completed git aliases. Check this out!:

alias ga='git add'
alias gb='git branch'
alias gba='git branch -a'
alias gc='git checkout'
alias gd='git diff -w'
alias gf='git fetch'
alias gi='git diff -w --staged'
alias gl='git log --stat'
alias glp='git log --stat -p'
alias gm='git merge'
alias gp='git push'
alias gpl='git pull'
alias gs='git status'
alias gt='git stash'
alias gta='git stash apply'

Now pair that with this amazing bash script that adds completion to aliases, and you’ve got a killer combo. This stuff is welded into my fingers.

So for now I’ll take a step back and learn how drop iTerm2 in favor of some Emacs terminal first, then start dragging in what makes sense.

Hello Org Log

Thursday, December 28th, 2017.

So this is me trying to learn how to blog some links with commentary without leaving Emacs.

When I say Emacs from now on I mean “my l33t h4x0r Remacs HEAD + Spacemacs@develop super duper setup.”

What that really means is that I’m a n00b who didn’t want to start with “vanilla” Emacs and spend the next year setting it up, and just went with the “batteries included” approach.

It seems like Spacemacs is the Ubuntu of Emacs, and I’m all for (K|)Ubuntus.

Now, building Remacs and switching to the develop branch of Spacemacs was so breezeful and piece-of-cakely that it barely counts towards my street credit score. It does hugely towards their developers’ though.

Thank you, Wilfred Hughes, Sylvian Benner, et al. 🙏

One Org File

What I know about org-mode so far is that it’s a tree of stuff. That’s about it.

So for now this log will be a single org file that I’ll push to Github (much to the chagrin of whom’s name I’m deliberately not camel-caseing).

The single org-file structure seems to have worked pretty well for Mr. Malabarba, so let’s start there.

Of course, his setup is light-years ahead of anything I could dream of coming up with, but hey, gotta start somewhere.

Github automatically adds `#` links to headings, so each post gets its own URL. This is the simplest Org blog that could possibly work.

TODOs

What’s an Org file without a bunch of TODOs?

Figure out how to commit and push from within Emacs (no idea how to use Magit yet.)

Figure out how to display and input emojis on Emacs.

Seriously, this is not built in?? Where are your priorities, people? 🤨

Figure out how to properly timestamp org-mode headings.

Links

Give Remacs a try, you’ve got nothing to lose!

It’s super easy to set up, won’t break your Spacemacs, tracks the Emacs repo so you’re always up to date, and… it’s like Servo, but for Emacs, right? Gotta be good.

Good recap on the current weekly events in Emacs world. Also includes Spacemacs links. Lots of advanced stuff, but nice for getting up to speed with the community side of things.

log's People

Contributors

kbdluv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.