From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Newsgroups: gmane.emacs.devel Subject: RE: Initialisation of dired-x for install-info guessing Date: Thu, 7 May 2009 08:04:38 +0200 Message-ID: References: <87hbzzs7ax.fsf@gmail.com> <8363gfe2r1.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_b3352bda-58c1-4edc-87c1-11741f8087a4_" X-Trace: ger.gmane.org 1241676305 27191 80.91.229.12 (7 May 2009 06:05:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2009 06:05:05 +0000 (UTC) Cc: karl@freefriends.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 07 08:04:55 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M1wiz-0002je-HO for ged-emacs-devel@m.gmane.org; Thu, 07 May 2009 08:04:54 +0200 Original-Received: from localhost ([127.0.0.1]:45131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1wiy-00037i-Uv for ged-emacs-devel@m.gmane.org; Thu, 07 May 2009 02:04:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1wir-00037c-Im for emacs-devel@gnu.org; Thu, 07 May 2009 02:04:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1wim-00034Z-Gu for emacs-devel@gnu.org; Thu, 07 May 2009 02:04:45 -0400 Original-Received: from [199.232.76.173] (port=51281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1wim-00034M-Ak for emacs-devel@gnu.org; Thu, 07 May 2009 02:04:40 -0400 Original-Received: from blu0-omc4-s7.blu0.hotmail.com ([65.55.111.146]:46233) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1wil-00061O-Hr for emacs-devel@gnu.org; Thu, 07 May 2009 02:04:39 -0400 Original-Received: from BLU104-W4 ([65.55.111.135]) by blu0-omc4-s7.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 6 May 2009 23:04:38 -0700 X-Originating-IP: [90.32.37.66] Importance: Normal In-Reply-To: <8363gfe2r1.fsf@gnu.org> X-OriginalArrivalTime: 07 May 2009 06:04:38.0742 (UTC) FILETIME=[B472D760:01C9CED9] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110744 Archived-At: --_b3352bda-58c1-4edc-87c1-11741f8087a4_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Just to follow up the discussion: 1) on the issue on what does the command do=2C I think that this issue was = closed by the dicussion: "dir" is a file that is at the same level as the i= nfo file to add. This is the normal way to make info files appear in Emacs = info menu.=20 2) On the issue of supporting older versions of Window: I am afraid that th= is is not possible if you want a DOS command. I don't think that there is a= ny 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 curre= nt 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. Mayb= e if the command was a list ('eshell ...) instead of a string=2C then dired= -x could interprete check is a an Eshell command=2C rathen than as a native= shell (DOS=2C bash=2C ...) command. This would be the vest alternative to = get rid of all these portability problems=2C but then Emacs users would hav= e to be a bit more familiar with Eshell (which I am not) Given that installation of info files is not that current=2C I think that t= he first alternative is simpler (ie omit the directory name for older versi= on of DOS=2C and let the user care about it). Vincent. > Date: Tue=2C 5 May 2009 23:03:30 +0300 > From: eliz@gnu.org > To: vincent.b.1@hotmail.fr > CC: karl@freefriends.org=3B emacs-devel@gnu.org > Subject: Re: Initialisation of dired-x for install-info guessing >=20 > > From: =3D?iso-8859-1?Q?Vincent_Bela=3DEFche?=3D > > Date: Tue=2C 05 May 2009 21:01:26 +0200 > > Cc: =3D?iso-8859-1?Q?Vincent_Bela=3DEFche?=3D = =2C > > Karl Berry > >=20 > > --8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----= -8<--- > > =3B=3B info files > > (list "\.info$" > > (cond > > ((eq system-type 'windows-nt) > > "for %i in ( * ) do install-info \"%i\" \"%~pi\\dir\"") > > (t =3B bash > > "for i in * =3B do p=3D`dirname \"$i\"`=3Binstall-info $i $p/dir\"=3B= done")) > > ) > > --8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<----= -8<--- >=20 > Thanks. However=2C 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". >=20 > So an alternative for older shells will be needed before this can go > in. >=20 > Also=2C 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? >=20 >=20 _________________________________________________________________ D=E9couvrez toutes les possibilit=E9s de communication avec vos proches http://www.microsoft.com/windows/windowslive/default.aspx= --_b3352bda-58c1-4edc-87c1-11741f8087a4_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Just to follow up the discussion:

1) on the issue on what does the c= ommand do=2C 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 norma= l 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 possi= ble if you want a DOS command. I don't think that there is any simple way t= o 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 withi= n Emacs.

Another possibility would be may be to make a one line sh.e= xe 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 w= hether sh.exe is on this machine or not.

Another solution would be t= hat the command would be an Eshell command. Maybe if the command was a list= ('eshell ...) instead of a string=2C then dired-x could interprete check i= s a an Eshell command=2C rathen than as a native shell (DOS=2C bash=2C ...)= command. This would be the vest alternative to get rid of all these portab= ility problems=2C 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=2C I think th= at the first alternative is simpler (ie omit the directory name for older v= ersion of DOS=2C and let the user care about it).

 =3B =3B V= incent.

>=3B Date: Tue=2C 5 May 2009 23:03:30 +0300
>=3B From= : eliz@gnu.org
>=3B To: vincent.b.1@hotmail.fr
>=3B CC: karl@free= friends.org=3B emacs-devel@gnu.org
>=3B Subject: Re: Initialisation of= dired-x for install-info guessing
>=3B
>=3B >=3B From: =3D?is= o-8859-1?Q?Vincent_Bela=3DEFche?=3D <=3Bvincent.b.1@hotmail.fr>=3B
&= gt=3B >=3B Date: Tue=2C 05 May 2009 21:01:26 +0200
>=3B >=3B Cc: = =3D?iso-8859-1?Q?Vincent_Bela=3DEFche?=3D <=3Bvincent.b.1@hotmail.fr>= =3B=2C
>=3B >=3B Karl Berry <=3Bkarl@freefriends.org>=3B
>= =3B >=3B
>=3B >=3B --8<=3B-----8<=3B-----8<=3B-----8<=3B-= ----8<=3B-----8<=3B-----8<=3B-----8<=3B-----8<=3B-----8<=3B----= -8<=3B---
>=3B >=3B =3B=3B info files
>=3B >=3B (list "\.in= fo$"
>=3B >=3B (cond
>=3B >=3B ((eq system-type = 'windows-nt)
>=3B >=3B "for %i in ( * ) do install-info \"%i\" \"%~= pi\\dir\"")
>=3B >=3B (t =3B bash
>=3B >=3B "for i in= * =3B do p=3D`dirname \"$i\"`=3Binstall-info $i $p/dir\"=3B done"))
&g= t=3B >=3B )
>=3B >=3B --8<=3B-----8<=3B-----8<=3B-----8<= =3B-----8<=3B-----8<=3B-----8<=3B-----8<=3B-----8<=3B-----8<=3B= -----8<=3B---
>=3B
>=3B Thanks. However=2C the command you su= ggest for windows-nt will only
>=3B work with cmd.exe as the shell and= only with latest versions of it.
>=3B Emacs still supports older Wind= ows versions where the shell is
>=3B command.com which does not know a= bout "%~pi".
>=3B
>=3B So an alternative for older shells will b= e needed before this can go
>=3B in.
>=3B
>=3B Also=2C I'm = not sure I understand what is this command trying to do. It
>=3B seem= s to try to install Info files in the subdirectory named literally
>= =3B `dir' of the directory where those Info files live?
>=3B
>= =3B


D=E9couvrez toutes les possibilit=E9s de communication = avec vos proches = --_b3352bda-58c1-4edc-87c1-11741f8087a4_--