comparison man/msdog.texi @ 71468:d0f19f61af38

(ls in Lisp): New section.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 24 Jun 2006 15:08:44 +0000
parents 9fb34710a5dd
children 5785f48e4265
comparison
equal deleted inserted replaced
71467:81e6860f0fa5 71468:d0f19f61af38
27 here. 27 here.
28 28
29 @menu 29 @menu
30 * Text and Binary:: Text files use CRLF to terminate lines. 30 * Text and Binary:: Text files use CRLF to terminate lines.
31 * Windows Files:: File-name conventions on Windows. 31 * Windows Files:: File-name conventions on Windows.
32 * ls in Lisp:: Emulation of @code{ls} for Dired.
32 * Windows HOME:: Where Emacs looks for your @file{.emacs}. 33 * Windows HOME:: Where Emacs looks for your @file{.emacs}.
33 * Windows Processes:: Running subprocesses on Windows. 34 * Windows Processes:: Running subprocesses on Windows.
34 * Windows Printing:: How to specify the printer on MS-Windows. 35 * Windows Printing:: How to specify the printer on MS-Windows.
35 * Windows System Menu:: Controlling what the ALT key does. 36 * Windows System Menu:: Controlling what the ALT key does.
36 @ifnottex 37 @ifnottex
165 166
166 @cindex file-name completion, on MS-Windows 167 @cindex file-name completion, on MS-Windows
167 On MS-DOS/MS-Windows, file names are case-insensitive, so Emacs by 168 On MS-DOS/MS-Windows, file names are case-insensitive, so Emacs by
168 default ignores letter-case in file names during completion. 169 default ignores letter-case in file names during completion.
169 170
171 @node ls in Lisp
172 @section Emulation of @code{ls} on MS-Windows
173 @cindex Dired, and MS-Windows/MS-DOS
174 @cindex @code{ls} emulation
175
176 Dired normally uses the external program @code{ls} (or its close
177 work-alike) to produce the directory listing displayed in Dired
178 buffers (@pxref{Dired}). However, MS-Windows and MS-DOS systems don't
179 come with such a program, although several ports of @sc{gnu} @code{ls}
180 are available. Therefore, Emacs on those systems @emph{emulates}
181 @code{ls} in Lisp, by using the @file{ls-lisp.el} package. While
182 @file{ls-lisp.el} provides a reasonably full emulation of @code{ls},
183 there are some options and features peculiar to that emulation; they
184 are described in this section.
185
186 The @code{ls} emulation supports many of the @code{ls} switches, but
187 it doesn't support all of them. Here's the list of the switches it
188 does support: @option{-A}, @option{-a}, @option{-B}, @option{-C},
189 @option{-c}, @option{-i}, @option{-G}, @option{-g}, @option{-R},
190 @option{-r}, @option{-S}, @option{-s}, @option{-t}, @option{-U},
191 @option{-u}, and @option{-X}. The @option{-F} switch is partially
192 supported (it appends the character that classifies the file, but does
193 not prevent symlink following).
194
195 @vindex ls-lisp-use-insert-directory-program
196 On MS-Windows and MS-DOS, @file{ls-lisp.el} is preloaded when Emacs
197 is built, so the Lisp emulation of @code{ls} is always used on those
198 platforms. If you have a ported @code{ls}, setting
199 @code{ls-lisp-use-insert-directory-program} to a non-@code{nil} value
200 will revert to using an external program named by the variable
201 @code{insert-directory-program}.
202
203 @vindex ls-lisp-ignore-case
204 By default, @file{ls-lisp.el} uses a case-sensitive sort order for
205 the directory listing it produces; this is so the listing looks the
206 same as on other platforms. If you wish that the files be sorted in
207 case-insensitive order, set the variable @code{ls-lisp-ignore-case} to
208 a non-@code{nil} value.
209
210 @vindex ls-lisp-dirs-first
211 By default, files and subdirectories are sorted together, to emulate
212 the behavior of @code{ls}. However, native MS-Windows/MS-DOS file
213 managers list the directories before the files; if you want that
214 behavior, customize the option @code{ls-lisp-dirs-first} to a
215 non-@code{nil} value.
216
217 @vindex ls-lisp-verbosity
218 The variable @code{ls-lisp-verbosity} controls the file attributes
219 that @file{ls-lisp.el} displays. The value should be a list that
220 contains one or more of the symbols @code{links}, @code{uid}, and
221 @code{gid}. @code{links} means display the count of different file
222 names that are associated with (a.k.a.@: @dfn{links to}) the file's
223 data. @code{uid} means display the numerical identifier of the user
224 who owns the file. @code{gid} means display the numerical identifier
225 of the file owner's group. The default value is @code{(links uid gid)}
226 i.e.@: all the 3 optional attributes are displayed.
227
228 @vindex ls-lisp-emulation
229 The variable @code{ls-lisp-emulation} controls the flavour of the
230 @code{ls} emulation by setting the defaults for the 3 options
231 described above: @code{ls-lisp-ignore-case},
232 @code{ls-lisp-dirs-first}, and @code{ls-lisp-verbosity}. The value of
233 this option can be one of the following symbols:
234
235 @table @code
236 @item GNU
237 @itemx nil
238 Emulate @sc{gnu} systems; this is the default. This sets
239 @code{ls-lisp-ignore-case} and @code{ls-lisp-dirs-first} to
240 @code{nil}, and @code{ls-lisp-verbosity} to @code{(links uid gid)}.
241 @item UNIX
242 Emulate Unix systems. Like @code{GNU}, but sets
243 @code{ls-lisp-verbosity} to @code{(links uid)}.
244 @item MacOS
245 Emulate MacOS. Sets @code{ls-lisp-ignore-case} to @code{t}, and
246 @code{ls-lisp-dirs-first} and @code{ls-lisp-verbosity} to @code{nil}.
247 @item MS-Windows
248 Emulate MS-Windows. Sets @code{ls-lisp-ignore-case} and
249 @code{ls-lisp-dirs-first} to @code{t}, and @code{ls-lisp-verbosity} to
250 @code{(links)} on Windows NT/2K/XP/2K3 and to @code{nil} on Windows 9X.
251 Note that the default emulation is @emph{not} @code{MS-Windows}, even
252 on Windows, since many users of Emacs on those platforms prefer the
253 @sc{gnu} defaults.
254 @end table
255
256 @noindent
257 Any other value of @code{ls-lisp-emulation} means the same as
258 @code{GNU}. Note that this option needs to be set @emph{before}
259 @file{ls-lisp.el} is loaded, which means that on MS-Windows and MS-DOS
260 you will have to set the value from your @file{.emacs} file and then
261 restart Emacs, since @file{ls-lisp.el} is preloaded.
262
263 @vindex ls-lisp-support-shell-wildcards
264 The variable @code{ls-lisp-support-shell-wildcards} controls how
265 file-name patterns are supported: if it is non-@code{nil} (the
266 default), they are treated as shell-style wildcards; otherwise they
267 are treated as Emacs regular expressions.
268
170 @node Windows HOME 269 @node Windows HOME
171 @section HOME Directory on MS-Windows 270 @section HOME Directory on MS-Windows
172 @cindex @code{HOME} directory on MS-Windows 271 @cindex @code{HOME} directory on MS-Windows
173 272
174 The MS-Windows equivalent of the @code{HOME} directory is the 273 The MS-Windows equivalent of the @code{HOME} directory is the