all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Initialisation of dired-x for install-info guessing‏
@ 2009-05-13  5:15 Vincent Belaïche
  2009-05-13 17:55 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Belaïche @ 2009-05-13  5:15 UTC (permalink / raw
  To: emacs-devel

Hello,

I have found a way to get rid of the `for', and also to be less bash
specific. This way the guess will work even for old Windows versions.

I just wrote it as follows:

(list "\\.info$" 
		      '(concat "install-info \"" file "\" \"" 
			       (file-name-directory file) 
			       "dir\" " 
			       (cond 
				((eq system-type 'windows-nt) "&& Rem ")
				(t "; # "))))


The trick is:

1) I get the directory in Lisp (note that I need no convert filename and
directory to system dependent syntax because install-info accepts `/' as
a file separator)

2) I append a tailing "&& Rem " so that the argument, say foo.info, that
is appended after the command name is ignored.

The full command line is then

install-info some/directory/foo.info some/directory/dir && Rem some/directory/foo.info

This "&& Rem " is replaced by "; # " if the system is not window. So
that the fill command line will be

install-info some/directory/foo.info some/directory/dir ; # some/directory/foo.info


Just a remark: if the dired mode could interprete some list (where CMD
is a string):

(litterally CMD)

As a command CMD to which the file name does not have to be appended,
then there would not be any need to cheat the OS with the tailing
comment (Rem or #). The guess displayed to the user would also be nicer.

   Vincent.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Initialisation of dired-x for install-info guessing‏
  2009-05-13  5:15 Initialisation of dired-x for install-info guessing‏ Vincent Belaïche
@ 2009-05-13 17:55 ` Eli Zaretskii
  2009-05-13 21:09   ` Vincent Belaïche
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2009-05-13 17:55 UTC (permalink / raw
  To: Vincent Belaïche; +Cc: emacs-devel

> From: =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincent.b.1@hotmail.fr> 
> Date: Wed, 13 May 2009 07:15:37 +0200
> 
> 2) I append a tailing "&& Rem " so that the argument, say foo.info, that
> is appended after the command name is ignored.

And, of course, older Windows shells don't know about &&, either.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Initialisation of dired-x for install-info guessing‏
  2009-05-13 17:55 ` Eli Zaretskii
@ 2009-05-13 21:09   ` Vincent Belaïche
  0 siblings, 0 replies; 3+ messages in thread
From: Vincent Belaïche @ 2009-05-13 21:09 UTC (permalink / raw
  To: eliz; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1468 bytes --]




> Date: Wed, 13 May 2009 20:55:11 +0300
> From: eliz@gnu.org
> To: vincent.b.1@hotmail.fr
> CC: emacs-devel@gnu.org
> Subject: Re: Initialisation of dired-x for install-info guessing‏
> 
> > From: =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincent.b.1@hotmail.fr> 
> > Date: Wed, 13 May 2009 07:15:37 +0200
> > 
> > 2) I append a tailing "&& Rem " so that the argument, say foo.info, that
> > is appended after the command name is ignored.
> 
> And, of course, older Windows shells don't know about &&, either.
> 
> 

Yes MS-DOS has always been better at making people invent work-arounds than at providing useful functions. I am not even sure that it is correct to use the word "shell" in calling it -- doesn't "shell" mean that there is a kernel/shell layering ?

Well, maybe a pipe `|' could be used instead of a &&. I am not sure from when the pipe was available ...

Otherwise that may call for dired-x being able to inteprete other objects than strings for the command guesses, like in my suggestion for some 

(litterally CMD)

list. 

Anyhow, heroes brave enough for both installing manually info files and using old version of MSDOSs are certainly so good at computer science, that they don't need the assistence of dired-x guess ;-). 

   Vincent.



_________________________________________________________________
Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  !  Téléchargez-le maintenant !
http://www.windowslive.fr/messenger/1.asp

[-- Attachment #2: Type: text/html, Size: 1842 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-13 21:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-13  5:15 Initialisation of dired-x for install-info guessing‏ Vincent Belaïche
2009-05-13 17:55 ` Eli Zaretskii
2009-05-13 21:09   ` Vincent Belaïche

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.