From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Konstantin Shakhnov Newsgroups: gmane.emacs.help Subject: Re: HTML img tags Date: Wed, 14 Dec 2016 16:27:31 +0300 Message-ID: <20161214132731.GA4116@eee> References: <8xxoa0johe9.fsf@village.keycorner.org> <20161214095101.GA8977@eee> <20161214104801.GA26761@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1481721626 22609 195.159.176.226 (14 Dec 2016 13:20:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2016 13:20:26 +0000 (UTC) User-Agent: Mutt/1.5.23 (2014-03-12) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 14 14:20:23 2016 Return-path: Envelope-to: geh-help-gnu-emacs@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 1cH9To-00057q-Vt for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Dec 2016 14:20:21 +0100 Original-Received: from localhost ([::1]:47722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cH9Ts-00044B-Tr for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Dec 2016 08:20:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cH9TR-00043z-Dd for help-gnu-emacs@gnu.org; Wed, 14 Dec 2016 08:19:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cH9TM-0000rJ-E0 for help-gnu-emacs@gnu.org; Wed, 14 Dec 2016 08:19:57 -0500 Original-Received: from smtp15.mail.ru ([94.100.176.133]:47033) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cH9TM-0000qX-1E for help-gnu-emacs@gnu.org; Wed, 14 Dec 2016 08:19:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date; bh=D6H/ekpFhAPtOWr96CHl84v2y3aGDgv2cC/oXXbJyxw=; b=jEW878ll9CLpvBidLlQcrdQ4a6NWXN9FuoiMVfkzASxmYOHjnt+KideGn2LhQdJZj4t3IKy/jJwYhq0VLB9QT9Hl9clhx2JFjK7fIa1YSOF4I17kKIiyHhaAgFDuWB7xbz41zMmNI5Ktrt9uWBSTu+U9zdbneYVCEgE/NUM5DVI=; Original-Received: from [94.158.176.77] (port=35342 helo=eee) by smtp15.mail.ru with esmtpa (envelope-from ) id 1cH9TJ-0001FJ-KO for help-gnu-emacs@gnu.org; Wed, 14 Dec 2016 16:19:50 +0300 Content-Disposition: inline In-Reply-To: <20161214104801.GA26761@tuxteam.de> Authentication-Results: smtp15.mail.ru; auth=pass smtp.auth=kastian@mail.ru smtp.mailfrom=kastian@mail.ru X-E1FCDC63: 8B07640A20C3E016F2ABB0BF5CAA05F9092611B121F4B2B0 X-E1FCDC64: F70952F79D54F8AD2F9C3528CBAE56979EECE22380845B20900AC5B35568A05F X-Mailru-Sender: FD668448AC40568882DD66648ECA6862AC8C5BB607D92A7E29CDC73F3EEBFAFFF568B6667A835E98DDDE7B70B5F5C79F X-Mras: OK X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 94.100.176.133 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111955 Archived-At: On Wed, Dec 14, 2016 at 11:48:01AM +0100, tomas@tuxteam.de wrote: > Or, just "pulling in" the sed (and consolidating it with the already > present `replace-regexp-in-string'): > > (replace-regexp-in-string > "^.* \\([0-9]+\\)x\\([0-9]+\\) \\(:?.\\|\n\\)*$" > "width=\\1 height=\\2" > (shell-command-to-string > (format "identify %s" filename))) Great idea. > The funny construction at the end of regexp \\(:.\\|\n\\) is there > because dot alone won't match the \n. I don't know whether this > can be expressed more readably/elegantly. "^.* \\([0-9]+\\)x\\([0-9]+\\) .*\n$" works well. Or "^.*\\([0-9]+\\)x\\([0-9]+\\) .*\n?$" if we not sure if there is an '\n' at the end of string