fs-mode for emacs (Linux filesystem management in emacs)
fs-mode for emacs
Table of Contents
- 1 What is fs-mode?
- 2 How to install it?
- 3 How to use it?
- 4 Use root-cmd.el to execute commands which needs root privilege.
1 What is fs-mode?
fs-mode is an Linux file system management mode in emacs. It can manage your file system, you can mount or umount file system.
It also support mount ecryptfs file system.( I put my little secret into ecryptfs file systems. )
2 How to install it?
I upload the source code to github, download it from following link.
https://github.com/suzp1984/fs-mode
add following code into emacs's init file.
add following code into emacs's init file.
;; change the directory according to your needs (add-to-list 'load-path "directory/to/install/") (require 'fs-mode-autoload)
3 How to use it?
Use M-x list-fs to enter the fs-mode. and there are following key shortcuts bindings.
m - mount a file system.
u - umount a file system.
q - quit the fs-mode.
m - mount a file system.
u - umount a file system.
q - quit the fs-mode.
4 Use root-cmd.el to execute commands which needs root privilege.
When I wrote the fs-mode, I need a elisp package to make a process with root
privilege, because the mount and umount command need root privilege. So I make
root-cmd package to execute root command.
It is really convenient to use the root-cmd. Following is a sample to illustrate how to use it.
It is really convenient to use the root-cmd. Following is a sample to illustrate how to use it.
(require 'root-cmd) ;; execute a root command (root-cmd "ls /root/") ;; return the output of above command if needed. ;; you can get the output directly from variables root-cmd-output-keep (root-cmd-output) ;; stop the root command process. (root-cmd-stop)
Comments
Post a Comment