This post is the third part of the series Dired as Default File Manager.

Mark file backward

To mark file backward (mark file and move the cursot back to the previous line, opposite with when you press m), add this to your .emacs. If you just want the cursor to stay at the current file, remove (call-interactively ‘dired-previous-line) in the code. Change s-b to the key binding that you like.

(defun dired-mark-backward ()
  (interactive)
  (call-interactively 'dired-mark)
  (call-interactively 'dired-previous-line)
  (call-interactively 'dired-previous-line))
(define-key dired-mode-map (kbd "s-b") 'dired-mark-backward)
Read more

This post is the second part of the series Dired as Default File Manager.

dired-details & dired-details+

This section requires 2 more packages: dired-details and dired-details+. You can easily install both of them through package.el (see this post Emacs Package Manager).

To activate it, add this to your .emacs

(require 'dired-details+)

This picture illustrates how dired-details looks like. You can use ( or ) to toggle hide (like the left window) or show (like the right window) details.

Read more

This post is the first part of the series Dired as Default File Manager.

Before reading this, you should have a look at this page Dired - GNU Emacs Manual to know some basic commands to use Dired properly.

Always Recursion

  • Always recursively delete directory
(setq dired-recursive-deletes 'always)
  • Always recursively copy directory
(setq dired-recursive-copies 'always)

Auto guess target

Set this variable to non-nil, Dired will try to guess a default target directory. This means: if there is a dired buffer displayed in the next window, use its current subdir, instead of the current subdir of this dired buffer. The target is used in the prompt for file copy, rename etc.

Read more

Dired is a visual directory editor, a computer program for editing file system directories. Dired is shipped with Emacs. It can be really strange and difficult for new people. However, once you get used to it, you’ll find it a convinience and useful tool in helping you manage your files effectively.

Introduction

I’m the person who is interested in terminal and command line interface. I love controlling everything in my computer using my keyboard since it’s the fastest way to interact with my computer. It helps me concentrate on what I’m working with on the screen and speed up my work because I don’t have to move my eyes out of the screen and move my hands out of the keyboard. Especially when I work at night, I usually turn off the light and I can see nothing but my screen and I don’t want to waste my time looking for the mouse.

Read more

This is a continue to the first part in this post Emacs - Setting up environment for C/C++ Programming - Part 1. This time, I’ll demonstrate some more tips to help make your Emacs a powerful IDE for C/C++ programming

Syntax Checking on the fly

Flymake is a package which comes with Emacs 23 and above to help Emacs perform syntax checking as you type. It uses an external program (usually the compiler) to determine the errors.

Since it’s a part of Emacs 23, you don’t have to install in order to use it, just add this to your .emacs

(require 'flymake)
Read more

In this previous Emacs - Async File Copying in Dired using Rsync, I have demonstrated how to use rsync to replace the built-in Dired copy function. Today, I have improved that function so that rsync window will dislay progress separately from my currently working windows. Moreover, after finishing copying, it will show the message and automatically close the progress window after 5 seconds. Also, the rsync progress window can not be selected by call other-window. As a result, the rsync feature now does not affect my current work. I can continue what I’m currently doing while leaving rsync take care of my files.

Note: it would not run on Windows computers.

Implementation

This is the new code. Put it in your .emacs, replace with my old rsync function if you have already use it.

Update 8 Apr 2013: I have improved the code a little bit so that later it will be much easier for me to add new async function like moving, compressing,… Also, this time, you can run multiple rsync process.

Read more

Yesterday, I decided to buy my own domain to serve for my blog after months using github.com subdomain (http://tmtxt.github.com). It took me a little difficult to figure out how to setup my custom domain (bought from namecheap.com) for my old github blog. This is the steps how to config my current domain http://truongtx.me.

First you need to config the domain in your repo. Create a file name CNAME in your root directory of your blog. Insert your custom domain there, in my case it it truongtx.me. Save the file and push it to github.

Now open namecheap.com and login into your account and go to Domain management. Open Host Records to edit your domain to point to github. Follow the config in the picture below and then click Save. 204.232.175.78 is the ip of github server, you can find it in this page

namecheap

Read more

This blog post demonstrates how to config Google Analytics for Jekyll Bootstrap to monitor website view, user, traffic, etc. The manual on Jekyll Bootstrap site is not so clear and comprehensive for those who is new to Google Analytics and Jekyll Bootstrap.

Register for Google Analytics

First, you need to register a Google analytics account. Go to this link https://www.google.com/analytics/ and Sign In with your Google account. If this is the first time you use Google Analytics, it will ask you to create a new Google Analytics account. This is different from your Google account.

Select Website as the target that you want to track. After that, select Classic Analytics method.

Select

Read more
Simple Android TODO App
  •  04 April 2013
  •  misc 

Overview

This is a simple Task Management Application (To-do list manager). It helps you in managing and organize your daily works include what you need to do, when is the due date for the task, who will be involved in the activity, etc.

Read more

I really hate the “Reopen Windows when Logging back”” feautre in MacOS Lion and above. That feature exists because Apple wanted to integrate iOS into MacOS. However, my Macbook uses a HDD, not an SSD, so everytime I log into my computer, it automatically opens all those applications, which takes time and can make my computer run very slowly. Even though I have unchecked the “Reopen windows when logging back in” option in the Shutdown/Restart dialog, my Mac often reopen all my last running applications. I have to wait for all of those stuffs to completed open and then I can use my computer normally.

Restart Dialog

Read more