[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] 21.3 filecache.el - Added Cygwin support
From: |
Jari Aalto+mail.linux |
Subject: |
Re: [patch] 21.3 filecache.el - Added Cygwin support |
Date: |
Mon, 26 Jan 2004 02:25:26 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/20.7 (windows-nt) (i386-*-nt5.0.2195) |
* 2004-01-25 Eli Zaretskii <eliz@elta.co.il> gnu.emacs.bug
*
<http://groups.google.com/groups?oi=djq&as_umsgid=%3Cmailman.1309.1075039727.928.bug-gnu-emacs@gnu.org>
| > From: jari.aalto@poboxes.com (Jari Aalto+mail.linux)
| > Newsgroups: gnu.emacs.bug
| > Date: Sun, 25 Jan 2004 13:52:12 +0200
| > |
| > | One thing I don't understand about these changes: why do we need all
| > | those ugly system-dependent tests? Why not test if `find' is
| > | installed on all supported platforms regardless?
| >
| > The "find" from Windows is different from the Cygwin (Unix) "find", so
| > this distinctions must be examined.
|
| I know that on Windows one must test whether `find' is the Unix-style
| `find'. What I was asking was something different: why not make that
| test unconditionally, on all systems.
Hard to do. The code currently tests GNU find by searching "GNU" from
--version. But --version does not work in SunOS, HP, SGI, IBM, they have
their own find and making tests for all of those is beyond my reach.
So:
1) If it's not PC, assume Unix find
2) If it's PC, then test for GNU find (most likely Cygwin GNU find)
Anything else, I don't know what to test. Please take it from there to
improve.
| > Right. Anything else missing? Jari
| >
| >
| >
| >
| > 2004-01-25 Sun Jari Aalto <jari.aalto@poboxes.com>
| >
| > * filecache.el (file-cache-find-unix-p): Added
| > check for `ms-dos' as well.
|
| What about the Mac?
elisp-manual-21-2.8 reports variable window-system like this:
- Variable: window-system
This variable tells Lisp programs what window system Emacs is
running under. The possible values are
`x'
Emacs is displaying using X.
`pc'
Emacs is displaying using MS-DOS.
`w32'
Emacs is displaying using Windows.
`mac'
Emacs is displaying using a Macintosh.
`nil'
Emacs is using a character-based terminal.
Is there a bug in documentation, because I canät see `windows-nt' or
`ms-dos' values? Perhaps someone should check the latest if it's
being edited.
Here is more fixes, based on your comment and the manual.
Jari
2004-01-26 Mon Jari Aalto <jari.aalto@poboxes.com>
* filecache.el (file-cache-find-unix-p): Added
`mac' `pc' and `w32' tests.
Index: filecache.el
===================================================================
RCS file:
/cygdrive/h/data/version-control/cvsroot/emacs/gnu-emacs/lisp213/filecache.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -IId: -b -w -u -r1.4 -r1.5
--- filecache.el 25 Jan 2004 11:49:15 -0000 1.4
+++ filecache.el 26 Jan 2004 00:12:13 -0000 1.5
@@ -329,10 +329,17 @@
(defun file-cache-find-unix-p ()
"Check if `file-cache-find-command' is Unix type program."
- (or (not (memq system-type ;; Assume Unix system
+ ;; First, assume Unix system, which has find(1).
+ ;; SunOS, HP, IBM have their own versions of find(1).
+ (or (not (memq system-type
'(windows-nt
- 'ms-dos)))
- (with-temp-buffer ;; Cygwin?
+ pc
+ w32
+ mac
+ ms-dos)))
+ ;; This is PC system, can we see GNU find(1)
+ ;; like one bundled in Cygwin?
+ (with-temp-buffer
(call-process file-cache-find-command
nil
(current-buffer)
--
http://tiny-tools.sourceforge.net/
Swatch @time http://www.mir.com.my/iTime/itime.htm
http://www.ryanthiessen.com/swatch/resources.htm
Use Licenses! http://www.linuxjournal.com/article.php?sid=6225
Which Licence? http://www.linuxjournal.com/article.php?sid=4825
OSI Licences http://www.opensource.org/licenses/