Archive

Author Archive

emacs commenting lines

July 1st, 2011 No comments

I was wondering if the -dwin (M-;) command could be changed that if i am anywhere in the line the whole line is commented and not a started from the end of the line. based on the idea found in a mailing list i altered the command with

;; http://www.opensubscriber.com/message/emacs-devel@gnu.org/10971693.html
(defun comment-dwim-line (&optional arg)
  (interactive "*P")
  (comment-normalize-vars)
  (if (and (not (region-active-p)) (not (looking-at "[ \t]*$")))
      (comment-or-uncomment-region (line-beginning-position) (line-end-position))
    (comment-dwim arg)))
 
(global-set-key "\M-;" 'comment-dwim-line)

add this to your . file and enjoy.

Categories: IT
Tags: , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Locandina canile di Trento 2011

May 29th, 2011 No comments
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Install Emacs from source on MAC OS X

April 29th, 2011 1 comment

How to from source?

You will need Xcode tools to perform this operation.

MacBook-Pro: mkdir src
MacBook-Pro: cd src
MacBook-Pro: cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/emacs co emacs
MacBook-Pro: cd emacs
MacBook-Pro: ./configure --with-ns --with-jpeg=no --with-gif=no --with-tiff=no
MacBook-Pro: make bootstrap
MacBook-Pro: make
MacBook-Pro: make install
MacBook-Pro: sudo cp -r nextstep/Emacs.app /Applications/Emacs.app

if you would like to use it in terminal

MacBook-Pro: cd src
MacBook-Pro: make
MacBook-Pro: cp emacs /usr/bin/emacs
MacBook-Pro: emacs --version
GNU Emacs 23.1.90.1
Copyright (C) 2009 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
MacBook-Pro: emacs -nw
Categories: MAC OS X
Tags: , ,
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Mi no centro

October 30th, 2010 No comments
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Hidden files

October 10th, 2010 No comments

open a terminal and run the following to show hidden files

MacBook-Pro: defaults write com.apple.Finder AppleShowAllFiles true
MacBook-Pro: killall Finder

to hide them run the following

MacBook-Pro: defaults write com.apple.Finder AppleShowAllFiles false
MacBook-Pro: killall Finder
Categories: MAC OS X
Tags: ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...