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
Bookmarks Programming & Web Development

From my reading links: HTML5 forms and Django, Google API playground and Python development tips

  • Making Forms fabulous with html5 Great introduction to the new HTML5 form input types and what you can do with them.
  • HTML5 – Example Form validation and styling Form elements With the new HTML5 form input types and CSS3 properties, form validation is very quick and easy, as well as nice form element presentation.
  • Head JS A very interesting utility that will load all your js scripts (jquery, google analytics, etc) in parallel so page load times get shorter, plus a lot of other nice features like new HTML5 elements styling in browsers that don’t yet support them like some versions of Internet Explorer.
  • Google APIs code playgroud I didn’t know you could play with all the Google APIs in a single webpage, testing your code as your write it.
  • GeoDjango and google maps An interesting read if you’re trying to integrate Google Maps with Django
  • HTML5 and Django form inputs How to render the new HTML5 input types with Django form classes. It doesn’t require much, really easy and fast.
  • Emacs as Python IDE A bunch of tips to have a good Emacs Python development environment. I personally don’t prefer IDEs, so I don’t use ECB but the rest is very useful.
  • Setting up a Python Environment Good advice for those coming from a PHP world and are getting started on Python development. I didn’t know about virtualenv until I had to deploy my first Django app on a shared host web server. Then it all made sense.
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.

Categories
Emacs

Emacs Identica-mode release v1.1

Since the last official release, there’s been a lot of work on the Identica-mode for Emacs. Its been a while since the last release and probably most users have been using the development version directly from the Git repository. Even though I try to make the development branch as stable as possible, official releases give some users more confidence and ditributions (like Arch, so far I know of) can name their packages with some versioning reference.

Download Emacs Identica-mode 1.1

What’s new on v1.1

  • Added “natural” repeating, mapped to the “r” key
  • Added icons to indicate if automatic timeline updates are on or off
  • Can now delete notices
  • Added option to show timeline in reverse order (newest at the bottom)
  • Added support to recognize ur1.ca urls without the “http://” part (some clients like Choqok use this syntax)
  • Added support to recognize unicode urls
  • Added option to limit number of dents in timeline
  • Removed dependency on cURL to shorten URLs with ur1.ca
  • and many bug fixes

I hope you enjoy using identica-mode as much as I do. I’d also like to share my joy of developing and improving it as well, so if you have any ideas or code contributions, please use the project’s Savannah page.

Any donations to support the development of this project are very much appreciated. Thank you for using, contributing or supporting Emacs Identica-mode.





Categories
Emacs

Emacs Identica-mode notifications

There’s a feature on Emacs identica-mode that I haven’t documented or written about before and its been there for quite some time.

Its very nice to have notifications when you get new updates on your timeline. I’ve seen it on other clients like TweetDeck. So I made a hook for Emacs to execute some code after it has fetched new dents. With this you can call any notification system to show a message of the new dents.

Here’s the code I’ve been using to show new notice count on KDE4 notification system (similar code can be used for Gnome’s notification system):

;; KDE 4 Notification of new dents
(add-hook 'identica-new-dents-hook (lambda ()
   (let ((n identica-new-dents-count))
     (start-process "identica-notify" nil "kdialog"
		    "--title"
		    "Emacs Identica-mode New dents"
		    "--passivepopup"
                    (format "You have %d new dent%s"
                            n (if (> n 1) "s" ""))
		    "3"
))))

Emacs Identica-mode notifications

I haven’t tried to do the same in Mac OS with Growl but I guess its also possible. If someone has the code for that, please share it in the comments. You can also use ToDoChiKu as a universal notification system.

**Update** Jason McBrayer has posted the elisp code to use identica-mode with ToDoChiKu on his blog.

I hope you like this hook feature and please let me know other ways to use the hook, or if any other hook is usefull to have.