diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 11 | ||||
| -rw-r--r-- | doc/emacs/files.texi | 26 | ||||
| -rw-r--r-- | doc/emacs/msdog.texi | 32 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 10 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 51 |
5 files changed, 75 insertions, 55 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a374272135f..4825f08979f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2011-01-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * files.texi (File Aliases): Move directory-abbrev-alist doc from Lisp | ||
| 4 | manual. Explain why directory-abbrev-alist elements should be anchored | ||
| 5 | (Bug#7777). | ||
| 6 | |||
| 7 | 2011-01-07 Eli Zaretskii <eliz@gnu.org> | ||
| 8 | |||
| 9 | * msdog.texi (Windows Startup): Correct inaccurate description of | ||
| 10 | differences between emacsclient.exe and emacsclientw.exe. | ||
| 11 | |||
| 1 | 2010-12-30 Chong Yidong <cyd@stupidchicken.com> | 12 | 2010-12-30 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 13 | ||
| 3 | * rmail.texi (Rmail Display): Edit for grammar and conciseness. | 14 | * rmail.texi (Rmail Display): Edit for grammar and conciseness. |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 4df81caa8f2..530c2bb94f7 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -1158,7 +1158,6 @@ links point to directories. | |||
| 1158 | 1158 | ||
| 1159 | @vindex find-file-existing-other-name | 1159 | @vindex find-file-existing-other-name |
| 1160 | @vindex find-file-suppress-same-file-warnings | 1160 | @vindex find-file-suppress-same-file-warnings |
| 1161 | |||
| 1162 | Normally, if you visit a file which Emacs is already visiting under | 1161 | Normally, if you visit a file which Emacs is already visiting under |
| 1163 | a different name, Emacs displays a message in the echo area and uses | 1162 | a different name, Emacs displays a message in the echo area and uses |
| 1164 | the existing buffer visiting that file. This can happen on systems | 1163 | the existing buffer visiting that file. This can happen on systems |
| @@ -1180,6 +1179,31 @@ then the file name recorded for a buffer is the file's @dfn{truename} | |||
| 1180 | than the name you specify. Setting @code{find-file-visit-truename} also | 1179 | than the name you specify. Setting @code{find-file-visit-truename} also |
| 1181 | implies the effect of @code{find-file-existing-other-name}. | 1180 | implies the effect of @code{find-file-existing-other-name}. |
| 1182 | 1181 | ||
| 1182 | @cindex directory name abbreviation | ||
| 1183 | @vindex directory-abbrev-alist | ||
| 1184 | Sometimes, a directory is ordinarily accessed through a symbolic | ||
| 1185 | link, and you may want Emacs to preferentially display its ``linked'' | ||
| 1186 | name instead of its truename. To do this, customize the variable | ||
| 1187 | @code{directory-abbrev-alist}. Each element in this list should have | ||
| 1188 | the form @code{(@var{from} . @var{to})}, which says to replace | ||
| 1189 | @var{from} with @var{to} when it appears in a directory name. For | ||
| 1190 | this feature to work properly, @var{from} and @var{to} should point to | ||
| 1191 | the same file. The @var{from} string is actually a regular expression | ||
| 1192 | (@pxref{Regexps}); it should always start with @samp{\`}, to avoid | ||
| 1193 | matching to an incorrect part of the original directory name. The | ||
| 1194 | @var{to} string should be an ordinary absolute directory name. Do not | ||
| 1195 | use @samp{~} to stand for a home directory in the @var{to} string; | ||
| 1196 | Emacs performs these substitutions separately. | ||
| 1197 | |||
| 1198 | Here's an example, from a system on which file system | ||
| 1199 | @file{/home/fsf} and so on are normally accessed through symbolic | ||
| 1200 | links named @file{/fsf} and so on. | ||
| 1201 | |||
| 1202 | @example | ||
| 1203 | (("\\`/home/fsf" . "/fsf") | ||
| 1204 | ("\\`/home/gd" . "/gd")) | ||
| 1205 | @end example | ||
| 1206 | |||
| 1183 | @node Directories | 1207 | @node Directories |
| 1184 | @section File Directories | 1208 | @section File Directories |
| 1185 | 1209 | ||
diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index 514ef956dc3..caa1bbccd19 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi | |||
| @@ -90,20 +90,24 @@ Via the Emacs client program, @file{emacsclient.exe} or | |||
| 90 | programs, and to reuse a running Emacs process for serving editing | 90 | programs, and to reuse a running Emacs process for serving editing |
| 91 | jobs required by other programs. @xref{Emacs Server}. The difference | 91 | jobs required by other programs. @xref{Emacs Server}. The difference |
| 92 | between @file{emacsclient.exe} and @file{emacsclientw.exe} is that the | 92 | between @file{emacsclient.exe} and @file{emacsclientw.exe} is that the |
| 93 | former waits for Emacs to signal that the editing job is finished, | 93 | former is a console program, while the latter is a Windows GUI |
| 94 | while the latter does not wait. Which one of them to use in each case | 94 | program. Both programs wait for Emacs to signal that the editing job |
| 95 | depends on the expectations of the program that needs editing | 95 | is finished, before they exit and return control to the program that |
| 96 | services. If the program will use the edited files, it needs to wait | 96 | invoked them. Which one of them to use in each case depends on the |
| 97 | for Emacs, so you should use @file{emacsclient.exe}. By contrast, if | 97 | expectations of the program that needs editing services. If that |
| 98 | the results of editing are not needed by the invoking program, you | 98 | program is itself a console (text-mode) program, you should use |
| 99 | will be better off using @file{emacsclientw.exe}. A notable situation | 99 | @file{emacsclient.exe}, so that any of its messages and prompts appear |
| 100 | where you would want @file{emacsclientw.exe} is when you right-click | 100 | in the same command window as those of the invoking program. By |
| 101 | on a file in the Windows Explorer and select ``Open With'' from the | 101 | contrast, if the invoking program is a GUI program, you will be better |
| 102 | pop-up menu. Use the @samp{--alternate-editor=} or @samp{-a} options | 102 | off using @file{emacsclientw.exe}, because @file{emacsclient.exe} will |
| 103 | if Emacs might not be running (or not running as a server) when | 103 | pop up a command window if it is invoked from a GUI program. A |
| 104 | @command{emacsclient} is invoked---that will always give you an | 104 | notable situation where you would want @file{emacsclientw.exe} is when |
| 105 | editor. When invoked via @command{emacsclient}, Emacs will start in | 105 | you right-click on a file in the Windows Explorer and select ``Open |
| 106 | the current directory of the program that invoked | 106 | With'' from the pop-up menu. Use the @samp{--alternate-editor=} or |
| 107 | @samp{-a} options if Emacs might not be running (or not running as a | ||
| 108 | server) when @command{emacsclient} is invoked---that will always give | ||
| 109 | you an editor. When invoked via @command{emacsclient}, Emacs will | ||
| 110 | start in the current directory of the program that invoked | ||
| 107 | @command{emacsclient}. | 111 | @command{emacsclient}. |
| 108 | @end enumerate | 112 | @end enumerate |
| 109 | 113 | ||
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 1cff2853a27..e1180124c05 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2011-01-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * files.texi (Directory Names): Move directory-abbrev-alist doc to | ||
| 4 | Emacs manual. | ||
| 5 | |||
| 6 | 2011-01-07 Eli Zaretskii <eliz@gnu.org> | ||
| 7 | |||
| 8 | * files.texi (Directory Names): Explain why FROM in | ||
| 9 | directory-abbrev-alist should begin with \`. (Bug#7777) | ||
| 10 | |||
| 1 | 2010-12-25 Eli Zaretskii <eliz@gnu.org> | 11 | 2010-12-25 Eli Zaretskii <eliz@gnu.org> |
| 2 | 12 | ||
| 3 | * modes.texi (Emulating Mode Line): Fix last change. | 13 | * modes.texi (Emulating Mode Line): Fix last change. |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index c2e057783c5..1f66da98347 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -1920,51 +1920,22 @@ Don't try concatenating a slash by hand, as in | |||
| 1920 | because this is not portable. Always use | 1920 | because this is not portable. Always use |
| 1921 | @code{file-name-as-directory}. | 1921 | @code{file-name-as-directory}. |
| 1922 | 1922 | ||
| 1923 | @cindex directory name abbreviation | ||
| 1924 | Directory name abbreviations are useful for directories that are | ||
| 1925 | normally accessed through symbolic links. Sometimes the users recognize | ||
| 1926 | primarily the link's name as ``the name'' of the directory, and find it | ||
| 1927 | annoying to see the directory's ``real'' name. If you define the link | ||
| 1928 | name as an abbreviation for the ``real'' name, Emacs shows users the | ||
| 1929 | abbreviation instead. | ||
| 1930 | |||
| 1931 | @defopt directory-abbrev-alist | ||
| 1932 | The variable @code{directory-abbrev-alist} contains an alist of | ||
| 1933 | abbreviations to use for file directories. Each element has the form | ||
| 1934 | @code{(@var{from} . @var{to})}, and says to replace @var{from} with | ||
| 1935 | @var{to} when it appears in a directory name. The @var{from} string is | ||
| 1936 | actually a regular expression; it should always start with @samp{\`}. | ||
| 1937 | The @var{to} string should be an ordinary absolute directory name. Do | ||
| 1938 | not use @samp{~} to stand for a home directory in that string. The | ||
| 1939 | function @code{abbreviate-file-name} performs these substitutions. | ||
| 1940 | |||
| 1941 | You can set this variable in @file{site-init.el} to describe the | ||
| 1942 | abbreviations appropriate for your site. | ||
| 1943 | |||
| 1944 | Here's an example, from a system on which file system @file{/home/fsf} | ||
| 1945 | and so on are normally accessed through symbolic links named @file{/fsf} | ||
| 1946 | and so on. | ||
| 1947 | |||
| 1948 | @example | ||
| 1949 | (("\\`/home/fsf" . "/fsf") | ||
| 1950 | ("\\`/home/gp" . "/gp") | ||
| 1951 | ("\\`/home/gd" . "/gd")) | ||
| 1952 | @end example | ||
| 1953 | @end defopt | ||
| 1954 | |||
| 1955 | To convert a directory name to its abbreviation, use this | 1923 | To convert a directory name to its abbreviation, use this |
| 1956 | function: | 1924 | function: |
| 1957 | 1925 | ||
| 1958 | @defun abbreviate-file-name filename | 1926 | @defun abbreviate-file-name filename |
| 1959 | @anchor{Definition of abbreviate-file-name} | 1927 | @anchor{Definition of abbreviate-file-name} |
| 1960 | This function applies abbreviations from @code{directory-abbrev-alist} | 1928 | This function returns an abbreviated form of @var{filename}. It |
| 1961 | to its argument, and also substitutes @samp{~} for the user's home | 1929 | applies the abbreviations specified in @code{directory-abbrev-alist} |
| 1962 | directory if the argument names a file in the home directory or one of | 1930 | (@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}), |
| 1963 | its subdirectories. (If the home directory is a root directory, it is | 1931 | then substitutes @samp{~} for the user's home directory if the |
| 1964 | not replaced with @samp{~}, because this does not make the result | 1932 | argument names a file in the home directory or one of its |
| 1965 | shorter on many systems.) You can use it for directory names and for | 1933 | subdirectories. If the home directory is a root directory, it is not |
| 1966 | file names, because it recognizes abbreviations even as part of the | 1934 | replaced with @samp{~}, because this does not make the result shorter |
| 1967 | name. | 1935 | on many systems. |
| 1936 | |||
| 1937 | You can use this function for directory names and for file names, | ||
| 1938 | because it recognizes abbreviations even as part of the name. | ||
| 1968 | @end defun | 1939 | @end defun |
| 1969 | 1940 | ||
| 1970 | @node File Name Expansion | 1941 | @node File Name Expansion |