OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
> Emacs For Zaurus, tips & tricks & sharing
ZDevil
post Mar 31 2007, 07:52 AM
Post #1





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



What is Emacs?

According to the Emacs Manual, Emacs is: "Emacs is the extensible, customizable, self-documenting real-time display editor."

An alternative definition: Emacs is simple, powerful, all-purpose text-mode environment in which you can edit different files (e.g. texts, source codes), do PIM, implement GTD (David Allen's "Getting Things Done" approach), do outlining, play games (e.g. tetris, nethack), listen to music, emailing, do programming, and even have the whole shell live in it ......

Homepage: http://www.gnu.org/software/emacs/

Let me start a new thread here for people to discuss various tips and tricks for using Emacs ON ZAURUS, in order not to confuse the thread for testing builds. smile.gif

Although I use it under pdaXrom, I suppose virtually all the tips and tricks should work across platforms for Z.

My initial plan is to summarize the points we have in http://www.oesf.org/forums/index.php?showtopic=23455 ,
and I would like to add new things to this very first post for easy reference.

Of course, this is not meant to start any flame or holy war between emacs and vi, which for me is totally pointless and nonsense from the point of view of a non-geek common user. smile.gif

I am just a very dummy beginner and I am looking forward to learning from you all! smile.gif

*********

Where to download Emacs for Zaurus:

Sharp/Cacko: Emacs 22 CVS 2007-03-22 http://www.focv.com/ipkg/
pdaXrom:
Emacs 21.4, the latest stable release
Emacs 23 (CVS 2007-03-14), the latest developmental version, with good utf8 and CJK support)
OZ: ?

Sample .emacs file (all the settings in one plain text file put under the HOME directory): http://www.oesf.org/forums/index.php?act=A...pe=post&id=4189 (will update constantly)

Very newbie guide for Z users:
http://www.oesf.org/forums/index.php?act=A...pe=post&id=4261
(please comment and help improve that. the only principle: keep it simple and geek-free)


Different (compiled) mode packages for Z:
PIM-Suite (planner, muse, bbdb, remember)

This post has been edited by ZDevil: Apr 1 2007, 03:00 AM
Go to the top of the page
 
+Quote Post
ZDevil
post Mar 31 2007, 08:56 AM
Post #2





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Tips & Tricks:
#1 You can always edit the file ~/.emacs to add new settings and to modify how Emacs behave to suit your needs. It's just a plain text file.

#2 Online help
The very first screen gives you a number of key combos that take you to a wealth of information. For example,
C-h r : the Emacs manual
C-h i : all the manuals
C-h m : summary of commands of the current mode
C-h b : shortcut keys of the current mode

#3 To use Dire Mode:
Add this to .emacs:
CODE
(setq dired-use-ls-dired nil)  
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)

(radiochickenwax)

#4 To use stylus/mouse/finger ( laugh.gif ) to help nevigating:
Add this to the end of .emacs:
CODE
(xterm-mouse-mode)

(zdevil)


#5 To enable SCIM/ UIM/ GCIN/ XIM inputmethods to enter CJK (or other multi-byte) characters:
Run emacs 23 from a terminal program like this:
CODE
emacs -nw -color

(zdevil)

#6 Emacs also uses the directory /usr/share/emacs/site-lisp/ for third party site-wide package installations
(pgas)


#7 Make C-x C-b work better to switch between buffers
CODE
(global-set-key [?\C-x?\C-b]
             (lambda (&optional files-only)
                  (interactive "P")
                  (let ((b (list-buffers-noselect files-only)))
                    (display-buffer B)
                    (pop-to-buffer B))))

(zi99y)

#8 Switch through buffer list easily.

- Download swbuff.el and copy it to your elisp folder (http://sourceforge.net/projects/emhacks/).

- Add the following to your .emacs config file:
CODE
(require 'swbuff)
(global-set-key (kbd "C-x b") 'swbuff-switch-to-next-buffer)


To cycle forward thru buffers use "C-x b". You can add another line to bind another key to "swbuff-switch-to-previous-buffer" cycle in the opposite direction.
(zi99y)
Go to the top of the page
 
+Quote Post
ZDevil
post Mar 31 2007, 08:56 AM
Post #3





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Links:

General:

Emacswiki -- the ultimate source of information
http://www.emacswiki.org

Mode-specific:
PlannerMode QuickStart:
http://www.emacswiki.org/cgi-bin/wiki/PlannerModeQuickStart

eclair's very nice newbie guide to planner mode:
http://eclair.bizhat.com/emacs/plannernewbie.html
http://eclair.bizhat.com/emacs/plannerscreen1.html
http://eclair.bizhat.com/emacs/plannerscreen2.html

GTD with Emacs PlannerMode:
http://pigpog.com/node/1974

J. Klymak --- Planner Mode (good read)
http://saturna.seos.uvic.ca/~jklymak/PlannerMode.html

Just another GTD hacker:
http://genehack.org/2004/09/21

Sacha Chua's (the maintainer of planner.el) page, with lots of practical and insightful tips:
http://sacha.free.net.ph/notebook/wiki/PlannerMode.php

Nethack for Emacs!
http://www.nongnu.org/nethack-el/
Go to the top of the page
 
+Quote Post
zi99y
post Mar 31 2007, 08:56 AM
Post #4





Group: Members
Posts: 281
Joined: 9-August 06
Member No.: 10,709



Howto: Add php-mode and css-mode and autoload them when you open a php/css file:

- Download the two lisp files to your elisp dir:
- http://www.emacswiki.org/cgi-bin/wiki/download/css-mode.el
- http://www.ontosys.com/src/php-mode.el

- Add the following to your .emacs config file:

CODE
(autoload 'php-mode "php-mode" "PHP editing mode" t)
(add-to-list 'auto-mode-alist '("\\.php3\\'" . php-mode))
(setq auto-mode-alist
      (append '(("\\.php$" . php-mode))
              auto-mode-alist))

(autoload 'css-mode "css-mode" "Mode for editing CSS files" t)
(setq auto-mode-alist
      (append '(("\\.css$" . css-mode))
              auto-mode-alist))


- Note: There are other versions of php-mode to choose from here:
- http://www.emacswiki.org/cgi-bin/wiki/PhpMode
Go to the top of the page
 
+Quote Post
Da_Blitz
post Mar 31 2007, 07:19 PM
Post #5





Group: Members
Posts: 1,565
Joined: 7-April 05
From: Sydney, Australia
Member No.: 6,806



not to steal EMACs thunder (and dont want to start a flame war) but nano is handy for those who prefer the ctrl bindings rather than esc as its shipped by default with most distros (so instead of using vi and you want somthing closer to emacs while setting the system up give it a go)

nowhere near the amount of features as emacs, just handy on new or unfamiliar systems
Go to the top of the page
 
+Quote Post
xjqian
post Mar 31 2007, 09:08 PM
Post #6





Group: Members
Posts: 500
Joined: 17-January 04
From: St. Louis, USA
Member No.: 1,478



great info. any plan to add this to the OESF wiki.
Go to the top of the page
 
+Quote Post
pgas
post Mar 31 2007, 11:40 PM
Post #7





Group: Members
Posts: 1,099
Joined: 17-December 03
From: Athens, Greece
Member No.: 1,210



QUOTE
#8 Switch through buffer list easily.

the method often recomended for switching buffers is iswitchb (included in emacs from v21)
see:
http://www.emacswiki.org/cgi-bin/emacs-en/IswitchBuffers
(and if you like it be sure to check http://www.emacswiki.org/cgi-bin/emacs-en/...ctivelyDoThings which is included in emacs from cvs)

also, in emacs from cvs (22,23) there are next-buffer and previous buffer
bound by default to C-x <right> and C-x <left>
Go to the top of the page
 
+Quote Post
ZDevil
post Apr 2 2007, 08:22 AM
Post #8





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



I find it clumsy to type "yes/no" in many confirmation messages with the Z keyboard.
So I add this line in ~/.emacs:

CODE
(fset 'yes-or-no-p 'y-or-n-p)


Restart Emacs. Then you will only need to type "y" or "n" to all dialogues. smile.gif
Go to the top of the page
 
+Quote Post
pgas
post Apr 2 2007, 08:33 AM
Post #9





Group: Members
Posts: 1,099
Joined: 17-December 03
From: Athens, Greece
Member No.: 1,210



also try Esc / (M-/) it tries to complete the word, searching for possible completion in the opened buffers
Go to the top of the page
 
+Quote Post
ZDevil
post Apr 2 2007, 08:57 AM
Post #10





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Customizing the keys (Example: PlannerMode GTD use)

1. In order to use Planner more smoothly, I remap the key combos (C-x command) so as to press fewer keys on the Zaurus keyboard:

Most default keys are already using the Control key, but not so much for the Alt (Cancel) key

I did this in ~/.emacs:

2. To write down a task/note/persistent memo, I use these:
CODE
(global-set-key (kbd "M-0") 'planner-create-task-from-buffer)
(global-set-key (kbd "M-9") 'planner-create-note)
(global-set-key (kbd "M-8") 'remember)

meaning:
Alt + 0 = "I think of one new task!"
Alt + 9 = "Let me jot down a note."
Alt + 8 = "I want to keep this note both for today and in its project/plan page."

3. Besides recording stuff, I also need to manage them from time to time. I use these keys for the most frequent actions:
CODE
(global-set-key (kbd "M-7") 'planner-copy-or-move-task)
(global-set-key (kbd "M-6") 'planner-delete-task)
(global-set-key (kbd "M-5") 'planner-delete-note)

meaning:
Alt/Cancel + 7 = Duplicate a task or move it to somewhere.
Alt/Cancel + 6 = Delete the task.
Alt/Cancel + 5 = Delete the note.
(I can use both because the number keys "7", "8", "9" are in the middle of the top row. smile.gif )

4. To evaluate and keep track of my work (tasks), I use these keys:
CODE
(global-set-key (kbd "M-i") 'planner-task-in-progress)
(global-set-key (kbd "M-k") 'planner-task-done)
(global-set-key (kbd "M-u") 'planner-task-pending)
(global-set-key (kbd "M-o") 'planner-task-open)
(global-set-key (kbd "M-l") 'planner-task-delegated)
(global-set-key (kbd "M-.") 'planner-raise-task-priority)
(global-set-key (kbd "M-,") 'planner-lower-task-priority

meaning:
Alt + k = "I have finished it!"
Alt + i = "I am doing it."
Alt + l = "I will let somebody else do it (for me)." (add a contact entry using bbdb)
Alt + u = "I have to stop doing it (for now)."
Alt + o = "Hmm... I have to rethink about its status..."
Alt + . = "This task is both urgent and important!" (Priority A)
Alt + , = "This task is important but not very urgent" (Priority C)

[A small note: I give the Task Priorities A/B/C my own interpretation different from John Wrigleys'. For me it's more intuitive to weigh tasks in terms of the matrix of URGENCY and IMPORTANCE. So i have: urgent and important (A), urgent and not important (B ), not urgent but important (C ), while leaving things neither urgent nor important to general notes (hence no priority). By default a newly created task is given a "B" status (urgent) to remind me of dealing with it. ]

Together with very straightforward context tags (e.g. @Home, @Office, @Internet, @Supermarket ... as individual "pages"), my basic working GTD setup begins to emerge. wink.gif


A technical question: I find the key setting command M-x global-set-key fails to recognize quite a number of keys on the Zaurus keyboard, including Fn, the applications keys (Calendar, Address, Mail) and the screen keys. Any workaround? rolleyes.gif

This post has been edited by ZDevil: Apr 3 2007, 01:53 AM
Go to the top of the page
 
+Quote Post
ZDevil
post Apr 2 2007, 12:32 PM
Post #11





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



A list of games specially for Emacs: tongue.gif
http://www.emacswiki.org/cgi-bin/wiki/CategoryGames

Of course we can also play all those "console" games (in the shell mode).
Go to the top of the page
 
+Quote Post
ZDevil
post Apr 4 2007, 03:03 AM
Post #12





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Using the BBDB address book: a short how-to

BBDB (the Insidious Big Brother Database laugh.gif http://bbdb.sourceforge.net/ ) is a very popular address book mode in Emacs. It is simple yet very powerful as you can link its address book entries easily to your notes, plans, emails, etc.

Setting up:
Before using BBDB, make sure you have these lines in your .emacs:
CODE
(add-to-list 'load-path "/usr/share/emacs/23.0.0/lisp/bbdb/lisp")    # OR any other path where BBDB is installed.
(require 'bbdb)    # This is to enable BBDB in Emacs
(require 'planner-bbdb)    # This is to enable BBDB in Planner Mode
(setq bbdb-north-american-phone-numbers-p nil)    # You need this line unless ALL your contacts have phone numbers in the US format.
(bbdb-initialize)    # This is to load BBDB when starting Emacs (?)  


Create an address book entry in BBDB:
Simply use the command M-x bbdb-create (you may want to assign an easier keyboard shortcut to this) anywhere.
Then you will be asked for providing these in order: Name, Company, Net address, Address Description, Street Line(s), City, State, Zip Code, Country, Phone Location, Phone, Additional Comments.
Here is an example of a faked entry:

Attached File  emacs_pim6.png ( 15.59K ) Number of downloads: 61


To view a whole list of entries in your address book, simply do a M-x bbdb [Enter] [Enter].
You can always modify the record in the BBDB window, such as e (edit current field), d (delete current field or record), and so on, for more see http://bbdb.sourceforge.net/bbdb.html#SEC33

The whole bbdb database is just a plain text file ~/.bbdb. But we'd better modify things in Emacs but not directly in the file manually or something may go wrong.

BBDB seems to support import and export its database a vcard or csv format. But I have yet to play with them.

Importing:
http://www.emacswiki.org/cgi-bin/wiki/BbdbImporters
http://anirudhs.chaosnet.org/blog/2004.09.20.html
http://www.splode.com/~friedman/software/e...sp/src/vcard.el

Exporting:
http://www.emacswiki.org/cgi-bin/wiki/BbdbExporters
http://www.emacswiki.org/cgi-bin/wiki/bbdb-vcard-export.el


Next I will demonstrate how to use BBDB in Planner.
Go to the top of the page
 
+Quote Post
ZDevil
post Apr 4 2007, 03:09 AM
Post #13





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Adding contacts linking to BBDB address book

Example: Adding contacts in Planner:

Ok, now here is a way to add contacts linking to the BBDB address book, so that you task or note or scheduled items or even things in your project (plan) pages will be associated with some particular person, and you can always look it up by simply clicking the hyperlink.

The way to add contacts in Planner Mode is actually very simple: just type bbdb://NAME in the exact location where you want the contact to appear.
(Many thanks to Sacha Chua who makes this happen!)

Upon finishing the last bit, that line will automatically turn into a link to bbdb!
The actual structure is:
CODE
[[bbdb://NAME]]      # you can see the structure when you are editing it.

By NAME, you can use either a full personal name, URL, or email address, OR, more easily, just any word in the address book entry (or more technically, anything that is a searchable *regular expression*, see http://linuxreviews.org/beginner/tao_of_regular_expressions/ for a good start. smile.gif )

In cases where there is space between the NAME words (which is not unusual), just put a "." between them, e.g. to add "John Smith" we can use bbdb://john.smith

Let's say we have an address book entry for OE forum and I'm creating a task associated with this entry. After writing down the task and adding entry for oesf there, this is what you will see when clicking the contact link:

Attached File  emacs_pim5.png ( 32.85K ) Number of downloads: 63


Actually you can make contacts linking to the BBDB address book in many different modes. Using gnus Gnus (a popular email client in Emacs) with BBDB seems very common (for setting up, see http://bbdb.sourceforge.net/bbdb.html#SEC19 ). The BBDB in my pdaXrom emacs-pim-suite package was not compiled with Gnus. Perhaps I should include this in the next version of the pim package. smile.gif
Go to the top of the page
 
+Quote Post
danr
post Apr 4 2007, 06:43 AM
Post #14





Group: Members
Posts: 138
Joined: 12-February 04
Member No.: 1,830



Hi ZDevil,

I was trying out the Planner method to GTD, but then this threw a spanner in the works: Org mode. Org mode appears to be a method of taking down notes using outlines, and can do many other things as well, including a number of different GTD methodologies. I've had a go with it and it is very complex to learn; in fact the manual weighs in at nearly 100 pages! But I think the main advantage is that notes and todos are kept together in one place, which is better than having two copies of the same data as in Planner. There are key presses to show you all your todos, and to hide the bits you're not currently working on.

Dan
Go to the top of the page
 
+Quote Post
ZDevil
post Apr 4 2007, 11:13 AM
Post #15





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Yes, I am aware of Org Mode, and am very interested in trying it out as well.
The reason why I took the trouble to read about and set up Planner is its wiki functionality and free-form: I can casually jot down anything I think of *before* organizing (or processing, categorizing) the ideas. Functions kinda like THE GTD inbox.
Prioritizing, tracking, annotating, etc can all come later when they are being processed altogether.
And the notes and tasks can always be associated with one another freely and with some "page" (I call it "Project plan").
Planner also allows me to publish any related stuff together in one single html.

I am not sure about how Org Mode fares in this respect. But I am more tempted to use a free association approach than a stricter hierarchical way. Moreover Sacha Chua has done such a great job to finetune Planner specially for GTD use (just check out her blog wink.gif ). Being able to use contextual tags (and more than one is allowed for each task/note) is a great plus.

By the way I have already reserved two good reads for the coming holiday:
http://dto.freeshell.org/notebook/OrgTutorial.html
http://members.optusnet.com.au/~charles57/GTD/orgmode.html

Of course it will be cool if you can tell me how you use Org Mode to help organize RL. smile.gif
Go to the top of the page
 
+Quote Post

3 Pages V   1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th October 2014 - 08:02 PM