XEmacsNull Blog

Bi-Day XEmacs Tip Blog

Thursday, June 30, 2005

Topic: Common Keys

Topic: When you are using basic XEmacs without a GUI. What are the basic useful keys, for common actions?

Forward word: Alt-f
Backwards word: Alt-b
Forward screen: Ctrl-v
Backwards screen: Meta-v

Search forward: Ctrl-s
Search backwards Ctrl-r

End of line: End key or Ctrl-e
Head of line: Home key or Ctrl-a

  • Escape Sequences. What do I mean? Well, under odd conditions. You might seem to be locked from leaving a command sequence. Here are the key presses, to get out of it.

One: ESC
Two: Ctrl-g
Three: Ctrl-g Three times!

Head of file: Meta-<
End of file: Meta->

  • The reverse of vim.

Kill text: (Select region before killing text) Ctrl-w
Yank text: Ctrl-y (Then yank it back.)

Platform: Linux
Level: Basic
GlR

Wednesday, June 22, 2005

Tip: Changing Cases

Question: How do you change the case of letters, without re-typing?

Answer: Like most text editors, XEmacs has an in-built command for it.
  • Simply select the text with your cursor. Then, Ctrl-x, Ctrl-u; for Upper.
  • Or Ctrl-x, Ctrl-l; for Lower.
  • If you don't have a GUI available, to mouse dragging. Simply use the keyboard, move to the first end of the region, hold the shift key, and move to the other key. This selects a region of text, as well.
Platform: Linux
Level: Basic
GlR

Monday, June 20, 2005

Tip: Goto Line

Question: How to goto a specified line number?

Answer: This is in the Menus, too. However, the direct way is to use the shortcut key.

Meta-g, translated: Alt-g, 100,
  • Zap, you are on line 100.
Platform: Linux
Level: Basic
GlR

Saturday, June 18, 2005

Topic: Configuration File

Question: Where is the config file? Why should I care? How do you read it?

Answer 1: Linux systems at a sub-directory, under your home directory. Labeled .xemacs and a file inside it called: custom.el

(custom-set-variables
- '(paren-mode (quote paren) nil (paren))
- '(column-number-mode t)
- '(line-number-mode t)
- '(blink-cursor-mode t nil (blink-cursor)))
(custom-set-faces
- '(default ((t (:size "12pt" :family "Courier"))) t))

Answer 2: So, you can customize XEmacs to your liking.
Answer 3: This is a little more difficult. If you've studied LISP or Scheme? It looks obvious. Otherwise, you have to learn a little about Scheme and variable declarations.

However, except for the harder to get at customizations. You can "Save Options" inside XEmacs, itself. Then, it will update this config file, for you. (Options menu, "save options to init file".)

Platform: Linux
Level: Basic
GlR

Tuesday, June 14, 2005

Topic: Buffer 2

Buffers. I decided the last post still wasn't clear enough. Then, decided to check out XEmacs web site and GNU's documentation on it.

You can find the extensive manuals, from easy to advanced, here.
XEmacs.Org Docs

The term "buffer" is really sort of over-used. It really just means.
  1. An area in a window.
  2. An active editing view to a file.
  3. Plus, there are buffers for temporary regions, system areas (or information on XEmacs for XEmacs) (Such as, the file list loaded.)
  4. Plus, several of the File Menu commands really pertain to buffers. (Again a file being handled inside a buffer.)
* This must be the base definition? When using XEmacs a file is simply handled inside a buffer, for whatever purposes we might need.

Platform: Linux
GlR

Friday, June 10, 2005

Topic: Buffers

Question: XEmacs has buffers. What is a buffer? Why not call it a file or document or text?

(1) It is just the way (at first) E-macs was built.
(2) Using the term buffer is natural. Natural for allowing all kinds of other text sources. Enter the editor. (Help files, web browsing, and managing multiple windows.)

(3) Just get used to: handling the image of a file (it's text), is a buffer.
(4) Creating temporary buffers allows the editor and you, to do more things. (Sorry, this is another deeper concept. I'll have to explain it more, later.)

  • So, why introduce buffers, now? Because, soon, we'll delve into understanding. How does XEmacs work with files and the text windows.
Platform: Linux
GlR

Wednesday, June 08, 2005

Tip: Insert File

Often you'll have a file already open and simply need to insert the contents of another file, into it.

Question: How to insert a file?

Answer 1: The keyboard sequence is Ctrl-X, i. Then, type the name of your file. If you don't know it. (Linux) Filename completion does work, as well.
Answer 2: Menu, File, Insert, then pick select it visually. However, I've found using the menus for accessing filenames is awkward.

Usually, I'll locate it, then type it from the screen. (Note: A post to make clearer.)

Platform: Linux
Level: Basic
GlR

Monday, June 06, 2005

Editors: Motivation

Unless, you are a computer uber-geek, and then you probably already have your favorite text editor. Everyone else is probably saying. What? Use a text editor? I'm using MS Word already. It edits text, too. What else do I need?

Short Answer: There is a difference between pure text and GUI previewers. Which presume to the user, it is text. However, it really isn't. Due to styles, fonts, paragraph formatting, column layout, and such.

So, why is learning XEmacs useful? Because, they are true "raw file" editors. There isn't binary data around anything. You text is left in human readable form. Nothing is locked from you.

When you need to search a 100 documents. (1) No need to rely on your Word Processor vendor's limited tools. Or start their application. (2) If you aren't on your own system? You can still edit, search, revise, and manage your documents. (3) The Unix world is network friendly. So, running, from one machine, to another, off of another; isn't verbotten. (4) At times, you need to "handle text documents" as a data source. What if, you're boss says. I need a run down or "how many" emails about file sharing, going through our network.

Otherwise, my primary motivation is "learning new skills." Plus, XEmacs really has many powerful tools and capabilities. Which in the months to come. We will be tapping into.

Platform: Linux
GlR

Saturday, June 04, 2005

Advice: The Keyboard

XEmacs has this one odd thing. I'm sure people who love Emacs-editors consider it, a strength. Personally, I'm rather un-decided. I'd rather have succinct, then compact keyboard short-cut combinations, for any application. No doubt, Mr. Richard Stallman must of been behind these ideas.

So, enough already, what is it? Why the meta-key, the shift-key, and the control-key short-cuts.

Now, sure, a control-x makes sense. It is just a symbolic convention. Next, using shift-x is the same. (Just waxxing here. Don't get hitting blank-x, to see what happens.) But, meta-x? What is that?

Well, I presume the confusion came about because of old keyboards. Back before the days of IBM PCs, and everyone having 101 or more keyboards. There were terminals. Terminals actually came from teletypes (tty). A throwback to an older era, of the telegraph and morse code.

Anyhow, these old terminals quite often had very unusual keyboards. Usually quite small keyboards and the "besides control or shift" second function keys varied. Varied from being not present or present as odd combinations / sequences, or labeled something different.

Thus, I presume the reasoning for meta-key. Meta-key to indicate an additional shift-like secondary effect key. When used in conjunction with the normal (direct) keys of the keyboard. Allows additional unique signals to be sent to the application.

Summary: Suffice it to say, this is a deep issue. If you are really interested in such mundane matters. Most persons reading this, it is simply the ESC key. However, how you use it on a Linux system is different, than simply holding the shift key at the same time, to indicate shift-x.

Instead, you press and release ESC first, then the key being modified. For instance, the "transpose words" command is defined by Meta-t. Place the cursor between two words, hit and release ESC, then hit "t," and there you go. (To re-switch, either leave the file and don't save changes. Or Meta-b, Ctrl-b, Meta-t.)

Platform: Linux
GlR

Thursday, June 02, 2005

Advice: Common Actions

Theme: If I had to compare every text editor? What "number one" features, do I need to run it well enough, for basic use?

First, there are the primitives.
  • Open File, Save File, Save As File, Close File, & Exit
  • Read new file, Insert file
  • How to print, Options you can change for printing, and such.
  • Help System: Use of use, Can you find simple answers with little effort, Tutorial present
Then, there are the intermediate (utilitarian) uses.
  • Search for word, Replace word, Regex search and replace
  • Save Bookmark (location), Jump to bookmark
  • Formatting Commands, if it makes sense. (Bold a word, underline, Capitalize letters, centering
  • Clipboard Actions: Copy, Paste, Cut, Delete, Create new (temporary) file / buffer
  • Pure Text options: line width, line re-formatting, indenting, outdenting
Lastly, the advanced features.
  • Save different default settings into the Configuration file
  • Changing start-up appearances: font size, default font, window location?, etc.
  • Spell checking, abbreviation support, tie-in to other applications

Now, that I've gleaned several of the most primitive issues of XEmacs. It is time to start getting deeper. Perhaps, I'll just start tearing into each of these bullet items, one by one. Then, things will be clearer for jumping into deeper issues.

Platform: Linux
GlR