From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joseph Garvin Newsgroups: gmane.emacs.devel Subject: Re: Linking to ImageMagick by default Date: Wed, 19 Dec 2018 10:45:45 -0600 Message-ID: References: <20181205223901.GA5543@breton.holly.idiocy.org> <20181208183810.GA2465@breton.holly.idiocy.org> <20181210220944.GA4793@breton.holly.idiocy.org> <20181219160308.GA43504@breton.holly.idiocy.org> <83efadcw3j.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009bf2cf057d62bfbc" X-Trace: blaine.gmane.org 1545237931 23566 195.159.176.226 (19 Dec 2018 16:45:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2018 16:45:31 +0000 (UTC) Cc: Alan Third , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 19 17:45:26 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZeyK-0005yk-9C for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2018 17:45:24 +0100 Original-Received: from localhost ([::1]:32992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZf0Q-0005Mg-UT for ged-emacs-devel@m.gmane.org; Wed, 19 Dec 2018 11:47:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZezI-0005Lc-FD for emacs-devel@gnu.org; Wed, 19 Dec 2018 11:46:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZezD-00068P-Rj for emacs-devel@gnu.org; Wed, 19 Dec 2018 11:46:22 -0500 Original-Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]:45255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZeyu-0005rw-JU; Wed, 19 Dec 2018 11:46:01 -0500 Original-Received: by mail-io1-xd2c.google.com with SMTP id p7so8479000iog.12; Wed, 19 Dec 2018 08:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7YRGbu4eNlFFjKpv9/RGHN0AUqTClhTnCMjKvOzBA1E=; b=OS7hk+cmngIYDQXms6OGITWChlSL4nSUXzbVlSox5bTnoUvDzJj/pfT0afHgLg7Q5d NFIKo0Gt56iWf2n13FoLHVTbclg4FMiNFZBZQxYziJ4TKAwpMtqguAHSRoAha1fgNCy8 mRB+5Rp7X164F5uUVRxT2z5mbw++ZC9YqQRVDa1M0IxzFstNUlS25z8EQxWBWc5JKg0/ IosFAP9/YtERFF4956d3xMPnc7NgQfXqkLIpKveE+SNeGID0CDgtNziU98a57gy7kDWf vYlR7IyWucTv99Yf/cqD92xttngRLPfWxq5lVoakG8JztJfiM3OsYFtHF6iV3kXiJadY oeOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7YRGbu4eNlFFjKpv9/RGHN0AUqTClhTnCMjKvOzBA1E=; b=DfjCs5c6rQwEEszvTF+ljVYpTLKvLn1Xv/T/74Z4N6Vb3LoWwLCxsGkOnHVflKvtLX kKh+9MDXoM2OGlYPcP6tyOdvYDvR6pF2DWeM/AjNlMZIYHjo/Z7Spfx72UfFdn0QPtDR fid4NkB2hcQhHAAjvTN2ijrpQk+f4Z5GUedrjIXoCO5gXg3gD2b5Oe2netM7FO8xvPLa urcn0GsyNOe+TphvpNLIxvgBJ+UDbaHTQyYfv5T6NWgvF28+lHydOvi5x8wPCBZ37Fxo rrALRRBJMdN9FDX5/0gWFRSDu70u+qupRMEBEBIJY59PY3tbFwszT/ZOTcboWeRgIy1f YklA== X-Gm-Message-State: AA+aEWagl+gViKR2QjWmpA1xwtVxi2TZT2QXZwQWFNm6PoUycGpPCpJ/ 5QpEto51++z1UXyK1VHNz5/4ir71b6itcz14tkgIoA== X-Google-Smtp-Source: AFSGD/XPPwuWvb5Wt0PufugsHOCubOT9G3UZ/BBczi3X2SOcDvOo+H4UINksaPAtfOJ5jDUrIVNa5C+FApbkp6jtXiM= X-Received: by 2002:a6b:9207:: with SMTP id u7mr18345282iod.286.1545237958485; Wed, 19 Dec 2018 08:45:58 -0800 (PST) In-Reply-To: <83efadcw3j.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d2c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231925 Archived-At: --0000000000009bf2cf057d62bfbc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable What does Mozilla use for Firefox? They should have an even more serious security outlook. On Wed, Dec 19, 2018, 10:36 AM Eli Zaretskii > Date: Wed, 19 Dec 2018 16:03:08 +0000 > > From: Alan Third > > > > I want to strip out the properties that I=E2=80=99m going to use at dis= play > > time, so that I can use the same cached image for different output > > sizes, while leaving other properties that I don=E2=80=99t know about i= n > > place. So I=E2=80=99d like to store the above as > > > > '(image :file "image.png" :format png) > > > > however I=E2=80=99m not sure how to go about filtering the list in C. I= tried > > a few variations on this, but they all seg fault > > > > static Lisp_Object > > get_cache_spec (Lisp_Object spec) > > { > > Lisp_Object cache_spec, tail; > > > > cache_spec =3D Qnil; > > > > for (tail =3D XCDR (spec); > > CONSP (tail) && CONSP (XCDR (tail)); > > tail =3D XCDR (XCDR (tail))) > > { > > if (!EQ (XCAR (tail), Qwidth) > > && !EQ (XCAR (tail), QCheight) > > && !EQ (XCAR (tail), QCmax_width) > > && !EQ (XCAR (tail), QCmax_height) > > && !EQ (XCAR (tail), QCscale) > > && !EQ (XCAR (tail), QCmargin) > > && !EQ (XCAR (tail), QCascent) > > && !EQ (XCAR (tail), QCrelief)) > > cache_spec =3D list3 (XCAR (tail), XCAR (XCDR (tail)), cache_sp= ec); > > } > > cache_spec =3D list2 (XCAR (spec), cache_spec); > > I think you should use Fcons instead of list3 or list2. > > --0000000000009bf2cf057d62bfbc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
What does Mozilla use for Firefox? They should have an ev= en more serious security outlook.

On Wed, Dec 19, 2018, 10:36 AM Eli Zaretskii <eliz@gnu.org wrote:
> Date: Wed, 19 Dec 2018 16:03:08 +0000
> From: Alan Third <alan@idiocy.org>
>
> I want to strip out the properties that I=E2=80=99m going to use at di= splay
> time, so that I can use the same cached image for different output
> sizes, while leaving other properties that I don=E2=80=99t know about = in
> place. So I=E2=80=99d like to store the above as
>
>=C2=A0 =C2=A0 =C2=A0'(image :file "image.png" :format png= )
>
> however I=E2=80=99m not sure how to go about filtering the list in C. = I tried
> a few variations on this, but they all seg fault
>
> static Lisp_Object
> get_cache_spec (Lisp_Object spec)
> {
>=C2=A0 =C2=A0Lisp_Object cache_spec, tail;
>
>=C2=A0 =C2=A0cache_spec =3D Qnil;
>
>=C2=A0 =C2=A0for (tail =3D XCDR (spec);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 CONSP (tail) && CONSP (XCDR (tail))= ;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 tail =3D XCDR (XCDR (tail)))
>=C2=A0 =C2=A0 =C2=A0{
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!EQ (XCAR (tail), Qwidth)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&& !EQ (XCAR (tail), Q= Cheight)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&& !EQ (XCAR (tail), Q= Cmax_width)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&& !EQ (XCAR (tail), Q= Cmax_height)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&& !EQ (XCAR (tail), Q= Cscale)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&& !EQ (XCAR (tail), Q= Cmargin)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&& !EQ (XCAR (tail), Q= Cascent)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&& !EQ (XCAR (tail), Q= Crelief))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cache_spec =3D list3 (XCAR (tail), XC= AR (XCDR (tail)), cache_spec);
>=C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0cache_spec =3D list2 (XCAR (spec), cache_spec);

I think you should use Fcons instead of list3 or list2.

--0000000000009bf2cf057d62bfbc--