*************************************************************************** Meadow 2.00 Basic and Brief Manual. (Multilingual enhancement to gnu Emacs with ADvantages Over Windows) Written by Miyashita Hisashi Edited by Takeyori Hara Revised by Miyashita Hisashi for 1.10 Revised by MIYOSHI Masanori for 1.99 and 2.00 *************************************************************************** 1..... Introduction Since this project started, we have been working for multilingual enhancement to GNU Emacs that runs on Windows9X/NT/2000/XP, and the result of the work is Meadow. At present, however, GNU Emacs and Mule have been integrated, and an implementation for Windows of GNU Emacs, which is called NTEmacs, also can handle multilingual features, which is partly imported from Meadow's result. From historical affairs, Meadow and NTEmacs make another decision on Windows implementation of GNU Emacs from a certain stage. Therefore, these two implementaion is different from each other especially on Windows interfaces, and Meadow have been added on various features to original GNU Emacs. This Meadow version is based on GNU Emacs 21.1 currently. We plan to extend many features to Meadow. Thus, Meadow may change from original GNU Emacs, maybe or not maybe. :-) 2..... Installation Installation is very easy. Please read `INSTALL.Meadow.' 3..... Configuration Fundamentally, the configuration of Meadow is identical to original Emacs. This chapter explains Meadow specific configurations. As to other configurations, please refer the original documentations of Emacs. ------------------------------------------------------ 3.1..General features. 3.1.1.... w32-system-coding-system. To this variable, you must set the coding system that is sent to Windows operating system. It is used for encoding menu strings, fontname strings, title bar strings, and so on. 3.1.2.... (Meadow-version) You can retrieve the version strings of the Meadow. 3.1.3.... (w32-set-modifier-key KEY MODIFIER) You can set modifier keys by this function. Please read documentation strings. 3.1.4.... Console Mode and Terminal Mode You can use Win32 console, by adding option `-nw' and you must set TERM environment variable to `CMD'. e.g set TERM=CMD Meadow -nw You can't use IME on console mode on Windows95. Or you can use terminal mode with adequate telnet service. You must prepare `termcap' file. For example when you put termcap c:\, set TERMCAP=c:\termcap set TERM=vt100 (Set your terminal ID.) Meadow -nw You can't use IME on terminal mode. 3.1.5.... Mouse features. Meadow is aware of 3button mouse including IntelliMouse. Buttons can be remapped by these variables. w32-lbutton-to-emacs-button w32-mbutton-to-emacs-button w32-rbutton-to-emacs-button These indicates button number that is sent to Meadow when left, middle, or right buttons are pressed or depressed respectively. When IntelliMouse wheel is rotated, Meadow receives an event as shown here. (mouse-wheel1 ([WINDOW | FRAME] POSITION (X . Y) TIME DELTA)) [WINDOW | FRAME] shows a window or frame where the mouse cursor is. POSITION shows which area the mouse cursor is in. (X . Y) shows coordinates of the mouse cursor. DELTA shows a rotation angle of wheel. You can pass DELTA to this function to obtain the amount of scroll lines. -- (w32-get-mouse-wheel-scroll-lines DELTA) -- The default setting of wheel operations are scrolling buffer contents when a mouse cursor is at a buffer window, or moving mode line when a mouse cursor is at a mode line. Mouse cursor can be out of your sight when not used. This looks like 'unclutter' feature of X. There are two ways to hide mouse cursor, by typing and by time. note: hide by timeout feature works correctly only on Windows98, 2k or later (maybe). -- ;; Mouse cursor will hide on key typing. (setq w32-hide-mouse-on-key t) ;; Mouse cursor will hide after 5 seconds rest. (setq w32-hide-mouse-timeout 5000) -- 3.1.6.... Cursor type * CAUTION: This feature has not been implemented yet. Meadow supports following cursor types: o..... bar ... slim vertical bar o..... box ... solid black box o..... caret ... blinking solid black box (solid caret) o..... checkered-caret ... blinking checkered pattern box (gray caret) o..... hairline-caret ... blinking vertical line (line caret) Default type is "caret". You can select cursor type by specifying cursor-type to default-frame-alist in your .emacs, like this: -- (setq default-frame-alist (cons '(cursor-type . box) default-frame-alist)) -- In other words, you can use set-cursor-type() funcion, like this: -- (set-cursor-type 'hairline-caret) -- Meadow can change height of caret cursor by changing frame parameter 'cursor-height'. The range of the parameter is 0 - 4. 1 to 4 means the height of cursor is set to n quarters of font height. 0 means active window border width you set in 'display property' control panel. Default height of cursor is 4 (full height). You can change the height, like this: *This feature now is available only for 'caret cursors', say caret, checkered-caret, hairline-caret. -- (setq default-frame-alist (cons '(cursor-height . 2) ; half height default-frame-alist)) -- In other words, you can use set-cursor-height() funcion, like this: -- (set-cursor-height 4) -- 3.1.7.... MCI feature Meadow provides an API for controling multimedia devices with Windows MCI (Media Control Interface). Using this API, you can play a sound data and also music in a CD. If there is any further information you require, please refer to the MCI specification. --- (mw32-mci-send-string COMMAND) --- This function sends a command string to an MCI device with mciSendString(). Returns a string that holds return information (e.g. ID of a device that are opened) if successful or an error code in number. The following is usage of this functin. (mw32-mci-send-string "open c:/WINDOWS/Media/tada.wav alias tada") => "1" ; device ID (mw32-mci-send-string "play tada") => "" (mw32-mci-send-string "close tada") => "" You are able to catch a MM_MCINOTIFY event if you specify `notify' in a command string. (mw32-mci-send-string "open c:/WINDOWS/Media/tada.wav alias tada") => "1" ; device ID (progn (mw32-mci-send-string "play tada notify") (read-event)) => (mw32-mci mw32-mci-notify-successful 1 nil) (mw32-mci-send-string "close tada") => "" --- (mw32-mci-get-error-string ERROR-CODE) --- This function retrieves a string that describes the specified MCI error code with mciGetErrorString(). --- (mw32-mci-add-notify-callback DEVICE-ID CALLBACK-FUNC &optional CALLBACK-ARG) --- This function adds a callback function which should be executed when a MM_MCINOTIFY event rises. For further information, please refer to mw32-mci-notify-func(). ------------------------------------------------------ 3.2..font request setting. A font request will be set automatically. You can use `default' by default. If you want to make another font request, you can use the functions in this section. 3.2.1... logfont T.B.W. 3.2.2... font specifier T.B.W. Meadow's fonts have properties. Properties are used to store logfonts. `Logfont' is an abbereviation of `logical font' that is mapped to a real font by Meadow. Currently, we can use BDF(Bitmap Distributed Format), Windows fonts(both bitmap and TrueType), and others); the following types are allowd. 1.... Windows logfont. Windows logfonts are specified by a list like follows, -- (w32-logfont ) -- NAME.......... the font name within 31bytes. WIDTH......... width of the font(number) HEIGHT........ height of the font(number) WEIGHT........ weight of the font(number) Normal weight is 400. Bold weight is 700. ITALIC-P...... Non-nil specifies an italic font. STRIKEOUT-P... Non-nil specifies a strikeout font. CHARSET....... Specifies a charset number of the font. PITCH&FAMILY.. Specifies whether a font is fixed or not, and a font family. This list is based on Windows logfont. When you want to know your desired logfont, please use --- (w32-query-get-logfont) --- This function pop up a font selection dialog box, and return the logfont of the selected logfont. 2.... BDF font. Meadow can use BDF fonts. BDF fonts' logfont are specified by a list as shown here. -- (bdf-font "FILENAME") -- FILENAME must be a valid filename of a BDF font. Properties are discriminated by a number ranged 0-15. And each number means as followd. 0...... Normal font 1...... Bold font 2...... Italic font 3...... Bold-Italic font 4-7.... Reserved for extension 8...... Normal font for printings 9...... Bold font for printings 10..... Italic font for printings 11..... Bold-Italic font for printings 12-15. Reserved for extension For example, if you set a `courier' windows logfont to the property 2 of a font, Meadow will display a `courier' font when a emacs lisp library would display this font as a `italic'. When the desired property has not been set yet, the most significant non-zero bit of the number is cleared, and iterate to search a set property. When Meadow can't find any logfonts even in property 0, Meadow use the default logfont as follows. Property 0 (w32-logfont "FixedSys" 400 0 nil nil 128 0 0 1) Property 1 (w32-logfont "FixedSys" 700 0 nil nil 128 0 0 1) Property 2 (w32-logfont "FixedSys" 400 0 t nil 128 0 0 1) Property 3 (w32-logfont "FixedSys" 700 0 t nil 128 0 0 1) 3.2.1......high level APIs. 3.2.1.1....fontset requests ---- (create-fontset-from-request NAME REQUIRED RECOMMENDED) NAME is name of the font request you want to create. REQUIRED and RECOMMENDED are a-lists. REQUIRED means that all fonts that are selected MUST satisfy these conditions. RECOMMENDED means that fonts that satisfy these condition are given priority over creating a fontset. New fonts are created with name of "NAME-CHARSET" for each available charset, and configured to property 0 automatically. Following keys are awared in these a-lists. (Others are ignored) o..... family (STRING) family name of the font (Regular expressions are not allowed.) o..... width (NUMBER) width of the font(pixel) o..... height (NUMBER) height of the font(pixel) o..... weight (NUMBER) weight of the font. It is normail about 400. It is bold about 700. o..... fixed (nil or t) nil means that the font is not fixed-pitch. o..... italic (nil or t) nil means that the font is not italic. o..... spacing (NUMBER) horizontal spacing between characters (pixel). e.g. (create-fontset-from-request "myfontset" '((width . 8) (height . 12) (fixed . t) (italic . nil)) '((family . "Courier") (family . "MS Gothic"))) ---- (change-fontset-from-request NAME REQUIRED RECOMMENDED PROPERTY) ---- Change configurations of fonts in the fontset of NAME. You can specify PROPERTY that must be a number of property. This function set this property from your request. REQUIRED and RECOMMENDED are the same meanings in (create-fontset-from-request) 3.2.2......low level APIs. Low level APIs handle logfonts directly. 3.2.2.1....(w32-add-font NAME ALIST) This function regist font. Then Meadow can use this font by NAME. NAME must be string. ALIST is used for description of the font to use. The structure of ALIST is the following. ((spec ( strict []) ;; (a) or ( function []) ;; (b) ...)) You can indicate the mapping between font request and logfont strictly or with a user-defined function. The specification of this structure is the following. (a)..... strict is a property list which describes a font specification. `strict' is a key that means a strict mapping. is a Lisp expression for logfont. is an association list which indicates optional parameters, which can be omitted. Meadow compares and the attributes of a face, and the select the most suitable logfont for the face. When a property value is any, any face attribute suits the specification. When nil, only unspecified suits it. When unspecified, none of the values suits it. Valid keys for are: o..... :char-spec (NUMBER, char-table) Specifies a charset number of the font with char or char-table. Generic char is also acceptable. The default value is ascii. o..... :width (NUMBER, SYMBOL) Specifies the width of the font. Either a number(in point value) or a symbol (any, normal, condensed, semi-expanded, expanded, extra-condensed, extra-expanded, ultra-condensed, ultra-expanded) is acceptable. The default value is normal. o..... :height (NUMBER, SYMBOL) Specifies the height of the font. Either a number (in point value) or a symbol (any) is acceptable. The default value is nil. o..... :family (STRING, SYMBOL) Specifies the family name of the font. Either a string in a regular expression or a symbol (any) is acceptable. The default value is "*". o..... :weight (SYMBOL) Specifies the weight of the font. a symbol (any, normal, bold, semi-bold, extra-bold, light, semi-light, ultra-light, extra-light) is acceptable. The default value is normal. o..... :slant (SYMBOL) Specifies the slant of the font. a symbol (any, normal, italic, reverse-italic, oblique, reverse-oblique) is acceptable. The default value is normal. The specification of is describe above in <3.2>. Valid keys for are: o..... encoding (SYMBOL) Specifies the encoding of the font. a symbol (nil, 1-byte-set-msb, 2-byte-set-msb, shift_jis, unicode, ) is acceptable. is a sumbol that is registered with w32-regist-font-encoder(). The default value is nil. o..... relative-compose (NUMBER) o..... default-ascent (NUMBER) These set metrics of the font. If these are omitted, Meadow uses 0. o..... spacing (NUMBER) Specifies the spacing between the characters in PIXEL. (b)..... function is a property list which describes a font specification. `function' is a key that means a mapping with a function. is a Lisp function with which a suitable logfont is selected. is an association list which indicates optional parameters, which can be omitted. is same as that of `strict'. The structure of this is the following. ---- (lambda (char face-attrs frame)) ---- This function must return either nil, or ( ). Nil means that no suitable fonts are found. Face-attrs is a property list whose keys are the followings. o..... :width o..... :height o..... :family o..... :weight o..... :slant 3.2.2.2....(w32-change-font-attribute NAME ALIST) * CAUTION: This feature has not been implemented yet. You can reconfigure the font settings. NAME is a font name that has been added. ALIST has the same meanings in (w32-add-font) > is same as that of `strict'. 3.2.2.3....(w32-change-font-logfont NAME LOGFONT PROPERTY) * CAUTION: This feature has not been implemented yet. Set a LOGFONT to PROPERTY of font(NAME). LOGFONT must be a valid logfont. 3.2.2.4....(w32-get-font-logfont NAME PROPERTY) * CAUTION: This feature has not been implemented yet. 3.2.2.5....(w32-get-font-info NAME PROPERTY) 3.2.2.6....(w32-get-logfont-info LOGFONT &optional FRAME) 3.2.2.7....(w32-font-list) 3.2.2.8....(w32-enum-logfont &optional FAMILY DEVICE) 3.2.2.9....(w32-query-get-logfont) 3.2.2.10...(w32-check-logfont LOGFONT) Please read documentation strings. :-) 3.2.2.11...w32-default-font-alist * CAUTION: This feature has not been implemented yet. Please read documentation strings, and (w32-add-font). ------------------------------------------------------ 3.3..Argument Editing Meadow can invoke external processes. But arguments of the external process is very different from UNIX style. In UNIX style, arguments have the style like this. argv[0] = /usr/bin/ls argv[1] = -l argv[2] = "/home/himi/foo" But on Windows, arguments must be a single string. To take matters worse, how to connect these strings depend on each program. o...Normal Style. Only connect them. They are separated by " "(SPACE). In the above example, the result is `/usr/bin/ls -l "home/himi/foo"'. o...Microsoft Visual C++ Style. Microsoft Visual C++ connects these arguments with quoting by `"'. And each arguments are separated by " "(SPACE). If a argument contains `"', quote it by `\'(Backslash). If its `"' is located after `\', quote the `\' by `\', too. o...Cygnus system style. Cygnus system connects these arguments with quoting by `"'. And each arguments are separated by " "(SPACE). If a argument contains `"', convert it to `""'. Therefore Meadow have the facility of Argument Editing. You can edit arguments arbitrary by this facility. Argument Editing selects the method of editing from the program name. It is specified by regular expressions. Argument editing system compares these settings to the program name that is about to be invoked by Meadow. If it is matched by a setting, Meadow call the function that is associated by the setting to edit arguments. You can configure Argument Editing by the following functions and variables. --------------- (define-process-argument-editing PROCESS FUNCTION &optional METHOD) Set argument editing. PROCESS is a regular expressions to specify the process whose arguments are edited by FUNCTION. Argument editing system compares path of the process that is complete and separated by `/' with PROCESS. When PROCESS matches the path of the process, Argument editing system call FUNCTION to edit argument. FUNCTION is called with a list of arguments that are supposed to be passed to the process. FUNCTION must return one of the following manners. o....a string of argument. If FUNCTION returns string, the process is created with this string as an argument. o....(PROGRAM . ARGUMENT) Both of them must be strings. If FUNCTION returns this type, argument editing system create a process of PROGRAM with ARGUMENT as an argument. METHOD specifies how this setting is registered. The followings are allowed. o.... 'first Register this setting at first. Thus this setting have the highest precedence. o.... 'last Register this setting at last. Thus this setting have the lowest precedence. o.... 'append Append this setting. If PROCESS has been registerd already, nothing happens. If not so, register this setting at first. o.... 'replace Replace this setting. If PROCESS has been registerd already, replace the setting. If not so, nothing happens. o.... nil If PROCESS has been registerd already, replace the setting. If not so, register this setting at first. --------------- (remove-process-argument-editing PROCESS) (find-process-argument-editing-funciton PROCESS) default-process-argument-editing-function (variable) Please read documentation strings. --------------- (general-process-argument-editing-function ARGUMENT QUOTING ARGV0ISP &optional EP H2SP QP S2ISP) This is a general function to edit argument. ARGUMENT must be a list of arguments. QUOTING specifies how to quote arguments. The followings are allowed. o.... nil Only connect them. They are separated by " "(SPACE). o.... 'msvc Quotes arguments in the style of Microsoft Visual C++. o.... 'cygnus Quotes arguments in the style of Cygnus libraries. If ARGV0ISP is non-nil, convert a separator of argv[0] to `\\'. After connecting arguments in the sytle of QUOTING into a single string, the string is converted according to EP, H2SP, QP, and S2IPS. If H2SP is non-nil, '-' in a string will be converted to '/'. If S2ISP is non-nil, '/' in a string will be converted to '\\'. If EP is non-nil, regards '\\' as an escape character, thus, any character followings to '\\' is NEVER converted. If QP is non-nil, regard a part enclosed with ' or " as a quoted-string, thus it is NOT converted. ------------------------------------------------------ 3.4..Input Method Editor(on Windows) Of course you can use IME on Windows. Meadow has IME automatic control system, you can use it by this setting. ----- (mw32-ime-initialize) ----- Please add this line to the head of your .emacs. And then, please select the `MW32-IME' input method by this setting. ----- (setq default-input-method "MW32-IME") ----- (mw32-ime-initialize) may be able to set keyboard-coding-system, it depends on your system or IME. If keyboard-coding-system is not set by (mw32-ime-initialize), please set keyboard-coding-system manually by the following configuration. (set-keyboard-coding-system ') For example, ----- (set-keyboard-coding-system 'sjis) ----- You can set IME composition font by specifying `ime-font' key in the frame-alist. But this MUST BE a Windows font. e.g. (setq default-frame-alist (cons '(ime-font . "IME font") default-frame-alist)) ------------------------------------------------------ 3.5..Other functions, variables ------------------------------------------------------ 4...Annotation ------------------------------------------------------------ The following packages are added in Meadow package. o... LEIM (Library for Emacs Input Method) is in leim directory of the binary distribution and in \leim of the source distribution. If you don't need it, remove leim directory. Even in source distribution, you can build Meadow without LEIM. o... Nana-gnus is in site-lisp\gnus of only the binary distribution. o... APEL is in site-lisp\apel and \site-lisp of only the binary distribution. o... FLIM is in site-lisp\flim of only the binary distribution. o... SEMI is in site-lisp\semi of only the binary distribution. ------------------------------------------------------------ ------------------------------------------------------------ Meadow 1.14 includes UTF-8 and UTF-16 autodetection features. You can have such features with Mule-UCS 0.54 or later. Mule-UCS can be obtained from ftp server ftp://ftp.m17n.org/pub/mule/Mule-UCS or CVS pserver(Empty password). FYI, following commands are an example for checkout. [login] cvs -d:pserver:anonymous@park.meadowy.org:/cvsroot login [Press Enter as password] [Checkout] cvs -d:pserver:anonymous@park.meadowy.org:/cvsroot co mule-ucs ------------------------------------------------------------ ------------------------------------------------------------ Meadow does NOT retrieve FQDN in its startup. Therefore, (system-name) would not give the FQDN in the case of default. But you can get the FQDN of your host by (w32-get-fqdn) function. For example, you can set the following setttings in your start up file (.emacs, site-start.el .etc), and you could get the FQDN by (system-name) --------------- (setq system-name (w32-get-fqdn)) --------------- This setting maybe make your system popup the dialup network dialog. You want to cease this dialog, plese check the following. o....Set the correct domain name and host name in the Control Panel. You should set the domain name and host name by the Control Panel. Pop up the Control Panel, and then Select 'Network', click 'Protocol' tab, select 'TCP/IP Protocol' by double click, and then click 'DNS' tab. You will see two edit controls---'Host name' and 'Domain'. For example, we assume your full qualified domain name(FQDN) is `machine1.anonymous-u.ac.jp'. You must set `machine1' to the `Host name' entry, and `anonymous-u.ac.jp' to the `Domain' entry. Have you resolved this problem? If you can't, please check the next. o....Set the `hosts' file. Windows socket system also resolve domain names by hosts file. Therefore, you can resolve your host by setting this file. First, you should copy `hosts.sam' file in the Windows directory. Then please change the `localhost' entry into what is like this. ----------------------- 127.0.0.1 localhost ----------------------- ------------------------------------------------------------ 5..... Informations of mailing lists. There are two mailing lists for discussing about Meadow. But this service is temporal, and in the future, we will change. meadow-users-en@meadowy.org (English) If you want to join, please send empty mail to . If you want to unsubscribe, please send empty mail to . A confirmative mail is sent to you automatically. meadow-users-jp@meadowy.org (Japanese) If you want to join, please send empty mail to . If you want to unsubscribe, please send empty mail to . A confirmative mail is sent to you automatically. Notice!!! All that join in these ML are regarded as accepting the terms below. o All data in this ML, like all discussions and statement, are used for any documents about Meadow(e.g. FAQ, manuals .etc), which is distributed in GPL(GNU General Public License). If you do not like part of your message to be distributed as GPL, please declare it at the top of the message. ------------------------------------------------------------ 6..... Acknoledgement I am very grateful to many people for contributing to Meadow. First of all, thanks to all members of meadow-develop ML, who supported development of Meadow and discuss how to improve Meadow. Tomura Satoru(Mule Project Leader) gave me kind encouragement and give me many chances to develop free softwares. Handa Kenich(Mule Project) taught me about details and futures of mule features, and give me many hints to implement Meadow. Hayashi Yoshiki edits FAQ-Meadow and cooperate to make this document, and he gave good bug reports and requests. Kitaguchi Shuichi, who is an author of fiber and holds Mew-Win32 project, made modified version of fiber from my request and give us good comments. Suzuki Keiichi is a pretty maintainer on Nana-gnus, who contributed sample configurations and prepared Nana-gnus included in Meadow1.10. Goto Shun-ichi reported many bugs, sent patches to ML, and give supports APOP of movemail. He modified movemail from my request. Ohba Koichiro maintains the movemail included in Meadow, and sent comments on IMM and behavior of Meadow. Koseki Yoshinori contributed good documents on WWW(http://www.netlaputa.ne.jp/~kose), and supported many Meadow users. Horiguchi Kyotaro reported many bugs, and made many patches. Some of them is very crucial, and much helped our works for development. Tsubakimoto Hiroya, who ported telnet included in Meadow, sent some codes on BDF font rendering, and send patches to fix bugs. Mori Keisuke requested some features on Meadow, and give me some patches. Ichikawa(Tim) Tatsuya, who is a maintainer of T-gnus, also gave requests and report mainly on Bitmap-Mule(mmm...). Morioka Tomohiko(Mule Project), who is a main author of APEL, FLIM, and SEMI, gave me many useful comments personally, and held much discussion on many subjects for me. # (some of them are stern to me. ... :-) Finally, I'd like to present my thanks to all people who supported me! ------------------------------------------------------------ A..... License Fundamentally, Meadow follows the original license of GNU Emacs, which is GPL (gnu General Public License) Version 2, or (at your option) any later version. You should have received a copy of the GNU General Public License along with Meadow(GNU Emacs); see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. But `ftp.exe' included in the binary distribution of Meadow is an exception. This program is allowed to include in the package by Chris Szurgot. If you want to know its correct license, please contact him. (Original source is distributed in the BSD style aka "AS-IS".) And `telnet.exe' included in the binary distribution of Meadow is another exception. This program is ported by Tsubakimoto Hiroya. This program is allowed to include by Tsubakimoto Hiroya. Its original is also distributed in the BSD style. B.....File name. Packages of Meadow are named the following file names. Meadow-${VERSION}-src.tar.gz Source package Meadow-${VERSION}-i386-base.tar.gz Intel x86 Binary (base system) Meadow-${VERSION}-i386-els.tar.gz Intel x86 Binary (.el files) Meadow-${VERSION}-i386-leim.tar.gz Intel x86 Binary (leim files) ------------------------------------------------------------