From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#19462: shr: use wrap-prefix when possible, instead of filling the text Date: Sun, 27 Dec 2015 12:16:48 +0100 Message-ID: <567FC8A0.6090100@gmail.com> References: <83fvc5ni0u.fsf@gnu.org> <87k31fwwyv.fsf@ferrier.me.uk> <87bnmq9ibf.fsf@ferrier.me.uk> <87lhlrx5fc.fsf@building.gnus.org> <878uhrcr5l.fsf@building.gnus.org> <83sifzjflk.fsf@gnu.org> <87egric2ki.fsf_-_@violet.siamics.net> <87bn9ezb2h.fsf@gnus.org> <567D8E43.8030408@gmail.com> <87y4ciwe6g.fsf@gnus.org> <567DC781.8040306@gmail.com> <87lh8iuoq1.fsf@gnus.org> <567EC613.6050901@gmail.com> <567F5CC8.5080505@gmail.com> <567F66D7.1020708@gmail.com> <87ege8jtq8.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Iwxo4nRilXaBoeobuisIOHXXPQjR1canN" X-Trace: ger.gmane.org 1451215102 22923 80.91.229.3 (27 Dec 2015 11:18:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Dec 2015 11:18:22 +0000 (UTC) Cc: 19462@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 27 12:18:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aD9L0-0005Pd-L1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Dec 2015 12:18:10 +0100 Original-Received: from localhost ([::1]:41287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aD9Kz-0008EH-Vi for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Dec 2015 06:18:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aD9Kv-0008E7-LZ for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 06:18:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aD9Ks-0002nl-Ep for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 06:18:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aD9Ks-0002nh-Al for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 06:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aD9Ks-0004Wc-2P for bug-gnu-emacs@gnu.org; Sun, 27 Dec 2015 06:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Dec 2015 11:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19462 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19462-submit@debbugs.gnu.org id=B19462.145121502317327 (code B ref 19462); Sun, 27 Dec 2015 11:18:02 +0000 Original-Received: (at 19462) by debbugs.gnu.org; 27 Dec 2015 11:17:03 +0000 Original-Received: from localhost ([127.0.0.1]:42438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aD9Jv-0004VP-Dv for submit@debbugs.gnu.org; Sun, 27 Dec 2015 06:17:03 -0500 Original-Received: from mout.kundenserver.de ([217.72.192.73]:64808) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aD9Jt-0004Up-4M for 19462@debbugs.gnu.org; Sun, 27 Dec 2015 06:17:01 -0500 Original-Received: from [192.168.1.82] ([109.24.225.43]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MQ6Al-1a7weq0NNb-005L8q; Sun, 27 Dec 2015 12:16:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <87ege8jtq8.fsf@gnus.org> X-Provags-ID: V03:K0:KUX5QLxJZcTp1bHVSoSJJfjISvCLh6LFZuGY3WVjJgIGk6xydhA ZGxr76BOR8kSLaIImTb4d2LPN8byWgdcQMIXxVP9mY0Yzw/tqsh6QjZfw/ZWOFResMLwsgh D0A6aoOvO0eNrpc02F0+QcCpXK4P8Tc3rvrcTdmjV077WBYMHp6nc5QA8MOZ4VfoEaC1lLz 5D5qJ7jMZGMhvqLy/tZGw== X-UI-Out-Filterresults: notjunk:1;V01:K0:c/mKfx1R/j0=:0CvJB6ijCKT0qZHL+B7T3/ ckx/L5sw8IJFOlRLsAOa1y3/UkW+scASanZ+3pqvgxTsDaNrlGE76ykFKtcGknahXF3115acb tHmxUh0QmPgnB6yhDb0TwHKGE4glJ8wF9qM5OEz8wxRLD9YVI2x6ezJiimXFRSfQth3/qVpYm uLjuTQ330sPWNo7Xen/J9uxGafUJvD3F2ukGSpFItvPcmDxi80kfQJLpMLyeqX6NdgzUHoZhc nMcdux4WXlRcvdg/DzNXv2wOAjFoKLh+I/KhRKIC0i68S8yxZmlYUVcswnCZe9LLA5lLvrbeN 82NNUIw1WDlquJuwqBKstrj4gNE7EjOec0Y2bpPdE5WkyBG6ZMfl78Fb4lHh66fXMxAiEFN0X nbuutdJfcKGLZwCajKlkOKla/6AJ3Q+xfwhkhnu5hZVEWCrPvI7UTAMXhsfqRc9FuQ41vfbhL AVy3U5E4d7SVgESrFiT6zTz0IDoRW6LuctRQ/B3tUkF4ncd73RbYWyDL/b0DqHP2F94ybukVa io7KQYnSVSsPp/m27cka3URhjlGKBeOJHjkdMokwqoCRpg7i2mRFjjrVJU6BSiGS3FrDQyyMC 7D61Qmxn9u5FmufAU+QrJAlmJBAsPpxGrEsfPtTcV5xAJl6V+a8DbzbeQz3r5TLESXVroiYct 8GTjx5UJrkUjDVPmqMm5+9EGLCNOgNnp3eL54c1ZyRixq3cpjqp7/kjCS3vrdkBFbSSU= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110779 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Iwxo4nRilXaBoeobuisIOHXXPQjR1canN Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/27/2015 07:22 AM, Lars Ingebrigtsen wrote: > Cl=E9ment Pit--Claudel writes: >=20 >> I looked into this more, but I don't think it will work. I want to >> highlight the context of the element that contains the target id, so >> if lines are not broken up then highlighting the full line works >> well. If they are, on the other hand, then I can't tell how much >> surrounding text to highlight. >=20 > I'm not sure what you mean by "context". But you can look "down" into > the DOM and see if your id is in an element there. Or you can transfor= m > the HTML, or transform the DOM, to wrap the elements you want to > highlight. >=20 > For instance, you can loop over all elements that have ids that match > with `dom-by-id', and you can alter the DOM to insert, say, h1 elements= > around those that you want to have highlit. Thanks for the suggestions. It's not always obvious what element I want t= o highlight, though, beyond "everything that ends up on the same line. It= may be that the thing I want to draw the attention of the user to is in = a paragraph; in that case, I highlight the full paragrahp. Or it may be i= n a title; in that case, I highlight the full title. Or it may be part of= a list; in that case I only highlight the item that contains it. When the text that shr inserts isn't wrapped, I just need to highlight th= e line that contains that text after rendering is complete. When it is wr= apped, however, it becomes unclear what exactly to highlight. Cl=E9ment. --Iwxo4nRilXaBoeobuisIOHXXPQjR1canN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJWf8imAAoJEPqg+cTm90wjtkAP/Aik+yY4fO+wx6nkiNzO52D4 6RGao2WX3MrYHZbmsuAD34KMqdIRw2P4uVZFuvMmsjvNJ2o3MNbcU+lH9O87cvsd vQS7fL4H6/80th3bteSyA7CB3n7vY4qHameLhWDHeSxnsxbD2pZOhHO50zKDZF5l gVjFQ7MZiPh5W4dPQ1Y11haGqSjFYdIOli7htnYnD0vuWuBkQmqanDq5ugyh87th LKaA4DsZmsCsn8FpmXP+lxVbBMNJuNzomaRExfS+NF0uZ/t0EqAjyOgSN0BkFzOz VfzykidpnfKa8dSq9EQjjdTEmHrJA2/BakFB8iDF588w9uR7y7UZjdFrIwL0+XKN vDGaEpOeBVoD2MUkMEumq/SLbB5VYs64pE3FLj90g5J0nsfLeWAJTe37HSyp9o8f QMW6DTru088Xc5CADI9j20vmWcmdkloefFJB5h6rclnOUA5nszmvlM3Cu36BU++v W0x5qTgGT1Y6GTVG6fMQ5b7+hTmbMe3quToZLdl4nLXvfqzep1n2zOVnIxrXbROf lF62kHfC+SY8qI+ec/0VVKJ9sXArbTiXrzKna3NveoObWEYbdAtj6Wh+XHcLB4zG sZeIxsIB+Wo9iS/1/UuIlMtGDE5KxC4ybALlhthaNLlBPY3L9WVBwn5zSaLFEVpw fK2/zQquEKznfPh6mhDi =3RlV -----END PGP SIGNATURE----- --Iwxo4nRilXaBoeobuisIOHXXPQjR1canN--