help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Printf and quoting in general, SQL injection in particular [was: Ema


From: Jean Louis
Subject: Re: Printf and quoting in general, SQL injection in particular [was: Emacs Modular Configuration: the preferable way]
Date: Tue, 22 Jun 2021 18:45:56 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

* Eli Zaretskii <eliz@gnu.org> [2021-06-22 16:11]:
> We _represent_ file names as strings, but they are not normal strings.
> Just like characters are represented as integers, but they are not
> just simple integers, they have additional special attributes and
> behaviors.

I get your point, what I don't agree with is the Formulierung. It
is for same reason as you mentioned it, people are reading our
writings and our form or text should be possibly clear. If you
wish to say they are not normal strings, demonstrate it. By
demonstration below it shows to be of type string. What is else
there?

I have a file:

~/tmp/new.txt

This works fine:

(find-file "~/tmp/new.txt") ⇒ #<buffer new.txt>

Is it normal string?

(type-of "~/tmp/new.txt") ⇒ string

Of course I know there are functions that will get file attributes,
and those are fine. Of course that meanings of strings are so much
different.

But subject was that we deal with strings in those functions. 

It was not about the meaning of strings.

I have functions which chunk human names in 3 parts. Functions use
strings. It really does not matter that I want to parse the human
names and chunk it or fit it into some form, or do something with
it. It does not change the type of a string and fact that strings are
supplied to functions.

The function `file-attributes' gives some different type as a result:

(file-attributes "~/tmp/new.txt") ⇒ (nil 1 1001 1001 (24786 1053 990790 326000) 
(24786 1033 720790 188000) (24786 1033 720790 188000) 0 "-rw-r--r--" t 51912267 
65024)

(type-of (file-attributes "~/tmp/new.txt")) ⇒ cons

Then we can work on that with:

(setq attributes (file-attributes "~/tmp/new.txt"))
(file-attribute-size attributes) ⇒ 0
(file-attribute-status-change-time attributes) ⇒ (24786 1033 720790 188000)

I do understand you wish to point out to functions which interpret and 
represent the meanings. It still did not change the fact that string was 
supplied to it: "~/tmp/new.txt"


Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/





reply via email to

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