http:^^www.cs.washington.edu^homes^voelker^ntemacs.html

来自「This data set contains WWW-pages collect」· HTML 代码 · 共 1,495 行 · 第 1/5 页

HTML
1,495
字号
For some users, when Emacs starts up it pops up the dialog forconnecting to their dialup service, or sometimes appears to hang for afew minutes and suddenly appear. <p>The reason for this is that Emacs now has networking support built in.When Emacs starts, the winsock DLL automatically gets loaded and triesto resolve the fully qualified domain name for your machine under thename "localhost".  If the system doesn't have this name mapped, itwill try to query a nameserver on the internet, which is typicallysome host within your ISP and subsequently prompts to connect to yourdialup service so that it can ask a name server for the domain name ofyour machine.  As you know, this is very unfortunate, and was notanticipated when the networking support was added. <p>This problem will be fixed when 19.32 comes out, but you can workaround the problem by giving the dialup support another method forfiguring out the domain name of your machine.  To do this, you need toedit the hosts file for your system (located in %windir%\hosts onWin95 and %windir%\system32\drivers\etc\hosts on NT) so that localhostbecomes an alias for your machine name.  If your system doesn't have ahosts file yet, you can easily create one by copying the sample hostsfile in the same directory, <tt>hosts.sam</tt>. <p>For example, if my machine were named<tt>banana-fish.cs.washington.edu</tt>, then I would edit the hostsfile from: <p><blockquote><pre>127.0.0.1       localhost</pre></blockquote>to <p><blockquote><pre>127.0.0.1       banana-fish.cs.washington.edu localhost</pre></blockquote>The <i>hostname</i> should be the value of invoking (system-name) inthe Emacs *scratch* buffer, i.e., the fully qualified domain name foryour system.  Note that you may also have to tell the system to lookin the hosts file as well as using DNS. <p>If this doesn't work for you, there are some other options (I have nottried these): <p><ul><li> Turn off the auto-dial option of PPP under the Control PanelDialup Networking icon.  However, this would mean that you would haveto manually connect to your dialup service whenever you wanted to usea network applicaton.  <p><li> Use a dummy winsock.dll.  Cristian Ionescu-Idbohrn&ltcii@kcs.se&gt has provided one called <!WA97><!WA97><!WA97><ahref="http://www.cs.washington.edu/homes/voelker/ntemacs/contrib/mozock.zip">mozock.dll</a>.  Download the zipfile, unzip it, move the mozock.dll file to the bin directory whereemacs.exe resides, and then rename the mozock.dll file to wsock32.dll.When Emacs loads, it will load this wsock32.dll instead of the systemone.  <p>For networking support, you can use the external <!WA98><!WA98><!WA98><ahref="http://www.cs.washington.edu/homes/voelker/ntemacs/contrib/nttcp.exe">nttcp.exe</a> program.  Downloadnttcp.exe and place it in your Emacs bin directory.  Also downloadthis version of <!WA99><!WA99><!WA99><a href="http://www.cs.washington.edu/homes/voelker/ntemacs/contrib/tcp.el">tcp.el</a>,byte-compile it, and place it in your lisp directory.  Then add thefollowing to your .emacs: <p><blockquote><pre>  (load-library "tcp")  (setq tcp-program-name "nttcp")</pre></blockquote><li> Edit the emacs.exe executable to remove the reference towsock32.dll in the import table.  Copy emacs.exe to a backup file, andthen start up Emacs (you might have to connect to your serviceprovider to do this), load emacs.exe into a buffer, search forwsock32.dll, turn on overwrite mode, and then change wsock32.dll toxsock32.dll by changing the 'w' to an 'x'.  Now save the modifiedemacs.exe.  Now, to get networking support again, follow thedirections in the previous item. <p><li> Delete all DNS nameservers listed in the TCP/IP propoerties ofthe network control panel dialog.  This is a rather drastic approach,since you will want DNS nameservers when running other applications(and even the networking ones inside of Emace). <p></ul><hr><h3><a name="popup">When I run Emacs, a console window pops up.  How do I make it go away?</h3>This is annoying, I know, and you shouldn't have to be dealing withthis.  But please bear with me for now.  If it isn't there already,prepend "start" to the last line of the .bat file (the line thatinvokes the emacs.exe executable).  Then create a shortcut icon to theemacs.bat file, and edit the <b>Properties</b> of the shortcut (rightclick on the icon).  On the <b>Program</b> tab, select <b>Run:</b> tobe <b>Minimized</b> and make sure the <b>Close on exit</b> checkbox ischecked.  Double click on the icon, and Emacs should start up cleanly.<p><hr><h3><a name="attributes">How do I change the size, position, font, andcolor attributes of Emacs?</h3>Emacs can run in two different interface modes: the Windows interface,which allows the flexible use and mixture of fonts and colors; and theconsole interface, which constrains Emacs to the limitations ofconsole windows.  The following two sections describe how to specifyand change the size, position, font, and color attributes of Emacs inboth interface modes.  <p><center><h3><a name="windows-attributes">Windows Interface</h3></center>With the Windows interface, you can change the size, position, font,and color attributes of Emacs using three different mechanisms: usingthe mouse with the user interface, by specifying them as command linearguments, or by invoking Emacs Lisp functions.  You will probablyfind it convenient to specify command line arguments in the<b>Properties</b> of the shortcut to the Emacs batch file, and toinvoke the lisp functions in your startup file.  For information onhow to propagate attributes to new frames, see <!WA100><!WA100><!WA100><ahref="#windows-frames">the section below on frames</a>. <p><li><a name="windows-size"><b>S<font size=-1>IZE</font></b><p><dl><dt><b>User Interface</b><dd>To resize an Emacs window, drag on a border with the mouse. <p><dt><b>Command Line</b><dd>To have Emacs start up with a particular size, invoke it with theX Windows <b>-geometry</b> command line argument.  For example, tostart Emacs with a window 40 lines by 80 columns in size, use thefollowing: <p><blockquote><tt>emacs -g 80x40</tt></blockquote>Note that the geometry command can be combined with the positioncommand, as described below. <p><dt><b>Emacs Lisp</b><dd>To change the size of an Emacs frame using elisp, you can use thetwo functions <tt>set-frame-width</tt> and <tt>set-frame-height</tt>.For example, to resize Emacs to display 40 lines by 80 columns, you coulduse: <p><blockquote><tt>(set-frame-height (selected-frame) 40)</tt><br><tt>(set-frame-width (selected-frame) 80)</tt></blockquote></dl><p><li><a name="windows-position"><b>P<font size=-1>OSITION</font></b> <p><dl><dt><b>User Interface</b><dd>To reposition a running Emacs, click on its title bar and drag thewindow. <p><dt><b>Command Line</b><dd>To start Emacs at a particular position, invoke it with the XWindows <b>-geometry</b> command line argument.  For example, to startEmacs at pixel offset (10, 30) from the top left corner: <p><blockquote><tt>emacs -g +10+30</tt></blockquote>To combine the size with position, first specify the size and thenthe position.  The two examples above can be combined as follows: <p><blockquote><tt>emacs -g 80x40+10+30</tt></blockquote>Note that you can also specify position offsets from any of thecorners of the screen.  See the <!WA101><!WA101><!WA101><ahref="http://www.x.org/consortium/R6doc/man/X/X">GEOMETRYSPECIFICATIONS section</a> of the X man page for complete details onthe geometry command. <p><dt><b>Emacs Lisp</b><dd>To reposition an Emacs frame using elisp, you can use the<tt>set-frame-position</tt> function.  For example, to move thecurrent frame to the offset (10, 30), you could use: <p><blockquote><tt>(set-frame-position (selected-frame) 10 30)</tt></blockquote></dl><p><li><a name="windows-font"><b>F<font size=-1>ONTS</font></b><p>Fonts in Emacs are named using the standard X Windows format forfonts.  These font names are the names that can be used as argumentson the command line or in lisp functions.  To see the font namecorresponding to a font chosen using the font selection dialog,execute the following elisp code in the *scratch* buffer: <p><blockquote><tt>(insert (prin1-to-string (win32-select-font)))</tt></blockquote>To see the complete list of fonts that Emacs has access to, executethe following elisp code in the *scratch* buffer: <p><blockquote><tt>(insert (prin1-to-string (x-list-fonts "*")))</tt></blockquote>For complete details on X Windows font names, see the <!WA102><!WA102><!WA102><ahref="http://www.x.org/consortium/R6doc/man/X/X">FONT NAMESsection</a> of the X man page. <p>The font support currently is a little rough around the edges.  Inparticular, italic fonts give Emacs some problems; see <!WA103><!WA103><!WA103><ahref="#windows-italics">below</a> for more info about using italicfonts.  Generally it performs as expected, but occasionally you mightget unexpected results (e.g., Emacs didn't quite use the font you toldit to use).  Work is underway to fix these problems, but for now Isuggest experimenting if you encounter problems.  <p>Also, X Windows has the luxury of a set of font aliases (such as<b>fixed</b>) that are convenient names for referring to specificfonts.  Work is underway to provide an equivalent alias mechanismunder Win32 so that naming fonts does not have to be as cumbersome asit currently is. <p><dl><dt><b>User Interface</b><dd>To change the default font that Emacs uses, shift click the leftmouse button (i.e., [shift-mouse-1]) and a font selection dialog willpop up.  Select the font that you would like to use, and click on the<b>OK</b> button to close the dialog and use the selected font.  (Notethat the dialog only displays fixed-pitch and screen fonts since Emacscannot handle variable-pitched fonts.) <p><dt><b>Command Line</b><dd>To start Emacs with a particular font, use the the <b>-font</b> XWindows command line option.  For example, to start Emacs with the<b>Courier</b> font of size <b>10</b> and font style <b>Regular</b>,invoke Emacs using:<blockquote><tt>emacs -font "-*-Courier-normal-r-*-*-13-97-*-*-c-*-*-ansi-"</tt></blockquote><dt><b>Emacs Lisp</b><dd>To change the default font of Emacs using elisp, use the<tt>set-default-font</tt> function: <p><blockquote><pre>(set-default-font  "-*-Courier-normal-r-*-*-13-97-*-*-c-*-*-ansi-")</pre></blockquote>To set the font of a particular face, use the <tt>set-face-font</tt>function. <p><dt><b>Registry</b><dd>To change the default font of Emacs frames using registry entries,create a value in the key <tt>HKEY_CURRENT_USER\Software\GNU\Emacs</tt>: <p><blockquote><b>Value Name:</b> <tt>Emacs.Font</tt> <br><b>Value Type:</b> <tt>REG_SZ</tt> <br><b>String:</b> <tt>-*-Courier-normal-r-*-*-13-97-*-*-c-*-*-ansi-</tt></blockquote>Since the font strings are rather cumbersome, I would suggest cuttingthe font string into the kill-ring (which will place it in theclipboard, too) and pasting it (Ctrl-V) into the regedit dialog.(Note that you shouldn't place quotes around the font string in theregistry.) <p>If you have Emacs frames with specific names, you can also specify afont for that frame.  For the <b>Value Name</b> of the entry, use thename of the frame instead of <tt>Emacs</tt> (e.g., <tt>RMAIL.Font</tt>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?