emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: tumme messages in the echo area


From: Mathias Dahl
Subject: Re: tumme messages in the echo area
Date: Thu, 13 Jul 2006 17:22:32 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

Stefan Monnier <address@hidden> writes:

> I *am* sure about quotes.  E.g. if
>
>    %f
>
> is replaced by a file name such as
>
>    a"; rm -rf ~/.;"
>
> you may even get a nasty surprise.

True, that would surprise me a lot...

So, you suggest making the option a list of strings instead of one
string?  I think you will have to give me an example, because I cannot
see how that would make any difference to using one string, more than
to complicate things for the user (instead of having to configure one
option string, there would be several).  To avoid quotes and other
"bad" characters in the arguments we would need to quote them in some
way, right?  So couldn't the same be done to %f?  Something like this:

 (setq command
       (format-spec
         tumme-cmd-create-temp-image-options
         (list
          (cons ?p tumme-cmd-create-temp-image-program)
          (cons ?x size-x)
          (cons ?y size-y)
          (cons ?f (tumme-quote-bad-characters file))
          (cons ?t (tumme-quote-bad-characters new-file)))))

/Mathias





reply via email to

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