Categories
Emacs GNU/Linux Free Software & Open Source

Emacs Identica-mode 1.3.1: Quick bug fix release

code bug

I just want to give a heads up to all who downloaded Identica-mode 1.3 that some bug fixes were done yesterday very quickly and the oficial stable release is 1.3.1 as of now. The main issue was a bug displaying all messages highlighted as replies when the timeline was in ‘oldest first’ preference mode. Also there were some other minor fixes.

The link on the previous post points to the latest release, but you can download Identica-mode 1.3.1 here as well.

I’d like to give special thanks to Alexandre Oliva for his feedback and very quick response sending the patches for this.

Code bug photo is Creative Commons by Gui Tavares on Flickr
Categories
Emacs GNU/Linux Free Software & Open Source

Identica-mode 1.3 release

favorite message marked in timeline
Favorite messages are now marked in timeline

After the buggy 1.2.1 release and a long bug fixing development time, the new Identica-mode 1.3 is released. Lately I’ve been relying more on releasing through package.el and the MELPA repository whenever I push changes to the main branch on the Git repository. But then I received some emails requesting for an official stable release for package maintainers and for people who don’t feel comfortable using development releases.

### What changed

Among many of the changes and bug fixes, here are the most relevant:

– Fix eLisp functions incompatibilities between some builds of Emacs 23.1 and later versions (a big bug in 1.2.1 release)
– Auto-detect from server instance the character limit
– Added favorite icon on format line to identify favorite messages
– Format line can now display user profile URLs using “%U” token
– Added reply to all feature, by pressing ‘A’ on a message will reply to sender and all mentioned usernames
– Fixed ur1.ca URL shortening bug returning the DTD instead of the real link
– Added highlighting of replies without username mention (the new reply format on Status.net 1.x)
– Conversations (context) can now be retrieved by pressing C-c C-c on any message.
– Remote user timeline retrieval with C-c C-o
– On identica-friends list, pressing ENTER in a group or user makes Identica to load its timeline.
– Deletes HTTP retrieved temporary buffers to avoid high memory usage over time
– Optimized fontification code that renders the timeline in the buffer
– Many fixes and optimizations

You can review the history of the project’s development at Identica-mode’s code repository web interface.

### Get it

Click to download Identica-mode 1.3 release

Or if you prefer to get the latest releases using MELPA repository for package.el which is now part of Emacs 24.

Or get the latest development code directly from the Git repository without using package.el at
http://git.savannah.gnu.org/cgit/identica-mode.git

### Contribute

Your feedback, bug reports and code contributions are really appreciated to keep improving this project. Contact me on Identi.ca or send a message to the Identica-mode group. You can also donate a tip via Paypal.





Categories
Emacs GNU/Linux Free Software & Open Source Programming & Web Development

Easy CSS editing with Emacs

Editing CSS in Emacs is very easy since the standard CSS mode comes included by default. But developer Julien Danjou created this nice minor mode called rainbow-mode which will display the color of the code as the background of the code’s text. It is very useful to immediately see the colors right there in the style sheet instead of trying to remember each code and then test in the browser window.

One of the problems I had was when opening any CSS file, it would open by default css-mode, but I had to manually load rainbow-mode every time. The elisp function auto-mode-alist is used to detect a file type by its name and running a function associated with it, generally the function to enable a major mode to edit that type of file. For minor modes I couldn’t find anything that would allow me to launch them without inhibiting the mayor mode’s startup.

So since auto-mode-alist takes a regular expression for the file type and only one function as its arguments, I wrote a function that will run both and use that as the second argument to execute.

;; CSS and Rainbow modes 
(defun all-css-modes() (css-mode) (rainbow-mode)) 

;; Load both major and minor modes in one call based on file type 
(add-to-list 'auto-mode-alist '("\\.css$" . all-css-modes)) 

Hope you find it useful and you like the combination of css-mode and rainbow-mode as much as I do.

Categories
Emacs GNU/Linux Free Software & Open Source

Identica-mode 1.2 with OAuth support released

The time has come to set up a new stable release for Emacs Identica-mode microblogging client.

It’s been almost a year since last release, but many people have been following the project’s progress through the git repository updates.

identica-mode 1.2

Download

Download the identica-mode 1.2

The two most relevant features of this release is first, support for OAuth (requires using oauth.el). This enables users who log in via OpenID accounts to be able to use Identica-mode as their client. The other big feature is the support for conversation timelines. Now you can press C-c C-c while cursor is on a notice to display that notice’s conversation timeline. Conversation timelines are not available on statusnet servers prior to 1.0 version, since the API didn’t include conversation ids until then. I’d like to give special thanks Kevin Granade for his time and effort on these two very requested features.

To use OAuth authentication instead of the default plain auth, add this to your .emacs file:

(setq identica-auth-mode "oauth")

Another very requested feature for those who won’t switch to OAuth, is to store the login credentials in a safer way than storing it in plain text in your elisp configuration files. Emacs can read authinfo and netrc files for authentication information. You can even encrypt the authinfo using EasyPG.

All you need to do is create a file ~/.authinfo (~/.authinfo.gpg if using encryption) and add the following:

machine servername login yourusername password yourpassword

Replace servername with your server (if connecting to Identica service, use identi.ca as server name), yourusername and yourpassword with your information. If you setup your authinfo file, you don’t need to set identica-password variable anywhere.

What’s new

  • OAuth support
  • Added support for authentication credentials stored in ~./authinfo (plain or encrypted) and ~/.netrc files instead of plain text elisp
  • Expand short urls by pressing ‘e’ while cursor is on a short url
  • Added is.gd to url shortening services
  • Added countdown minibuffer-prompt style
  • Retrieve server config page to set text limit of notices
  • Added conversation timeline support (only for APIs in Status.net 1.0+), when pressing C-c C-c over a notice it will display its conversation timeline
  • Added zebra stripes styling to timeline

Bug fixes

  • Fix highlighting of notices that are a reply to you but don’t have your nick in the text (as status.net 1.0 change)
  • Always crop avatars to 48×48 pixels
  • Improved vertical spacing between notices
  • Fixed icon placement when displaying dents in reverse order
  • Identica-mode buffer will no longer get killed on network error
  • Fixed support for gravatar images
  • Lots of code cleanup
  • Many other minor bugfixes

There is also a mailing list for the project to discuss any new features, ideas or bugs.

Hope you like the new release and thanks to everyone who during this cycle has spent time reporting bugs or sending patches. Your contributions are very valuable and keep improving this project.





Categories
Emacs GNU/Linux Free Software & Open Source

Prepare your tea with Emacs

Jazmin and Dragon Well Tea

I love tea. I’m not a coffee drinker, so I get my morning boost from severl kind of teas. I use black teas from Teavana and green teas from a little shop in chinatown San Francisco called Ten Ren Tea. And I recently discovered that mate and black teas are a great energy booster combination!

Anyways, the point is that I make several teas at the office, and I always have to be watching carefully the stopwatch on my phone or set an alarm on it to know when my tea is ready.

A few months ago I found out about Emacs tea-time mode. It sets a timer then plays a sound and show a message to let you know when your tea is ready. So now you can make my teas with the help of Emacs!

At work I use a Macbook Pro, and the original code was very GNU/Linux specific. So I modified Konstantin Antipin’s tea-time mode to make it more platform independent and configurable.

You can grab my fork of tea-time mode (at least until my patches are accepted) from https://github.com/gabrielsaldana/tea-time save it on your elisp load-path (typically at the ~/.emacs.d/ folder) and add this to your .emacs initialization file:

(require 'tea-time) (setq tea-time-sound "path-to-sound-file")

Now you can configure which program to use as player for the alarm sound.

If you’re using a Mac and Emacs for Mac OS X, sound support is not available by default; You’ll need to run a shell command. In Mac, the default player can be set as:

(setq tea-time-sound-command "afplay %s")

On GNU/Linux, you don’t need to configure this as it will fall back to default sound engine configured (alsa, pulseaudio, etc).

Categories
Emacs GNU/Linux Free Software & Open Source Tutorials & Tips

Post to WordPress blogs with Emacs & Org-mode

Recently I’ve discovered Org2blog, an Emacs mode to write your blog posts locally using org-mode post them to your WordPress blog in a very fast and easy way.

I’ve written before on how to write your blog posts and publish them using Emacs. Previously, my method of choice was using Weblogger mode. I even wrote some enhancements to it.

The problem I found with this method is that it uses message-mode as its base mode. So you’re basically writing an email. The shortcomings of it were that whenever I wanted to write links, bold text, or any custom formatting generally done through HTML tags, I had to either type out the HTML or temporarily switch to html-mode. That sometimes gave me some problems converting the HTML code into entities, and ended up with a mess to fix at the WordPress editing textarea.

Org-mode (included in Emacs since about version 22.1), if you haven’t heard about it already, is a very good way to take notes, organize your tasks, among other day to day useful things. You also get some basic formatting like bold text and italics, as well as links among many other useful things. Nowadays, I find myself typing things in org files constantly throughout my day, and with all its long list of qualities, it became a more suitable way for me to write blog posts.

Org2blog provides a way to post your Org files or post a subsection of your file with a few keystrokes. All you need to do is clone the repository on your load path directory

git clone http://github.com/punchagan/org2blog.git

Then, add this to your .emacs file

  (setq load-path (cons "~/.emacs.d/org2blog/" load-path))
  (require 'org2blog-autoloads)

Finally set up you blog(s) settings in you .emacs file

     (setq org2blog/wp-blog-alist
           '(("wordpress"
              :url "http://username.wordpress.com/xmlrpc.php"
              :username "username"   
              :default-title "Hello World"
              :default-categories ("org2blog" "emacs")
              :tags-as-categories nil)
             ("my-blog"             
              :url "http://username.server.com/xmlrpc.php"
              :username "admin")))

To start wrigint a new post, you can now use
M-x org2blog/wp-new-entry

Or, as I more frequently use, post a subtree of an existing org file using:
M-x org2blog/wp-post-subtree

I hope you enjoy writing and posting your blog posts within Emacs and Org-mode. I certainly do and has turned out to be a very fast way to quickly draft and later on (even offline) elaborate on the blog post details in a comfortable editing environment. Also you get the added benefit of having a local copy (backup) of your blog posts as Org files.