Last week, We involve a function for users to exports their orders into a spreadsheet document.

We using the spreadsheet gem to modify an existing template spreadsheet.
But when opening the modified spreadsheets by Microsoft Excel, it issues an error:

File error: data may have been lost

After some google search, I was answered to set the encoding explictly:

1

Spreadsheet.client_encoding='UTF-16LE'

But it doesn’t works, WTF!

Finally, I decide to create a new spreadsheet and set cell format by hand instead of modify the existing template spreadsheet document.
It’s a painful task. The spreadsheet comes up just fine without error.

Even though it doesn’t elegant, we can get ride of that annoying error.

Yestoday, I upgraded my VirtualBox from version ‘4.2.18’ to ‘4.3.6
along with upgraded the vagrant to '1.4.3’.

After I run vagrant up I got a warning message:

123456789

[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
prevent things such as shared folders from working properly. If you see
shared folder errors, please make sure the guest additions within the
virtual machine match the version of VirtualBox you have installed on
your host and reload your VM.
Guest Additions Version: 4.2.18
VirtualBox Version: 4.3

After a google, I found that there is a plugin which can automatically
installs the host’s VirtualBox Gest Additions on the gest system.

The reason that the URI returns a 301 redirection is the trailing
slashes are misused. Historically, it’s common for URLs with a
trailing slash to indicate a directory, and those without a trailing
slash to denote a file:

Formerly, I use the Emacs build-in find-tag command which bounding
to M-. to find the tags. It works, but what annoy me is that
everytime I find-tag, it prompt to choose a tag, even the first
one always what I want. So I write a command to take the place of
default find-tag:

It seems that things goes well. But I found that If a method defined
in many places. find-tag only jump to one of them, and without any
prompt. This misguide me occasionally.

After some google search, I found a package
Etags-Select provides a
feature to find tag from multiple tag files, and if there are multiple
matching tags, it will open a selection window for you to choose the
one you want.

Sounds great! eh?

After give it a try, I found it’s not that perfect(not perfect for
ruby code at least). It can’t jump to the definition of a method whose
name ending with a question mark! e.g. signed_in?. After a wandering
around the source code of Etags-Select, I decide to ‘fix’ it by
myself. And finally, I made it! Yeah!

It’s showtime ;)

Firstly, git clone my forked
Etags-Select version and add
it to your Emacs load-path, you may also need to install
eproject and
s.el first.

At last

Look at the bottom of the Emacs frame, there is a distinctive line above the minibuffer, it’s mode-line. This displays various information about what is going on in the buffer, such as whether there are unsaved changes, the editing modes that are in use, the current line number, and so forth.

After installed several add-ons, you may find that the mode-line occupied by the minor-mode indicators. As follow:

Not all of the indicators are useful for me, even more, they (but not the minor mode) pollute the mode-line, so I want to save the limited spaces.