Showing posts with label emacs-24. Show all posts
Showing posts with label emacs-24. Show all posts

02 December 2011

Working on remote files using ssh and sudo in emacs/tramp

Working with emacs is always fun.
To work on remote files you will find enough information at Tramp tutorial, here i am talking about working with remote server and then use sudo to write some file.

For example : You are connecting remote machine using ssh as user1 and then you need to write file using user2 (actually sudo -u user2 filename) or better to say multiple hoping.

,-------------------------------------------------
| user1@remotehost ---> sudo -u user2 at remotehost filename
`-------------------------------------------------

Cool then, you need to add following line in your .emacs file.

set-default 'tramp-default-proxies-alist (quote ((".*" nil "/ssh:user1@%h:"))))
after saving and evaluating use

C-x C-f sudo:user2@remotehost:filename_path

Happy Hacking
gnumonk

15 November 2011

Installing Emacs 24 from source in FreeBSD

I have installed emacs 24 from bzr in FreeBSD. Here it is goes.
  1. Install bzr from portage.
    • %cd /usr/ports/devel/bzrtools && sudo make install clean
  2. Install depended software from default emacs portage.
    • %cd /usr/ports/editor/emacs && sudo make
  3. Create emacs checkout director for bzr checkout
    • %mkdir ~/gnmk_emacs
  4. Pull the updated branch from emacs source
    • %cd ~/gnmk_emacs
    • %bzr branch http://bzr.savannah.gnu.org/r/emacs/trunk emacs_trunk
  5. Configure
    • %cd ~/gnmk_emacs/emacs_trunk/
    • %./Configure --prefix=~/gnmk_emacs/bsd_emacs/
  6. Make bootstrap to generate all lisp
    • %gmake bootstrap
  7. Finally Install
    • %gmake install
  8. Run 
    • %~/gnmk_emacs/bsd_emacs/bin/emacs