all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "James K. Lowden" <jklowden@speakeasy.net>
To: help-gnu-emacs@gnu.org
Subject: Re: HTML img tags
Date: Tue, 13 Dec 2016 23:44:32 -0500	[thread overview]
Message-ID: <20161213234432.000a8c5604beab72f9907317@speakeasy.net> (raw)
In-Reply-To: 8xxoa0johe9.fsf@village.keycorner.org

On Sat, 10 Dec 2016 10:53:02 -0600
Hikaru Ichijyo <ichijyo@macross.sdf.jp> wrote:

> I realize there's probably no way for Emacs to do that without
> calling external programs as a subprocess

Not no way, but no reason to.  :-)  

> I'd rather do everything in Emacs.

Just to tease you a little bit, you don't really mean that.  You let
emacs rely on the OS to provide a machine abstraction, for instance.  I
doubt you want to write directly to the hardware in elisp.  

Once you accept there's no "everything", you're on a slippery slope.
The question becomes merely, "how can emacs most readily obtain the
information I want?"  And to that, I have an answer for you!  

The ImageMagick package includes a utility "identify" that surely
produces the information you need.  If I wanted something to "guess the
width= and height= attributes" of a file, I'd probably write a little
awk script to spit out the HTML I wanted, and invoke that
from emacs.  If I wanted to do everything in emacs, I guess I'd invoke
"identify" directly, and winnow its output in elisp.  

HTH. 

--jkl


  parent reply	other threads:[~2016-12-14  4:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-10 16:53 HTML img tags Hikaru Ichijyo
2016-12-10 17:55 ` Eli Zaretskii
2016-12-12 15:46 ` HASM
2016-12-14  4:44 ` James K. Lowden [this message]
2016-12-14  9:05   ` B.V. Raghav
2016-12-14  9:39 ` Lars Magne Ingebrigtsen
2016-12-14  9:51 ` Konstantin Shakhnov
2016-12-14 10:48   ` tomas
2016-12-14 13:27     ` Konstantin Shakhnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161213234432.000a8c5604beab72f9907317@speakeasy.net \
    --to=jklowden@speakeasy.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.