Browse Source

Back issues imported to Gemini and a home page

Ismael Arenzana 1 year ago
Signed by: isma
GPG Key ID: D5586DE2A32CBC3C
  1. 3
  2. 7
  3. 85
  4. 225
  5. 97
  6. 281
  7. 111
  8. 89
  9. 236
  10. 79
  11. 34
  12. 144
  13. 7
  14. 41

.gitignore vendored

@ -0,0 +1,3 @@


@ -0,0 +1,7 @@
# Testing blogging from emacs
# Heading
This post was written and published from within emacs


@ -0,0 +1,85 @@
# Emacs, Lovely
For the last few months I've been tinkering with Emacs at a deeper
level. I got started with it at my first job as an intern 15 years ago
and have not looked back ever since. To be completely honest, I don't
remember how I learned. All my colleagues used it and I got started with
some basic modes thanks to them. I suppose I had better memory 15 years
For those who don't know, Emacs is a text editor created by Richard
Stallman, David Moon, and Guy Steele in 1976. It's available for nearly
every platform known to man and can be customized to infinity. A friend
jokes about how if Emacs was an operating system, that's the one I'd
Reality is, to be able to get around Emacs you just need to learn a few
things, such as dired commands, open, close buffer, save, search,
etc. But it can go so much further! Did you know that you can find out
the lunar phases with `M-x lunar-phases'?
# How Emacs works for me
Alright, fair enough, the lunar phases tip is not strong of a reason
to switch to Emacs (or to even try it). But this editor, to me, has
been the perfect fit for several purposes. Here's a few:
* Thanks to `org-mode', I write a journal, take notes, have my TO-DO
list, write technical documentation, and manage JIRA tickets.
* `go-mode' is an excellent Go IDE that I use every day.
* `shell-mode' to use the shell while you're writing code.
* `twittering-mode' :blush:
I code all my software and do all my writing using Emacs. It works
well for me. I wish multi-language support was more straight forward
and, while I have figured it out for the most part and feel
comfortable with it, setting it up wasn't trivial.
# Where it falls short for me
Emacs, however, is not for everyone. First of all, I tend to recommend
`vim' to newbies thanks to its wide support. But that's not the
point. Emacs hasn't been perfect for me (so far) for a few things:
* Raltime Communications. I use [Telegram] and [Slack] on a daily
basis; while there are modes for both on Emacs, they are not great
or as convenient as the native alternatives or other command line
* Email. I have tried and made it work. I've used `gnus',=mu4e=, and
`notmuch'. While `notmuch' worked the best for me, handling 3
accounts and a somewhat large index made Emacs sluggish and
unresponsive. I'll stick to [Thunderbird] for now.
Again, these didn't work for me, but your mileage may vary.
=> Telegram
=> Slack
=> Thunderbird
# Best resources
The beauty of this community is how responsive and supportive it
is. Here are some of the best resources I've found for all things
* [Stackoverflow]. Duh!
* [/r/emacs] to learn how other people are using the editor.
* The original [Emacs Manual] by Mr. Stallman himself. Consider
purchasing the [printed version] and support the FSF.
* The [org-mode manual] for all things `org-mode'.
* [Mastering Emacs] is an amazing resource. Similar to the Emacs
Manual but easy to read and more practical. Worth every penny.
=> Stackoverflow
=> /r/emacs
=> Emacs Manual
=> printed version
=> org-mode manual
=> Mastering Emacs
# Where to go from here
My plan is to publish my `.emacs' file and explain it part by part, so
stay tuned for more Emacs goodness.


@ -0,0 +1,225 @@
# Emacs Go Mode
You will notice how much I use "me" and "I" on this post. This because
your emacs configuration is extremely personal. You are creating a
"dream editor", and the options that I pick might not be of your
preference. Feel free to make it your own!
Back on topic. I started writing Go in late 2015. At first, I used
[Sublime Text], which I like a lot, but I was a little jealous of those
using [vim-go] and I figured there would be a way to make myself at home
writing Go in Emacs. This is how the adventure began.
=> Sublime Text
=> vim-go
# Find a Mode!
The first thing I had to do was find a major mode for Go on emacs. It
didn't take me long to find [go-mode]. Installation is not hard, as
it's available as a package in the MELPA repository. A simple `M-x
package-install go-mode' sufficed. Configuring it was a bit harder.
=> go-mode
# Configuration
This is my `.emacs' configuration for Go.
;;Load Go-specific language syntax
;;For gocode use
(defun go-mode-setup ()
(add-hook 'go-mode-hook 'go-mode-setup)
;;Format before saving
(defun go-mode-setup ()
(add-hook 'before-save-hook 'gofmt-before-save))
(add-hook 'go-mode-hook 'go-mode-setup)
(defun go-mode-setup ()
(setq gofmt-command "goimports")
(add-hook 'before-save-hook 'gofmt-before-save))
(add-hook 'go-mode-hook 'go-mode-setup)
;;Godef, shows function definition when calling godef-jump
(defun go-mode-setup ()
(local-set-key (kbd "M-.") 'godef-jump))
(add-hook 'go-mode-hook 'go-mode-setup)
;;Custom Compile Command
(defun go-mode-setup ()
;; (setq compile-command "go build -v && go test -v && go vet && golint && errcheck")
(linum-mode 1)
(setq compile-command "echo Building... && go build -v && echo Testing... && go test -v && echo Linter... && golint")
(setq compilation-read-command nil)
;; (define-key (current-local-map) "\C-c\C-c" 'compile)
(local-set-key (kbd "M-,") 'compile)
(add-hook 'go-mode-hook 'go-mode-setup)
;;Load auto-complete
(require 'auto-complete-config)
(require 'go-autocomplete)
;;Go rename
(require 'go-rename)
;;Configure golint
(add-to-list 'load-path (concat (getenv "GOPATH") "/src/"))
(require 'golint)
;;Smaller compilation buffer
(setq compilation-window-height 14)
(defun my-compilation-hook ()
(when (not (get-buffer-window "*compilation*"))
(let* ((w (split-window-vertically))
(h (window-height w)))
(select-window w)
(switch-to-buffer "*compilation*")
(shrink-window (- h compilation-window-height)))))))
(add-hook 'compilation-mode-hook 'my-compilation-hook)
;;Other Key bindings
(global-set-key (kbd "C-c C-c") 'comment-or-uncomment-region)
;;Compilation autoscroll
(setq compilation-scroll-output t)
# The Basics
That's a lot! Yeah, I know, but before you freak out, I'll give you a
run down of what each block is for (although the comments should help
a lot).
;;Load Go-specific language syntax
;;For gocode use
(defun go-mode-setup ()
(add-hook 'go-mode-hook 'go-mode-setup)
;;Format before saving
(defun go-mode-setup ()
(add-hook 'before-save-hook 'gofmt-before-save))
(add-hook 'go-mode-hook 'go-mode-setup)
(defun go-mode-setup ()
(setq gofmt-command "goimports")
(add-hook 'before-save-hook 'gofmt-before-save))
(add-hook 'go-mode-hook 'go-mode-setup)
This block enables `go-mode' and makes sure it runs `gofmt' before
saving. `gofmt' allows our code to be nice and tidy and to let
`go-mode' take care of importing the required packages. Nifty, huh?
Makes coding nicer.
# Making life even easier
Some extra elements to make our lives easier. Not necessary, but nice
to have.
;;Custom Compile Command
(defun go-mode-setup ()
;; (setq compile-command "go build -v && go test -v && go vet && golint && errcheck")
(linum-mode 1)
(setq compile-command "echo Building... && go build -v && echo Testing... && go test -v && echo Linter... && golint")
(setq compilation-read-command nil)
;; (define-key (current-local-map) "\C-c\C-c" 'compile)
(local-set-key (kbd "M-,") 'compile)
(add-hook 'go-mode-hook 'go-mode-setup)
This is a good one. Here I'm configuring `M-,' (Escape key + comma) to
run `go build', `go test', and `golint'. Extremely simple way make
sure our code compiles.
# Autocomplete and Linting
;;Load auto-complete
(require 'auto-complete-config)
(require 'go-autocomplete)
;;Go rename
(require 'go-rename)
;;Configure golint
(add-to-list 'load-path (concat (getenv "GOPATH") "/src/"))
(require 'golint)
Sets up `go-autocomplete' and `go-rename'. `go-rename' only is used if
you want to do project-level renames. Just between us, I barely use
The last block configures the path of the linter. Remember, Emacs is
smart, but not /that/ smart.
# Beautify our editor
;;Smaller compilation buffer
(setq compilation-window-height 14)
(defun my-compilation-hook ()
(when (not (get-buffer-window "*compilation*"))
(let* ((w (split-window-vertically))
(h (window-height w)))
(select-window w)
(switch-to-buffer "*compilation*")
(shrink-window (- h compilation-window-height)))))))
(add-hook 'compilation-mode-hook 'my-compilation-hook)
All of this to make the compilation buffer smaller than a default
;;Other Key bindings
(global-set-key (kbd "C-c C-c") 'comment-or-uncomment-region)
How about a simple command to comment out big blocks of code? `C-c
C-c'. Also, `compilation-scroll-output' simply scrolls the compilation
buffer all the way to the end.
# What's left?
This is my current set up. It works really well for my needs, but it
might not be yours. Something I'll work on is to integrate `delve'
(golang debugger) into the editor, but I suppose I'm quite old school.
I also have [Magit] integrated into my workflow, but that's a topic
for a different episode. To be honest, I don't miss anything from
Sublime (or Atom or MS Code), plus it already makes use of my favorite
editor. A simple `.emacs' file gives me all the customization that I
need and I know I always have MY set up everywhere.
=> Magit


@ -0,0 +1,97 @@
# Emacs Locale Management and Input Methods
I was born in Spain, and have lived there most of my life. In fact, I
just moved to the US 6 years ago. This means that a lot of my spoken and
written communication is still in Spanish, mostly overseas with family
and friends. Working with special characters non existent in the English
language (think ñ, á, etc) is not as straight forward as it is on MacOS
for instance, where `Alt + e + a' will result in á.
# Temporarily enable an input method
By default, Emacs doesn't have an [input method]. Which means that
special characters will not be very convenient to insert. To be able
to switch languages, you will need to set an input method. In my case,
`latin-1-prefix' will be the chosen locale. To do this, run `M-x
set-input-method' and then choose the locale. This will most likely
affect your editing mode when special characters are no longer needed,
therefore to disable the input method, just issue `M-x
toggle-input-method' or just `C-\'.
=> input method
# Permanently enable an input method
This all works well when you want to write using a different locale
temporarily, but it doesn't work well when you want to have an input
method enabled every time you're in a mode. For instance, if I want to
type text in Spanish every time I'm in `org-mode', I would need to
issue the `M-x set-input-method' command every time I open this
mode. This is obviously an inconvenience, and the Emacs life is all
about making the editor just the way you want it.
To permanently set an input method for a mode, we will need to add
something like this to our init file.
;; Set latin-1-prefix as default locale
(setq default-input-method "latin-1-prefix")
(defun activate-default-input-method ()
(activate-input-method default-input-method))
(add-hook 'org-mode-hook 'activate-default-input-method)
Here we are indicating that `latin-1-prefix' will be our new
`default-input-method' and the function will enable this method for
`org-mode'. This way, every time we open `org-mode', I will be ready
to type in Spanish. This is a white-listing approach, where we select
the modes that will have an input method applied, but we can also take
the opposite approach. A blacklist method approach will enable an
input method for ALL modes except for the ones indicated. This was the
first approach I took, but soon realized that I have too many key
bindings that would be disabled by the special character keys. Here's
an example of the blacklist approach.
;; Set latin-1-prefix as default locale
(setq default-input-method "latin-1-prefix")
(defvar use-default-input-method t)
(make-variable-buffer-local 'use-default-input-method)
(defun activate-default-input-method ()
(if use-default-input-method
(activate-input-method default-input-method)
(add-hook 'after-change-major-mode-hook 'activate-default-input-method)
(add-hook 'minibuffer-setup-hook 'activate-default-input-method)
(defun inactivate-default-input-method ()
(setq use-default-input-method nil))
;; Blacklisted modes
(add-hook 'c-mode-hook 'inactivate-default-input-method)
(add-hook 'go-mode-hook 'inactivate-default-input-method)
(add-hook 'markdown-mode-hook 'inactivate-default-input-method)
(add-hook 'sh-mode-hook 'inactivate-default-input-method)
This way, we are enabling `latin-1-prefix' as the default input method
for everything except for `c-mode', `go-mode', `markdown-mode', and
`sh-mode'. While these cover many of the options that I use on a
regular basis, `dired' and other modes that I use very frequently
would still be screwed up and the blacklist would grow too
large. Whitelisting `org-mode' is enough for now. I might consider
`message-mode' for writing emails in Spanish, which I do like 10% of
the time, or `text-mode' (that I don't use that often).
# Summary
Overall I feel very happy with this set up, but still needs some minor
tweaking. As always, Emacs' flexibility makes customization extremely
powerful. Easily overwhelming. Just like everything we're doing, try
settings out, keep your `.emacs' in source control and make changes
without fear. Tweak as needed. Repeat.


@ -0,0 +1,281 @@
# Emacs Org-mode
It's hard to introduce [org-mode]. Most emacs users are familiar with it
or have, at least, used it at some point or another. I personally have
only been using it for about six months, but it has taken a pivotal role
in my daily workflows. I will describe how I use it and how I have
configured it. As always, feel free to tweak it to fit your needs.
=> org-mode
# My use cases
## Logbook/TODO-list
This is a little bit special. I use `org-mode' as a project
tracker. Yes, we use JIRA and I actually integrate it [with Emacs],
but pure org-mode for my personal notes and logbook is a better fit
for me.
As you can see, I keep track of my tasks using `org-mode', but also
add notes to the tasks if necessary. For development purposes, I also
keep a log of problems that I have encountered and resolutions for
these problems. That way I can go back to these notes in the future if
needed. I keep this data saved as `todo.gpg' that gets encrypted and
decrypted when opening and saving.
=> with Emacs
## Agenda
`org-mode' also works well when you want to combine your to-do list
with your calendar. If, like me, you have your calendar on Google
Calendar, you should check out [org-gcal]. For the most part, I always
have a terminal tab with the agenda up and refresh it periodically to
have the latest appointments and task schedules and deadlines.
=> org-gcal
## Journal
Great practice and excellent substitute for therapy. Store thoughts,
experiences and ideas. Highly recommended. I use the wonderful
[org-journal] package for this.
=> org-journal
## Blogging
I write this blog using `org-mode' :) (thanks [org2blog]). I can't
imagine writing it in any other way.
=> org2blog
## RSS List
I just replaced my RSS reader of choice with [elfeed]. It's a simple
emacs-based RSS reader. Fast, no frills and straightforward. To keep a
list of my RSS feeds, I imported an OPML into [elfeed-org] and now
keep all my RSS feeds in one beautiful org-file that I can easily
manage and sync.
There's plenty of reasons to use `org-mode'. I have used it for email,
but honestly, I have been unable to find a suitable workflow for
it. Longform writing is something I would like to spend more time
doing, and `org-mode' seems like a great platform to get started with
to do it.
=> elfeed
=> elfeed-org
# My configuration
(setenv "GPG_AGENT_INFO" nil)
(setq epg-gpg-program "/usr/local/bin/gpg2")
(require 'epa-file)
(require 'password-cache)
(setq password-cache-expiry (* 15 60))
(setq epa-file-cache-passphrase-for-symmetric-encryption t)
First of all, I load GPG for encryption/decryption of gpg files. I set
a generous expiration because this is my work desktop and I always
keep it locked.
(require 'org-install)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cr" 'org-gcal-sync)
I load `org-mode' and set the shortcuts to store links (it's easier
this way for me 😊), capture (for agenda, work TODO, etc) and pull up
the agenda.
(setq org-directory "~/Documents/org/")
(setq org-default-notes-file "~/Documents/org/scrapbook.gpg")
(setq org-agenda-files (list "~/Documents/org/todo.gpg" "~/Documents/org/" "~/Documents/org/"))
Here I'm setting the directory structure. `org-directory' sets the
default `org-mode' directory for file storage. Notes are created with
`org-default-notes-file', and `org-agenda-files' lists all the files
loaded by default in the Agenda.
(add-hook 'org-mode-hook #'(lambda ()
(add-hook 'org-mode-hook #'toggle-word-wrap)
(defun my/org-mode-hook ()
"My `org-mode' hook"
(set-face-attribute 'org-document-info-keyword nil :foreground "yellow")
(set-face-attribute 'org-document-info nil :foreground "cornflower blue")
(set-face-attribute 'org-document-title nil :foreground "cornflower blue"))
(add-hook 'org-mode-hook 'my/org-mode-hook)
Some color tweaks and line-wrapping. `org-mode' doesn't wrap lines by
default, but that has an easy fix.
(setq org-todo-keywords
'((sequence "TODO(t)" "PENDING(p!)" "WAIT(w@)" "VERIFY(v)" "|" "DONE(d!)" "CANCELED(c@)")
(sequence "REPORT(r@)" "BUG(b@)" "KNOWNCAUSE(k@)" "|" "FIXED(f!)")))
(global-set-key (kbd "C-c s")
(lambda () (interactive) (find-file "~/Documents/org/scrapbook.gpg")))
(global-set-key (kbd "C-c w")
(lambda () (interactive) (find-file "~/Documents/org/todo.gpg")))
(setq org-log-done 'time)
(setq org-list-allow-alphabetical t)
Define files for notes and for the to-do list. Here we also define the
to-do sequences and indicate whether I want them timestamped (!) or
timestamped and with a comment (@).
(setq org-capture-templates
'(("n" "Personal Note" entry (file "~/Documents/org/scrapbook.gpg")
"* PERSONAL NOTE %?\n%U\n" :empty-lines 1)
("w" "Work Note" entry (file "~/Documents/org/scrapbook.gpg")
"* WORK NOTE %?\n%U\n" :empty-lines 1)
("j" "Journal" entry
(file+datetree "~/Documents/org/journal.gpg")
"**** %U%?\n%a" :tree-type week))
Define the capture modes. I only have personal and work notes and
journal capture.
(eval-after-load "org"
'(require 'ox-md nil t))
Markdown export. We use markdown at work a lot. It makes my life
easier if I have direct conversion to markdown.
(setq org-agenda-span 4)
`org-agenda' will only load the next 4 days. I don't need any more
than that.
(require 'org2blog-autoloads)
(require 'netrc)
(require 'auth-source)
(let (credentials)
(add-to-list 'auth-sources "~/.authinfo")
(setq credentials (auth-source-user-and-password ""))
(setq org2blog/wp-blog-alist
:url ""
:username ,(car credentials)
:password ,(cadr credentials)
:default-title "Hello World"
:default-categories ("emacs")
:tags-as-categories nil))))
(setq org2blog/wp-use-sourcecode-shortcode nil)
;; removed light="true"
(setq org2blog/wp-sourcecode-default-params nil)
;; target language needs to be in here
(setq org2blog/wp-sourcecode-langs
'("actionscript3" "bash" "coldfusion" "cpp" "csharp" "css" "delphi"
"erlang" "fsharp" "diff" "groovy" "javascript" "java" "javafx" "matlab"
"objc" "perl" "php" "text" "powershell" "python" "ruby" "scala" "sql"
"vb" "xml" "go" "sh" "emacs-lisp" "lisp" "lua"))
;; this will use emacs syntax higlighting in your #+BEGIN_SRC
;; <language> <your-code> #+END_SRC code blocks.
(setq org-src-fontify-natively t)
For `org-2blog' We begin by loading it and `.netrc'. In my case, I'm
using `.authinfo' that I keep encrypted as well. It stores my blog
credentials. Since I only have one blog, I just add it as
`arenzanaorg' to the wordpress blog list, set some defaults, and then
set some source code defaults. I got most of this configuration from
[here]. Great resource!
(require 'org-gcal)
(load-library "~/.gcal.el.gpg")
(setq org-gcal-file-alist '(("" . "~/Documents/org/")
("" . "~/Documents/org/")))
[Image Placeholder]
`org-gcal' is the package I use to pull [Google Calendar] data into
Emacs and, ultimately, `org-agenda'. Earlier in the set up I created a
shortcut for `org-gcal-sync' to update the calendars on demand. After
that, I just press `r' in `org-agenda' to refresh the buffer and the
new events show up . In order to not publish API keys to any
repository, I keep this information in a `.gcal.el.gpg' file stored in
my home directory. This is what the structure of that file looks like:
;; -*- epa-file-encrypt-to: ("") -*-
(setq org-gcal-client-id "clientid"
org-gcal-client-secret "secretkey")
Make sure you substitute the email address with your PGP key's email
and both `clientid' and `secretid' with the ones generated at [Google
Cloud] for your calendar. To do this, create a new oauth key pair.
=> here
=> Google Calendar
=> Google Cloud
# Caveats
There's a few things that still bother me that I want to tackle. First
of them is the `yellow' output of my blog's HTML code source. I'm
disabling colors by not specifying `emacs-lisp' as the language, but
this is a bad work around. I have been unable to correctly format the
HTML template for this, so I will need to keep researching.
Also, every time I open emacs I'm prompted for `.gcal.el.gpg''s
password. I'd like to delay this until I call `org-gcal'.
# Summary
I know I've flown over my `org-mode' set up, but going in depth would
take a lot more posts (which I may write). For now this is a short
introduction to how I use the package and some of the possibilities
that might bring ideas on how to improve your workflows.


@ -0,0 +1,111 @@
# Blogging with org-mode
# Wait, what?
My coworker makes infinite fun of me because I do everything in
Emacs. He's a proficient Vim user and uses it as a text editor like a
master. Emacs, however, is almost a full operating system for me. Even
though I haven't figured out how to do video editing in Emacs (😂),
blogging is a task that's possible to do with it.
I run a self-hosted [Wordpress] instance on [Scaleway]. This is an
affordable set up that gives me extreme flexibility.
=> Wordpress
=> Scaleway
# The setup
As I described on my [previous post], I use [org2blog] as the blogging
package to post to Wordpress. I have the following block on my
`.emacs' file.
(require 'org2blog-autoloads)
(require 'netrc)
(require 'auth-source)
(let (credentials)
(add-to-list 'auth-sources "~/.authinfo")
(setq credentials (auth-source-user-and-password ""))
(setq org2blog/wp-blog-alist
:url ""
:username ,(car credentials)
:password ,(cadr credentials)
:default-title "Hello World"
:default-categories ("emacs")
:tags-as-categories nil))))
(setq org2blog/wp-use-sourcecode-shortcode nil)
;; removed light="true"
(setq org2blog/wp-sourcecode-default-params nil)
;; target language needs to be in here
(setq org2blog/wp-sourcecode-langs
'("actionscript3" "bash" "coldfusion" "cpp" "csharp" "css" "delphi"
"erlang" "fsharp" "diff" "groovy" "javascript" "java" "javafx" "matlab"
"objc" "perl" "php" "text" "powershell" "python" "ruby" "scala" "sql"
"vb" "xml" "go" "sh" "emacs-lisp" "lisp" "lua"))
;; this will use emacs syntax higlighting in your #+BEGIN_SRC
;; <language> <your-code> #+END_SRC code blocks.
(setq org-src-fontify-natively t)
Naturally, I don't post my credentials as part of my `.emacs' since I
keep it under version control. Instead, I store it under
`${HOME}/.authinfo.gpg' like this:
login admin
password "mypassword"
These credentials are called when loading the `netrc' package and
The Lisp block creates a new blog instance called `arenzanaorg' (in
case you want to have more than one blog). Include the XML RPC
endpoint, credentials, and some defaults. In addition to this, I
enable code highlighting. This is actually not working very well for
me, because the CSS uses a very bright yellow color to represent
strings for the `emacs-lisp' language (as you can see on previous
posts). Instead, I'm just using the `#+BEGING_SRC #+END_SRC' blocks
(without specifying the language) to post code blocks. This gives grey
blocks, but at least they're readable. I've tried different options,
without success. I'm not a front end developer, so to be honest, I've
struggled working with all the CSS options for the HTML export option
of org2blog.
=> previous post
=> org2blog
# The Workflow
The workflow is fairly simple for what I do. `M-x
org2blog/wp-new-entry'. The first time you call this, it will prompt
you to log in. Make sure you do so. Then it will open an `Org' buffer
where you can edit the defaults and type away.
Once I'm done, I issue `M-x org2blog/wp-post-buffer'. This will upload
the draft and give me the option to display the preview, where I can
see what things will look like prior to publishing. After I'm happy
with the final edits, I issue `M-x
org2blog/wp-post-bufffer-and-publish'. This will post directly to
# Caveats
* As I described above, syntax highlighting for emacs-lisp is not
great and it doesn't support Go (my language of choice).
* Attaching images to a blog post is something I do after the fact,
once the draft is up. I haven't figured out a good way to upload and
link images to a post straight from org2blog.


@ -0,0 +1,89 @@
# Artisanal Web Hosting
# Summary
I have an operations background. My first company taught me most of
what I know about how to run software and server
operations. Fast-forward 15 years and we are now all about the cloud,
VPSs, and Kubernetes. I love [the cloud]. Up until a few weeks ago, my
blog has been hosted at [Scaleway], which has worked great for
me. Today I run it on my own server where (for better or for worse)
everything is managed by me.
=> the cloud
=> Scaleway
# Why
One thing I was not happy about was Google Analytics. To keep my
uptime I want to know the number of page loads and system load in
order to optimize and scale. I know, I should probably be using a CDN
to mitigate some of these issues, but I don't feel I'm there just
yet. Google Analytics is one of those services that is not known to be
privacy friendly, and if you are here, I respect you and your time. I
don't include ads and I try to keep the tracking as limited as
possible disabling social crap, etc. For my purposes, I don't need
Google analytics. A web server logs all of the information I need for
scaling purposes. All I needed was to access those logs (which I
already had access to) and store the data in a database, create a
dashboard, and kiss Google Analytics goodbye.
I know, I could've used AWS or Google Cloud to do this; but the cost
over time would have been prohibitive. Self-hosting seems like the
right answer at the moment.
The game plan:
* With the help of my company, I got a new server and some data
center space (power, networking, and a rack). I know, this is the
most tricky part as not everyone works for a telco that can provide
these things. The point of this post is not to justify the
financial advantage of self-hosting vs the cloud, but to point out
the elements we overlook by leaving it up to the cloud to do some
of the heavy lifting.
* I installed ESXi on the server to run all my infrastructure. I have
done this before, so I felt fairly comfortable reproducing this.
* I used VyOS for all the networking and firewall needs. This was the
trickiest part. I hate networking. I still do and the networking
concepts, to be honest, just beat me. Somehow though, with basic
subnetting and routing skills, you can actually get surprisingly
* I used [Terraform] to define all my (CentOS 7) infrastructure and
[Ansible] to automate/standarize the configuration of every element
in my little cloud.
* NGINX to host my site (quite straight forward).
* Run an Elastic stack (really, just [Beats], [Elasticsearch], and
[Kibana]) for data processing. From system auditing, to security,
log parsing, and metrics. This stack is the central unit that gives
me visibility into what's happening inside my system. This includes
NGINX log analysis.
=> Terraform
=> Ansible
=> Beats
=> Elasticsearch
=> Kibana
# tl;dr
Over the next few weeks I'll be writing about my experience _moving
away from the cloud_. The work it involved, where I believe it's
better than the cloud, and where I believe the cloud is superior. I
will talk about what's left in my set up and how I'm planning on
tackling it.
They say the journey is as important as the destination itself and, in
this case, I must agree. I have learned a lot through the
process. Perhaps someone will learn something from my experience. That
will make it all worth it!


@ -0,0 +1,236 @@
# Emacs Go Mode - Revisited
A few months ago [I went over] how to set up Emacs for Go
development. Since then, I have honestly not changed a single thing
about it. Until this week.
=> I went over
# Background
Here's the thing. Something I have changed too much over the last few
months has been the vendoring mechanism I use for my Go projects. From
[Glide], I moved to [go dep], and a couple of months ago, I started
the migration to the [Go Modules], Golang's potential long-term
solution to the package management mess the community has been living
with since the inception of the language 10 years ago ([Happy Birthday
Go Modules changes a lot of things about the taxonomy of your
projects: vendor management, GOPATH, `go get `, etc. Just like me and
my vendor management journey, `gomode ` has also gone through several
iterations from [here], to [here], and [here].
It was time to start looking at something else with more long term
=> Glide
=> go dep
=> Go Modules
=> Happy Birthday Go!
=> here
=> here
=> here
# LSP time
LSP (Language Server Provider) promises to do away with all these
issues by implementing a "driver" with a common editor interface and
adapting to the languages as they evolve. [Rebecca Stambler's "Go,
please stop breaking my editor"] is a must-watch if you're interested
in the topic.
To work on Go using emacs, the most logical recipe would be
[lsp-mode], [gopls], and [go-mode]. `gopls ` is the LSP-compatible
language server, `lsp-mode ` is the Emacs interface for LSP servers,
and `go-mode ` is, well, the major mode for Go (discussed [in my
previous article]).
=> Rebecca Stambler's "Go, please stop breaking my editor"
=> lsp-mode
=> gopls
=> go-mode
=> in my previous article
# Go, please
In the video (May 2019), Rebecca points out that `gopls ` is still in
alpha and warns us to proceed with caution. Currently, (December 2019)
it feels more like a beta, so not too bad, but still not
perfect. `gopls ` is, however, the future for Emacs to become a solid
Golang editor. This is because it's the only language tool (beside's
Rebecca's `gocode ` that's in maintenance mode) that fully supports Go
modules that is in active development.
All I had to do to install it was this:
go get
It's important to check out the latest version since the tool is
evolving quite quickly right now.
What happens in the editor is that Emacs spawns an instance of the
server when `go-mode ` is enabled on a buffer. After this, `lsp-mode `
will attempt to connect to it. The advantage of using a server rather
than a command is that it's much quicker to respond and interface with
Emacs (it does feel snappier once the server comes up, which is also
fairly quick). The disadvantages are the security concerns of running
a server on a laptop; but to be fair, this is not supposed to be a
long-running/permanent process.
On my Emacs config, I just added the following lines:
(setq lsp-gopls-staticcheck t)
(setq lsp-eldoc-render-all t)
(setq lsp-gopls-complete-unimported t)
I just wanted those elements to be active, but feel free to edit to
# lsp-mode
`lsp-mode ` will need to be added to our Emacs set up. I copied most
of this from the `gopls ` + `lsp-mode ` set up guides adjusting it to
my needs and adding a couple of things.
(use-package lsp-mode
:ensure t
:commands (lsp lsp-deferred)
:hook (go-mode . lsp-deferred))
;;Set up before-save hooks to format buffer and add/delete imports.
;;Make sure you don't have other gofmt/goimports hooks enabled.
(defun lsp-go-install-save-hooks ()
(add-hook 'before-save-hook #'lsp-format-buffer t t)
(add-hook 'before-save-hook #'lsp-organize-imports t t))
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks)
;;Optional - provides fancier overlays.
(use-package lsp-ui
:ensure t
:commands lsp-ui-mode
;;Company mode is a standard completion package that works well with lsp-mode.
;;company-lsp integrates company mode completion with lsp-mode.
;;completion-at-point also works out of the box but doesn't support snippets.
(use-package company
:ensure t
(setq company-idle-delay 0)
(setq company-minimum-prefix-length 1))
(use-package company-lsp
:ensure t
:commands company-lsp)
;;Optional - provides snippet support.
(use-package yasnippet
:ensure t
:commands yas-minor-mode
:hook (go-mode . yas-minor-mode))
;;lsp-ui-doc-enable is false because I don't like the popover that shows up on the right
;;I'll change it if I want it back
(setq lsp-ui-doc-enable nil
lsp-ui-peek-enable t
lsp-ui-sideline-enable t
lsp-ui-imenu-enable t
lsp-ui-flycheck-enable t)
Here, I:
* Enable `lsp-mode `.
* Add hooks for package imports and buffer formatting on save.
* Enable `lsp-ui ` (to display `go-eldoc ` info, etc).
* Company for overlays.
* `yasnippet ` for snippet support.
* Some options for `lsp-ui `.
In the options I disabled `lsp-ui-doc-enable ` because it displayed
docs on both the mini buffer and on an overlay located to the right of
the buffer. I found it too distracting and decided to disable the
overlay and leave the mini buffer help.
# Old Go Mode
So what's left of my original Go mode configuration? Well, the custom
compilation stuff, line numbers, etc are still there:
(defun custom-go-mode ()
(display-line-numbers-mode 1))
(use-package go-mode
:defer t
:ensure t
:mode ("\\.go\\'" . go-mode)
(setq compile-command "echo Building... && go build -v && echo Testing... && go test -v && echo Linter... && golint")
(setq compilation-read-command nil)
(add-hook 'go-mode-hook 'custom-go-mode)
:bind (("M-," . compile)
("M-." . godef-jump)))
(setq compilation-window-height 14)
(defun my-compilation-hook ()
(when (not (get-buffer-window "*compilation*"))
(let* ((w (split-window-vertically))
(h (window-height w)))
(select-window w)
(switch-to-buffer "*compilation*")
(shrink-window (- h compilation-window-height)))))))
(add-hook 'compilation-mode-hook 'my-compilation-hook)
(global-set-key (kbd "C-c C-c") 'comment-or-uncomment-region)
(setq compilation-scroll-output t)
I'm not calling any of the goimports, gocode, etc as I used to, since
`gopls ` takes care of it all.
# Summary
Besides speed, there's not a whole lot of difference between my
previous and my current setups, really. The real advantage I see is
that I'm future-proofing my setup by adopting officially-supported
procedures. Just like going to Go Modules: my workflow is not
improved, but this seems to be the direction the community is going
and it will be easier for me to adopt it now than in the future.
# Caveats
The first time you open a `.go ` file, you will be prompted for the
root of the project. It will find `go.mod ` and suggest that directory
as the root. It's an extra step, but not a big deal. The interface
makes it simple enough.
This root path might have been the issue I initially hit where Emacs
would color everything red on save. I couldn't figure out what the
problem was (I assumed it was a problem with my GOPATH and Modules),
but removing my `.emacs.d ` directory and having it recreated fixed it
on my Mac. I never had the problem on my Fedora laptop.


@ -0,0 +1,79 @@
# Emacs Server - Why and why not?
# What
Unknown to many of us, under the hood emacs was designed as a
client/server architecture; which means, Emacs core runs as a daemon
and you attach clients to it. Normally, we run both when we type
`emacs', but the execution of both the client and the server is
transparent to the user. Before you attempt to do something fancy,
this architecture is somewhat limited to localhost (1), which means
that you can't quite "remote into" an emacs running on a different
host. In a world where we have [tmux], [mosh], and other multiplexers
and mobile connectivity technologies, there may not seem like there's
much room for running emacs as a server, but we will see some
advantages to this approach.
=> tmux
=> mosh
# Why and How
I tend to use `tmux' as my multiplexer and I run a session on my
laptop as soon as I start working. This session will only die when the
machine goes down for a reboot or when shutting it down. The advantage
of running tmux is (besides being able to upgrade iTerm without losing
all my sessions) is that it keeps my brain trained to work on a remote
box (I used to work in operations, being a sysadmin truly does
something to your brain). Inside this tmux session, I run Emacs by
typing `e', which is an alias on my `~/.zshrc' as follows:
alias e="emacsclient -a '' -t"
You will notice that this alias uses a different command,
`emacsclient'. Running this command will not run a full instance of
Emacs, but will attempt to attach to a currently running session on
localhost. If a server is not running, one will be started. You can
also start Emacs as a daemon by running `emacs --daemon'. No client
will be attached to it if you run it this way.
If you have been following this blog, you will know how much I enjoy
customizing Emacs. This passion for customization has driven my Emacs
to take almost 3 seconds to start from cold (2). And even though I've
done my best to improve the performance of this operation (remove
unnecessary customization, use of `use-package', some performance
tuning, etc), there's too much overhead at start time.
By running a server first, my configuration gets loaded once, and when
I attach the client, the configuration is loaded in memory. The
operation of starting a client (what I actually interface with) is a
matter of milliseconds. In addition to this when I close the client
and reattach it, my Emacs still contains the same open buffers,
running processes, etc. This means that, if you want to actually close
Emacs and all of its open buffers, you need to make sure you close all
of them `C-x C-B' and then `d' on every entry to close.
# Conclusion
The value I drive from this workflow resides in performance
improvements. It saves me time and, why not, frustrations. It can be
argued that value can be found from an Emacs-as-a-server architecture
even if your `~/.emacs' is not too complex, but in my opinion, if
that's your situation, there's no need to add any extra "complexity"
associated to separating the client and server operations.
Special thanks to the always great Irreal for [[\][this article]] that
served as a good starting guide.
(1) While it's technically possible to connect to a TCP socket, this
is not meant to be a remote connectivity tool.
(2) Listen, email loading, RSS, Twitter, journals, and development
environments don't come without a cost.


@ -0,0 +1,34 @@
# Emacs 27.1 Installation
This is for you as much as this is for me, since I want to remember some
stuff I do and the blog sometimes serves as a public knowledge base.
Regarding 27.1, there's plenty of great resources [here] and [here], so
I won't go over them.
Simple installation considering you have Development Tools and TLS
libraries installed for your distro:
./configure --with-json
make install
I'm only adding native JSON support since it's the number one (or
[number two] after language servers) feature in Emacs 27. Since the
loading order in 27 changes, I'm adding support for previous versions
with the following in my ` ` file:
(when (< emacs-major-version 27)
Additionally, I had to run `go get ` in
order for gopls to not crash. Other than that, it seems like this
version hasn't broken any other elements of my set up; but it might
still be a little bit too early to tell!
=> here
=> here
=> number two


@ -0,0 +1,144 @@
# Hasta Pronto, WhatsApp / Farewell, WhatsApp (English & Español)
*tl;dr* Ponte en contacto conmigo a través de Signal / You can contact
me on Signal
## Hasta Pronto, WhatsApp (Español)
Es probable que te encuentres aquí porque has visto un link a esta
página en mi estado de [Whatsapp]. De hecho, esta es la única ocasión
desde que uso el servicio (hace alrededor de 11 años), que cambio de
> "Hey there! I'm NOT using WhatsApp"
No es necesario hablar de todas las noticias que plagan los medios
últimamente sobre los [problemas de] [los términos de privacidad] [de
WhatsApp] que, salvo porque [Facebook ha recogido cable], el grupo
pensaba obligar a sus usuarios a aceptar para seguir utilizando el
servicio. O sobre los problemas éticos de la [censura ejercida por
estas empresas].
La realidad es que ninguna de estas compañías (no solo Facebook, sino
Google, Twitter, etc) tiene motivación para ajustar su servicio para
el bien de los usuarios porque, citando a Richard Serra, _nosotros
somos el producto_ al no pagar por él.
Por estos motivos estoy buscando medios sociales y de comunicación más
sostenibles de cara al futuro para los que yo no sea el
producto. Existen, en serio; pero no son tan conocidos como "los
¿Y ahora qué?
Abandono WhatsApp, pero no de la noche a la mañana. Empezando en
marzo, eliminaré las notificaciones y todos los permisos que la
aplicación requiere (localización, fotos, etc) para operar
correctamente. A día de hoy me resultará posible avisar a mis
contactos más comunes de mis intenciones, una vez llegue marzo, las
personas con las que apenas hablo tendrán que esperar a que vuelva a
abrir la aplicación para que vea el mensaje. Este será el caso durante
6 meses. En ese momento, eliminaré la aplicación de mi móvil y
Pero seguiré aquí, en internet. WhatsApp no es internet, Instagram no
es internet. Forman parte de internet, pero La Red es más profunda que
todas estas empresas. A partir de ahora, la mejor forma de ponerse en
contacto conmigo será a través de [Signal]. A diferencia de WhatsApp o
Telegram, Signal es una organización sin ánimo de lucro (no tiene
accionistas a los que rendir cuentas) que se sostiene a través de
donaciones. Si eres usuario de Signal y lo utilizas regularmente, te
animo a que [dones al proyecto].
Si realmente prefieres no utilizar algo nuevo y tienes un dispositivo
Apple, sigo disponible en iMessage y si eres usuario de Telegram,
[mantendré mi cuenta de Telegram]. Al menos a corto plazo. Finalmente,
para los más aventureros, sigo la evolución del protocolo
decentralizado [Matrix], que realmente creo que es el futuro de las
comunicaciones. Puedes encontrarme como ` `.
Igualmente, mi uso de Twitter se verá reducido con los
meses. [Mastodon] es sin duda la mejor alternativa y puedes seguirme
=> Whatsapp
=> problemas de
=> los términos de privacidad
=> de WhatsApp
=> Facebook ha recogido cable
=> censura ejercida por estas empresas
=> Signal
=> dones al proyecto
=> mantendré mi cuenta de Telegram
=> Matrix
=> Mastodon
=> aquí
## Farewell, WhatsApp (English)
It's very likely that you're here because you've seen this on my
[WhatsApp] status. In fact, this is the first time ever since I
registered around 11 years ago that I have changed my status.
> "Hey there! I'm NOT using WhatsApp"
There's no need to talk about the news about [WhatsApp's terms] [of
service] that, if it wasn't because [Facebook has delayed], we would
be forced to accept in order to keep using the service. There's no
need to talk about the ethical problems of the systematic [censorship
exercised by these companies] either. Reality is, none of these
companies (not just Facebook, but Google or Twitter for that matter)
are enticed to adjust their service for their users well-being
because, citing Richard Serra, _we are the product_ since we're not
paying for it.
For these reasons, I'm looking for more sustainable social media
platforms and means of communication looking into the future. They
exist, seriously; but they are not as wide-spread as "the classics".
So now what?
I'm out of WhatsApp, but not immediately. Starting in March, I will
eliminate notifications and permissions given to the application
(location, pictures, etc). Today, I will start letting my contacts
know where to find me. After March, people I talk to less regularly
will have to wait until I open the app again (days or weeks later) for
me to see the message. This will be the case for about 6 months. After
that, I will eliminate the app from my phone and computers.
But I will remain on the internet. WhatsApp is not the internet,
Instagram is not the internet. They belong to it, but the Internet is
deeper than those applications.
The best way to get in contact with me, will be through
[Signal]. Unlike WhatsApp or Telegram, Signal is a 501c-3 (non profit
organization) that has no shareholders to please. This also means that
if you're a user that enjoys the service, I encourage you to [donate
to the project].
If you really don't want to use a new service and have an Apple
device, I will still be available on iMessage and, if you're a
Telegram user, [I will keep my Telegram account]. At least in the
short term. Finally, for the adventurous ones, I'm keeping an eye on
the evolution of the decentralized [Matrix] protocol, I truly believe
it is the future of communications. You can find me as
` `.
My use of Twitter will be reduced as well, potentially following the
fate of WhatsApp. [Mastodon] is certainly the best alternative, and
you can follow me [here].
=> WhatsApp
=> WhatsApp's terms
=> of service
=> Facebook has delayed
=> censorship exercised by these companies
=> Signal
=> donate to the project
=> I will keep my Telegram account
=> Matrix
=> Mastodon
=> here


@ -1,7 +0,0 @@
# Hello Gemini
# Hi
This is my first gemini page


@ -0,0 +1,41 @@
# Arenzana
## About me
Hey there, I’m Isma.
Interested in everything: from art to technology, faith to travel.
Spanish by birth, American by adoption.
I’m also a co-host at El Mentidero, a podcast in Spanish about what it is like to live abroad. You can find it here:
=> El Mentidero
## Contact
=> mailto:// Email
=> Telegram
PGP Fingerprint:
B2AD 040F 88EC 812F 6ABB 8392 E855 12E7 12CC D0C6
=> PGP Public Key
## Articles
=> 20210201-farewall-whatsapp.gmi
=> 20200819-emacs-27-1-install.gmi
=> 20200624-emacs-server-mode.gmi
=> 20191202-emacs-go-mode-revisited.gmi
=> 20190628-artisanal-hosting.gmi
=> 20190424-blogging-with-org-mode.gmi
=> 20190309-emacs-org-mode.gmi
=> 20190125-emacs-locale.gmi
=> 20190121-emacs-go-mode.gmi
=> 20190120-emacs-lovely.gmi
=> 20181120-hello-world.gmi
© 2021 All Rights Reserved