Emacs is one of the most featured text editor in Linux/Unix like systems. The users don't need to move over the fingers to achieve almost all operations to edit text files or to code. It would be a quite efficient multi-function text editor if the horrible beginning start time of using it is neglected. Some keyboard companies produce specific customised keyboard such as HHKB for the ease of Emacs' using.
One of the Emacs' feature is to browser a program project with a large number of source files. More windows and tools are provided to navigate through the whole project. However, the installation and settings of ECB (Emacs Code Browser) is very complicated with a lot of works involved in its long manual. Here I record my short settings of a usable ECB. Not all of the features of either Emacs or ECB are exploited according to my settings, because I am also a newbie of Emacs and ECB. All of my efforts contribute on the usable version of working Emacs and ECB.
Setting the ECB to work in Emacs.
Find out the location of the installed ECB. I installed it by using yum tools. In this case, the location is /usr/share/emacs/site-lisp/ecb. Put this path into the list of emacs' load-path. Then require the ecb after that. However, an error message would be shown up saying that something wrong with the stack-trace-on-error. Then toggle on the stack-trace-on-error before load the ecb to the load-path in .emacs, the configuration file of Emacs.
ECB would ask you to insert some other setting to Emacs' configuration file. Just accept it is fine.
How to use the ECB:
1. navigation among different windows:
use the C-c . g (x) command, where (x) can be:
d: directory window
s: source files window
m: class and function names window
h: history window
2. Show any working directory in directory window.
When I open the ECB mode by using M-x ecb-activate, the directory window have nothing displayed. In order to set the working directory in the directory window the following steps are required:
M-x customize-option RET ecb-source-path RET
Choose the INS button in the opening custom buffer in order to insert a directory as a source path.
Choose to save for current session or for future sessions by type a number for specific type saving. Then the working directory should be shown in the directory window.
3. Customise the layout of ECB
There are several predefined layout available to users in ECB. The method used to change to these layouts is to set the option "ecb-layout-name". This is quite similar with the method used to set the working path of current session. The local tool of Emacs: M-x customize-option is employed to accomplish these sort of tasks.
The command M-x ecb-show-layout-help can be used to check the details of a predefined layout through it text-type picture.
Monday, 22 October 2012
Sunday, 21 October 2012
Thread-local storage
Thread-local storage (TLS) is a programming method that is used to make static and global variables be local to a thread. The '"errno" is a canonical example of TLS method. Actually, a "errno" should be a static variable used by all functions to determine the error status. However, in each thread of a running process, there should be a separated one in order to prevent the infection from other threads in the same process.
The comparing method to achieve the similar function with the TLS is the thread lock for a static or global variable. However, a carelessness of requiring the lock in any threads in the process would affect other threads.
The comparing method to achieve the similar function with the TLS is the thread lock for a static or global variable. However, a carelessness of requiring the lock in any threads in the process would affect other threads.
Subscribe to:
Posts (Atom)