emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Initialisation of dired-x for install-info guessing


From: Vincent Belaïche
Subject: RE: Initialisation of dired-x for install-info guessing
Date: Thu, 7 May 2009 08:04:38 +0200

Just to follow up the discussion:

1) on the issue on what does the command do, I think that this issue was closed by the dicussion: "dir" is a file that is at the same level as the info file to add. This is the normal way to make info files appear in Emacs info menu.

2) On the issue of supporting older versions of Window: I am afraid that this is not possible if you want a DOS command. I don't think that there is any simple way to extract the dirname with a one-liner command in older DOS versions.

So probably the best thing to do for older DOS version would be to write it as:

"for %i in ( * ) do install-info \"%i\" dir")

In that case it will work only if the info file is at the root of the current Dired buffer.

I am not sure how to disntiguish Windows version from within Emacs.

Another possibility would be may be to make a one line sh.exe command with explicitely invoking sh.exe in the command line. However I am not sure that sh.exe can be used this way. Also you would need to know whether sh.exe is on this machine or not.

Another solution would be that the command would be an Eshell command. Maybe if the command was a list ('eshell ...) instead of a string, then dired-x could interprete check is a an Eshell command, rathen than as a native shell (DOS, bash, ...) command. This would be the vest alternative to get rid of all these portability problems, but then Emacs users would have to be a bit more familiar with Eshell (which I am not)

Given that installation of info files is not that current, I think that the first alternative is simpler (ie omit the directory name for older version of DOS, and let the user care about it).

   Vincent.

> Date: Tue, 5 May 2009 23:03:30 +0300
> From: address@hidden
> To: address@hidden
> CC: address@hidden; address@hidden
> Subject: Re: Initialisation of dired-x for install-info guessing
>
> > From: =?iso-8859-1?Q?Vincent_Bela=EFche?= <address@hidden>
> > Date: Tue, 05 May 2009 21:01:26 +0200
> > Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= <address@hidden>,
> > Karl Berry <address@hidden>
> >
> > --8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<---
> > ;; info files
> > (list "\.info$"
> > (cond
> > ((eq system-type 'windows-nt)
> > "for %i in ( * ) do install-info \"%i\" \"%~pi\\dir\"")
> > (t ; bash
> > "for i in * ; do p=`dirname \"$i\"`;install-info $i $p/dir\"; done"))
> > )
> > --8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<---
>
> Thanks. However, the command you suggest for windows-nt will only
> work with cmd.exe as the shell and only with latest versions of it.
> Emacs still supports older Windows versions where the shell is
> command.com which does not know about "%~pi".
>
> So an alternative for older shells will be needed before this can go
> in.
>
> Also, I'm not sure I understand what is this command trying to do. It
> seems to try to install Info files in the subdirectory named literally
> `dir' of the directory where those Info files live?
>
>


Découvrez toutes les possibilités de communication avec vos proches

reply via email to

[Prev in Thread] Current Thread [Next in Thread]