summaryrefslogtreecommitdiff
path: root/lisp/net/shr.el
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid jumbled order in HTML rendered by shr.elEli Zaretskii2017-11-251-1/+3
| | | | | | * lisp/net/shr.el (shr-render-td): Preserve point, as shr-render-td-1 might move it as a side effect of save-window-excursion. (Bug#29348)
* Fix the bug#24034 change (revno 9eb028f) causing infloop (bug#29047)Katsumi Yamaoka2017-10-301-3/+7
| | | | | * lisp/net/shr.el (shr-fill-line): Copy only face and image-displayer properties to gaps (bug#29047).
* Fix doc typosGlenn Morris2017-10-281-1/+1
| | | | | | | | | | | | * lisp/simple.el (line-move-ignore-invisible): * lisp/sort.el (sort-regexp-fields): * lisp/cedet/ede.el (project-add-file): * lisp/gnus/message.el (message-bogus-recipient-p): * lisp/international/mule.el (define-coding-system): * lisp/progmodes/ebrowse.el (ebrowse-member-buffer-object-menu): * lisp/progmodes/xscheme.el (xscheme-allow-output-p) (scheme-interaction-mode, scheme-debugger-mode) (xscheme-yank-pop, xscheme-yank-push): Doc fixes.
* Revert last change in 'shr-descend'Eli Zaretskii2017-10-061-2/+16
| | | | | | | * lisp/net/shr.el (shr-descend): Revert the part of the last change which introduced calls to shr-indirect-call into this function. Add a comment explaining the rationale for that. (Bug#28402)
* Support indirection for all shr-tag-* callsVasilij Schneidermann2017-10-051-16/+19
| | | | | | | | | | | | | The 'shr-external-rendering-functions' variable was previously only honored in the shr-descend function, now all direct calls to the shr-tag-* functions have been replaced by a call to 'shr-indirect-call' which tries using an alternative rendering function first. * lisp/net/shr.el (shr-indirect-call): New helper function. (shr-descend, shr-tag-object, shr-tag-video): (shr-collect-extra-strings-in-table): Fix callers to call via shr-indirect-call. (Bug#28402)
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Update uses of if-let and when-letMark Oteiza2017-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/dom.el (dom-previous-sibling): * lisp/emacs-lisp/package.el (package--with-work-buffer): (package--sort-deps-in-alist, package--sort-by-dependence): (package-install-from-archive, package-install): (package-menu-execute, package-menu--populate-new-package-list): * lisp/filenotify.el (file-notify--rm-descriptor): (file-notify--event-watched-file, file-notify--event-file-name): (file-notify--event-file1-name, file-notify-rm-watch): (file-notify-valid-p): * lisp/gnus/message.el (message-toggle-image-thumbnails): * lisp/gnus/nnimap.el (nnimap-request-move-article): * lisp/ibuf-ext.el (ibuffer-repair-saved-filters): * lisp/mpc.el (mpc-format): * lisp/net/eww.el (eww-tag-meta, eww-process-text-input): (eww-save-history): * lisp/net/shr.el (shr-tag-base, shr-tag-object, shr-make-table-1): * lisp/progmodes/prog-mode.el (prettify-symbols--post-command-hook): * lisp/svg.el (svg-remove): * lisp/textmodes/css-mode.el (css--named-color): (css--colon-inside-funcall): * lisp/textmodes/sgml-mode.el (html-current-buffer-classes): (html-current-buffer-ids): Use if-let* and when-let* instead.
* Ensure that we parse images right in shr.elGrégoire Jadi2017-07-241-0/+1
| | | | | | * lisp/net/shr.el (shr-image-fetched): Go back to the beginning of the buffer before trying to parse the image fetched.
* Fix image/svg+xml display in shrLars Ingebrigtsen2017-07-231-1/+1
| | | | | | * lisp/net/shr.el (shr-put-image): Display svg images as svg (bug#27799). I suspect the previous change was checked in by accident in conjuction with some other svg changes.
* Split shr-copy-url dwim behavior into separate functions (Bug#26826)Noam Postavsky2017-07-021-35/+51
| | | | | | | | | | * lisp/net/shr.el (shr-url-at-point, shr-probe-url) (shr-probe-and-copy-url, shr-maybe-probe-and-copy-url): New functions, split out from `shr-copy-url'. (shr-copy-url): Only copy the url, don't fetch it. (shr-map): Bind 'w' and 'u' to `shr-maybe-probe-and-copy-url', which has the same behavior as the old `shr-copy-url'. * etc/NEWS: Announce changes.
* * lisp/net/shr.el (shr-fill-text): Actually fill the text. (Bug#27399)Glenn Morris2017-06-221-0/+1
|
* * lisp/net/shr.el: Use cl-lib instead of cl.Stefan Monnier2017-05-231-14/+15
|
* Avoid unnecessary loading of subr-x at run-timeGlenn Morris2017-04-181-1/+1
| | | | | | | | | | * lisp/doc-view.el, lisp/filenotify.el, lisp/info-look.el: * lisp/svg.el, lisp/emacs-lisp/byte-opt.el, lisp/net/shr.el: * lisp/textmodes/sgml-mode.el, test/lisp/dom-tests.el: No need to load subr-x at run-time. * lisp/gnus/nnheader.el: No need to load subr-x. ; * lisp/emacs-lisp/subr-x.el, lisp/gnus/message.el, lisp/net/nsm.el: ; Comments.
* shr-image-fetched: Work for narrowed Gnus articleKatsumi Yamaoka2017-03-271-11/+13
| | | | | | See <8737e3msun.fsf@gmail.com> of bug#26231 in the bug-gnu-emacs list. * lisp/net/shr.el (shr-image-fetched): Work for narrowed article.
* Fix issues with dedicated windows in shr.elDavid Bremner2017-03-041-0/+6
| | | | | | | | * lisp/net/shr.el (shr-pixel-buffer-width, shr-render-td-1): Make the window not dedicated, to avoid errors if it was, before setting its buffer temporarily. (Bug#25828) Copyright-paperwork-exempt: yes
* Fix rendering of some complex SVG imagesLars Ingebrigtsen2017-01-241-5/+7
| | | | | | * lisp/net/shr.el (shr-parse-image-data): Don't transform SVG->DOM->XML unless we're blocking images, as this is apt to destroy the SVG (bug#24111).
* Clarify the last clarificationLars Ingebrigtsen2017-01-241-2/+2
| | | | | * lisp/net/shr.el (shr-width): Clarify the interaction with `shr-use-fonts' (bug#24928).
* shr-width doc clarificationLars Ingebrigtsen2017-01-241-2/+3
| | | | | * lisp/net/shr.el (shr-width): Clarify the interaction with `shr-use-fonts' (bug#24928).
* Allow passing in max-width/heightLars Ingebrigtsen2017-01-241-4/+11
| | | | | * lisp/net/shr.el (shr-rescale-image): Allow passing in max-width/height (bug#25287).
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.
* | Merge from origin/emacs-25Paul Eggert2016-12-071-0/+3
|\| | | | | | | | | | | | | 3d63b48 Update ChangeLog files and authors.el 9d30264 Fix menu bindings of Dired 'A' and 'Q' commands a725592 Avoid errors in shr-pixel-column due to dedicated windows 3138598 Update format-time-string documentation
| * Avoid errors in shr-pixel-column due to dedicated windowsEli Zaretskii2016-11-201-0/+3
| | | | | | | | | | | | * lisp/net/shr.el (shr-pixel-column): If we are switching to another buffer in the selected window, make that window temporarily non-dedicated. (Bug#24950)
| * * lisp/net/shr.el (shr-fill-line): Withdraw the last commit (4157159).Katsumi Yamaoka2016-07-211-4/+5
| |
| * * lisp/net/shr.el (shr-fill-line):Katsumi Yamaoka2016-07-201-5/+4
| | | | | | | | Preserve text properties in folded lines (bug#24034).
| * Render empty <ul><li><ul> correctlyLars Magne Ingebrigtsen2016-03-201-0/+4
| | | | | | | | | | | | | | | | * lisp/net/shr.el (shr-tag-ul): Render empty <ul><li><ul> correctly (bug#22964). (cherry picked from commit 4f6ea3988b66cf132c67fd0cc26d12eb9a300ba1) Backport:
| * Ignore invalid base64 encoded embedded imagesLars Magne Ingebrigtsen2016-03-201-1/+2
| | | | | | | | | | | | | | | | * lisp/net/shr.el (shr-image-from-data): Ignore invalid base64 encoded embedded images (bug#22928). (cherry picked from commit f2da80d0e1ccd121c4891e869a45aeb9c6b1795d) Backport:
| * Fix <p> and <div> newlines with or without <li> in shrLars Magne Ingebrigtsen2016-03-201-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/shr.el (shr-ensure-newline): Respect that we're in a <li>, if we are, and don't insert newlines there. (shr-ensure-paragraph): When mixing newlines and paragraph ensurements, don't insert too many blank lines. (shr-tag-div): A <div> shouldn't introduce a paragraph, but a new line. (cherry picked from commit 292921facaff2f02ac4e8602c1f7ecbdcfe7ef45) Backport:
| * Use the correct background color when filling nested <divs>Lars Ingebrigtsen2016-02-291-1/+2
| | | | | | | | | | | | | | | | | | * lisp/net/shr.el (shr-face-background): Return the first background, because that's the one that's visible (bug#22680). Backport: (cherry picked from commit cad0bc70558f9c28c808711c5295dec9fc5ad6e5)
| * Make <div> in <li> not insert extra newlinesLars Ingebrigtsen2016-02-291-1/+1
| | | | | | | | | | | | | | | | | | * lisp/net/shr.el (shr-tag-div): Make <div> in <li> not insert extra newlines (bug#19587). Backport: (cherry picked from commit 379a846b8548dc32a9019ef0a37c02f62cd9bad1)
* | shr.el: Don't render a normal table twiceKatsumi Yamaoka2016-11-291-3/+3
| | | | | | | | | | | | * lisp/net/shr.el (shr-collect-extra-strings-in-table): Don't render a table if it is called for the first time, IOW, recognize it to never be invalid (bug#25051).
* | Don't collect strings existing out of <tr>...</tr>Katsumi Yamaoka2016-11-211-11/+12
| | | | | | | | | | | | * lisp/net/shr.el (shr-collect-extra-strings-in-table): Don't collect strings existing out of <tr>...</tr> to avoid duplication with what `shr-tag-table' renders.
* | Update parameter :version to 26.1 in several defcustomTino Calancha2016-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following defcustom where added or modified for 25.2 release. In fact all these changes belong to 26.1 release. * lisp/battery.el (battery-linux-sysfs-regexp) * lisp/comint.el (comint-password-prompt-regexp) * lisp/dired.el (dired-always-read-filesystem) * lisp/image.el (image-scaling-factor) * lisp/ibuf-ext.el (ibuffer-never-search-content-name) (ibuffer-never-search-content-mode) * lisp/mouse.el (mouse-select-region-move-to-beginning) * lisp/net/net-utils.el (iwconfig-program, iwconfig-program-options) (netstat-program, route-program, route-program-options) * lisp/net/sieve-manage.el (sieve-manage-default-stream) * lisp/progmodes/grep.el (grep-save-buffers) * lisp/vc/add-log.el (change-log-directory-files) * lisp/url/url-vars.el (url-user-agent) * lisp/vc/vc-hg.el (vc-hg-symbolic-revision-styles) (vc-hg-use-file-version-for-mode-line-version) (vc-hg-parse-hg-data-structures) * lisp/wdired.el (wdired-create-parent-directories) * lisp/faces.el (homoglyph, nobreak-hyphen, read-multiple-choice-face) * lisp/gnus/gnus-art.el (gnus-article-encrypt-protocol) (gnus-button-url-regexp) * lisp/window.el (switch-to-buffer-preserve-window-point) * lisp/ibuffer.el (ibuffer-formats, ibuffer-locked-char) (ibuffer-locked-buffer) * lisp/textmodes/flyspell.el (flyspell-sort-corrections-function) * lisp/emacs-lisp/edebug.el (edebug-sit-on-break) * lisp/gnus/message.el (message-user-fqdn) * lisp/simple.el (shell-command-dont-erase-buffer) (extended-command-suggest-shorter) * lisp/net/shr.el (shr-use-fonts) * lisp/files.el (mounted-file-systems, kill-emacs-query-functions)
* | * lisp/net/shr.el (shr-collect-extra-strings-in-table): Fix indentation.Katsumi Yamaoka2016-11-141-2/+2
| |
* | * lisp/net/shr.el (shr-tag-table): Avoid duplication of images.Katsumi Yamaoka2016-11-141-41/+37
| | | | | | | | (shr-collect-extra-strings-in-table): Render images as well.
* | * lisp/net/shr.el (shr--preferred-image): Add CR to whitespace regexps.Katsumi Yamaoka2016-11-111-28/+42
| | | | | | | | | | (shr-collect-extra-strings-in-table): Render extra tables in an invalid html as well.
* | * lisp/net/shr.el (shr--preferred-image): Ignore whitespace (bug#24893).Katsumi Yamaoka2016-11-111-2/+4
| |
* | * lisp/net/shr.el (shr-collect-extra-strings-in-table) New functionKatsumi Yamaoka2016-11-041-0/+37
| | | | | | | | | | that gathers extra strings in an invalid html. (bug#24831) (shr-tag-table): Use it.
* | Turn on lexical-binding in some net libsMark Oteiza2016-10-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/dbus.el: Turn on lexical-binding. (dbus-list-hash-table, dbus-list-known-names): (dbus-introspect-get-node-names, dbus-introspect-get-interface-names): (dbus-introspect-get-method-names, dbus-introspect-get-signal-names): (dbus-introspect-get-property-names): (dbus-introspect-get-argument-names, dbus-get-all-properties): (dbus-property-handler, dbus-get-all-managed-objects): (dbus-managed-object-handler): Replace add-to-list with push. Add nreverse in some places where the APPEND argument of add-to-list was used. * lisp/net/network-stream.el: Turn on lexical-binding. * lisp/net/newsticker.el: Turn on lexical-binding. * lisp/net/shr.el: Turn on lexical-binding. (shr-make-placeholder-image): Remove unused variable binding. (shr-inspect-table): Replace ignored bindings with underscore.
* | Don't bug out on all-whitespace URLsLars Ingebrigtsen2016-09-141-3/+4
| | | | | | | | | | * lisp/net/shr.el (shr-expand-url): Don't bug out on degenerate all-whitespace URLs.
* | * lisp/net/shr.el (shr-fill-line):Katsumi Yamaoka2016-07-211-5/+4
| | | | | | | | Preserve text properties in folded lines (bug#24034).
* | Fix shr.el/image build problemLars Ingebrigtsen2016-07-201-0/+1
| | | | | | | | | | | | | | Fixes: bug#24035 * lisp/net/shr.el: Require image, since some builds seem to break without it (bug#24035).
* | Fix the prefix action of shr-copy-urlLars Magne Ingebrigtsen2016-06-271-2/+4
| | | | | | | | | | * lisp/net/shr.el (shr-copy-url): Make the command really copy the image url if given a prefix.
* | :max-width/height fixes for shr after the scaling changesLars Ingebrigtsen2016-05-141-2/+5
| | | | | | | | | | | | * lisp/net/shr.el (shr-rescale-image): Ensure that we respect max-width and max-height even after the scaling changes done earlier this year.
* | Support srcset in <img>Lars Ingebrigtsen2016-05-121-2/+40
| | | | | | | | | | * lisp/net/shr.el (shr--preferred-image): Allow <img> tags with srcset specifiers (bug#23459).
* | (shr-rescale-image): Clarify logic slightlyLars Ingebrigtsen2016-05-031-2/+2
| | | | | | | | * lisp/net/shr.el (shr-rescale-image): Clarify logic slightly.
* | Use Unicode literals instead of hex valuesLars Magne Ingebrigtsen2016-04-241-6/+6
| | | | | | | | | | | | * lisp/net/shr.el (shr-tag-bdo): Use Unicode literals instead of hex values for greater readability. (shr-tag-bdi): Ditto.
* | (shr-insert): Respect non-breaking space in non-<pre> textLars Magne Ingebrigtsen2016-03-251-11/+15
| | | | | | | | | | * lisp/net/shr.el (shr-insert): Respect non-breaking space in non-<pre> text.
* | Further empty <li> tweaksLars Magne Ingebrigtsen2016-03-201-1/+3
| | | | | | | | | | * lisp/net/shr.el (shr-tag-li): When showing several empty <li> elements, ensure that they really get inserted on a new line.
* | Don't remove too much white space at the end of documentsLars Magne Ingebrigtsen2016-03-201-5/+2
| | | | | | | | | | | | * lisp/net/shr.el (shr--remove-blank-lines-at-the-end): Don't remove too much white space -- leave it on the last line (in case there's a background color).