Tuesday, October 18, 2011

Debian Squeeze for my Parents - Skype, Alsa, OSS

v 0.2
18 Oct 11

I was showing my Father how to use Skype on Debian - he was using a headphone / mic setup plugged into the front of the computer - when I discovered that despite the headphones working, the microphone was not.

I played with settings in Skype, then decided to see what the System could provide.  I found settings for "Front Microphone" and "Front Microphone Boost" in the Gnome Alsa Mixer and activated them.  I then found that I could use the microphone, but still Skype refused to use it.

Then I started to wonder.  Does Skype use ALSA?  Or is it wedded to OSS?  I searched the package database and found a package "alsa-oss".  On a whim I loaded it and then all was well.  I cannot say for sure that this fixed things, but it certainly seemed to do the trick.



Later ........

Friday, October 14, 2011

Finding Emacs - Colours,Toolbar and Variables

v 0.2
14 oct 11


Colours

I was wondering about setting colours in Emacs ... and then started wondering about Themes and even how to find out what variables to set.

Well, here is a website that gives all the colours you can set:


http://raebear.net/comp/emacscolors.html

How can you use them?  Well to start off, try putting this in your init file ....

(set-background-color  "grey95")

It is a very simple change - changes the background to light grey, however you get the idea.


Themes

Try this website to view a few:
http://color-theme-select.heroku.com/

Toolbar

Want to determine whether the toolbar is on or off?

(tool-bar-mode t)


Variables

I found this list this morning, however there are a lot more than this:
http://www.gnu.org/s/libtool/manual/emacs/Variable-Index.html


Later ....

Wednesday, October 12, 2011

Finding Emacs - Aquamacs and Emacs on OSX

v0.2
12 Oct 11

I have both Aquamacs and Emacs on my Mac laptop.  Aquamacs is a really good adaptation of Emacs to the OSX environment, particularly for "non-geeks".

One aspect of Aquamacs has had me wondering about it over the last few weeks - that of initialisation.  If you read the aquamacs manual, it tells that it reads its own customisation and preferences files first and then it reads " .emacs ".

Experimentation tells me that Aquamacs does NOT read the initialisation files contained in " .emacs.d " as per the latest emacs variants.  The only problem with this is if you do not know about it.  Simply overcome - have your " preferences.el " and your " init.el " files load the things you want them to load.

Done!


later.

Finding Emacs - Installation in Windows 7

v 0.2
12 Oct 11

Way back when I started to be interested in Emacs, I posted my installation adventures.  A year has passed, and even though I use Emacs on OSX and Linux, somehow a Windows Desktop has remained in a convenient place and I've often used Emacs on that.  I updated the XP system to Windows 7, and would have to say that if you do use Windows, upgrading would be a wise move.  One thing about Windows 7 that appeals to me is that it has become more "Unix-like" and that makes it easier to have something like Emacs on the go.

The "home" directory in Windows 7 is your username, so if your account is "jane" it would be

c:\Users\jane

I'm the only person who uses the machine, so I've found it convenient to put both the program directory and initialisation files in "jane".

First stop is the Gnu website and downloading the latest Windows version of Emacs.  At the moment it is 23.3.  Then download the manual.  The latest version at the time of writing is 23.3, so you will want to download  emacs-23.3-bin-i386.zip .  In general, when new versions come out, the one to get will be between 35-40 mb in size and with the format  " emacs-XX.x-bin-i386.zip ".  The archive will unzip into an "emacs-23.3" or whatever folder.  I just put this in the home directory as so:


c\Users\jane\emacs-23.3


The program to run is "C:\Users\jane\emacs-23.3\bin\runemacs.exe" .  I made a shortcut, and then pinned it to the taskbar.  Congratulations, you now have a bare-metal Emacs installation.


But wait ... there's more.


Create a new folder in your home directory called  "   .emacs.d  "  .  Note the periods.  In unix terms, the period at the beginning makes the file or directory invisible.  I believe in Windows there are some problems with the period at the beginning, though I've not seen any, and an underscore will suffice, but I've not looked at that.  So you have a new directory as so:


C:\Users\jane\.emacs.d


Inside this directory go initialisation files etc .. notably  " init.el ".  Here is a part of my init.el file to get you going.


-----------------------8<--------------------------------
 ;==================================================
;
;        Geoff's Init.el file
;
;==================================================

(setq inhibit-startup-screen t)

;=================================
;
;         Org Mode
;
;=================================

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(add-hook 'org-mode-hook 'turn-on-font-lock)  ; Org buffers only
;
;;(org-remember-insinuate)


;=================================
;
;         Mobileorg
;
;=================================

;; Set to the location of your Org files on your local system
(setq org-directory "~/org")
;; Set to the name of the file where new notes will be stored
;  Filename can be anything you like.
(setq org-mobile-inbox-for-pull "~/org/mobileorg.org")
;; Set to /MobileOrg.
;; Should be as below.  Windows has recently changed to just "Dropbox".
(setq org-mobile-directory "~/Dropbox/MobileOrg")
;  All "index.org" does is set the variable below.
(setq org-mobile-files (quote ("A380Notes.org")))


;=================================
;
;         Yasnippet

;  Requires yasnippet to be installed
;
;=================================

(add-to-list 'load-path
              "~/.emacs.d/plugins/yasnippet-0.6.1c")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets")

;; Develop and keep personal snippets under ~/emacs.d/mysnippets
(setq yas/root-directory "~/.emacs.d/plugins/mysnippets")

;; Load the snippets
(yas/load-directory yas/root-directory)



;======================================================================
;
;    Encryption - symmetric gpg
;
; this requires gpg be installed, available from  http://www.gnupg.org/
; To open a " .gpg " file, it will ask for password twice
; To close, will ask for password once.
;
;======================================================================

(require 'epa)
(epa-file-enable)

;======================================================================
;
;             Predictive
;
;         http://www.dr-qubit.org/emacs.php
;
;======================================================================

(setq load-path (cons "~/.emacs.d/plugins/predictive" load-path))
(autoload 'predictive-mode "predictive" "predictive" t)

;======================================================================
;
;;                    Aspell
;
; GNU Aspell is available from: http://aspell.net/
;
;======================================================================

(setq-default ispell-program-name "c:\\Pro\\Aspell\\bin\\aspell.exe")


;=================================
;
;    Norton Commander

; nc.el
;
;=================================

(add-to-list 'load-path "~/.emacs.d/plugins")
(autoload 'nc "nc" "Emulate MS-DOG file shell" t)

;=================================
;
;    Midnight Commander

; mc.el
;
;=================================

(add-to-list 'load-path "~/.emacs.d/plugins")
(autoload 'mc "mc" "Emulate MS-DOG file shell" t)


;=================================
;
;    longlines

;    plugins already in load path

;
;=================================
; (add-to-list 'load-path "~/.emacs.d/plugins")
   (autoload 'longlines-mode
     "longlines.el"
     "Minor mode for automatically wrapping long lines." t)

 
-----------------------------------8<-----------------------------------------

Now much of what I've loaded extra are emacs lisp files I've found, particularly on the Emacs wiki.  I would start with the top couple of customisations, (Orgmode) and go from there.  Longlines.el is readily available on the internet and I'd install that alongsside the init.el file (if you are not going to add to the load path).

Longlines

A word about wordwrap.  What people think of as word-wrap does not exist by default in Emacs.  Visual-line mode and longlines combined give what we think of as proper wordwrap.

This is what I have at the start of my orgmode emacs files:

# -*- mode:org ; mode:visual-line ; mode:longlines -*-

It is a comment with instructions to Emacs to initiate the appropriate modes.


That's it for now



Later ..............