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

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.