Commit graph

31 commits

Author SHA1 Message Date
Lars Magne Ingebrigtsen
e330b64699 * net/shr.el (shr-tag-img): Don't bug out on <img src=""> data. 2013-12-07 02:44:15 +01:00
Paul Eggert
f224e50022 Spelling and punctuation fixes. 2013-12-01 14:33:13 -08:00
Rüdiger Sonderfeld
ad9a773c50 Allow preferring some media types over others
* net/shr.el (shr-prefer-media-type-alist): : New customizable
variable.
(shr--get-media-pref): New function.
(shr--extract-best-source): New function.
(shr-tag-video, shr-tag-audio):  Use `shr--extract-best-source' when
no :src tag was specified.
2013-12-01 16:49:18 +01:00
Rüdiger Sonderfeld
eb2dd24d5b (shr-tag-audio): Add support for <audio> tag. 2013-12-01 16:41:10 +01:00
Rüdiger Sonderfeld
177948a5b2 Display content for video if no poster is available.
* net/shr.el (shr-tag-video): Display content for video if no
poster is available.
2013-12-01 16:40:12 +01:00
Rüdiger Sonderfeld
8feacce0ea Fix comment typo
* net/shr.el (shr-tag-table): Fix comment typo.
2013-12-01 16:35:59 +01:00
Lars Magne Ingebrigtsen
513562a1df Don't reload eww pages when browsing to different #targets
* net/eww.el (eww-follow-link): New command to avoid reloading
pages when we follow #target links.

Fixes: debbugs:15243
2013-12-01 15:12:44 +01:00
Glenn Morris
986ed13557 * net/shr.el (image-size, image-animate): Declare. 2013-09-17 21:53:05 -07:00
Lars Magne Ingebrigtsen
4b5fe4ee09 * net/shr.el (shr-rescale-image): Use ImageMagick even for GIFs
Now that Emacs supports ImageMagick animations.
2013-08-16 17:17:21 +02:00
Lars Magne Ingebrigtsen
c6b7ccaaf6 Rename :content-type to :format in `create-image' 2013-08-13 22:13:02 +02:00
Lars Magne Ingebrigtsen
21c58ae2a8 Make shr feed Content-Type to the image-creating libraries
This finally makes it possible to display icons.

* net/eww.el (eww-display-image): Ditto.

* net/shr.el (shr-parse-image-data): New function to grab both the
data itself and the Content-Type.
(shr-put-image): Use it.
2013-08-13 20:09:50 +02:00
Glenn Morris
af1c6c8493 Fix some custom types
* gnus/gnus.el (gnus-valid-select-methods): Fix type.

* gnus/nnimap.el (nnimap-request-articles-find-limit): Fix type, version.

* net/shr.el (shr-table-horizontal-line): Fix custom type.
2013-08-13 00:18:50 -07:00
Lars Magne Ingebrigtsen
2122cb6dd2 Further shr width computation fixes
(shr-make-table-1): Redo last change to fix the real problem in
colspan handling.
2013-08-07 00:05:33 +02:00
Lars Magne Ingebrigtsen
ec6a2d7a5a shr table rendering touch-ups
* net/shr.el (shr-render-td): Remove debugging.
(shr-render-td): Make width computation consistent by defaulting
all zero-width columns to 10 characters.  This may not be optimal,
but it's at least consistent.
2013-08-06 23:28:38 +02:00
Lars Magne Ingebrigtsen
1211de5030 * net/shr.el (shr-mouse-browse-url): Remove and use `shr-browse-url'. 2013-07-30 16:58:37 +02:00
Lars Magne Ingebrigtsen
5a2a77359a (shr-urlify): Highlight under mouse. 2013-07-30 16:27:04 +02:00
Lars Magne Ingebrigtsen
d50fceab31 * net/shr.el (shr-urlify): Put `follow-link' on URLs.
Fixes: debbugs:14815
2013-07-30 16:25:11 +02:00
Lars Magne Ingebrigtsen
8ba8eec59b * net/shr.el (shr-mouse-browse-url): New command and keystroke.
Fixes: debbugs:14815
2013-07-19 16:57:28 +02:00
Lars Magne Ingebrigtsen
48494e063a (shr-make-table-1): Ensure that we don't infloop on degenerate widths. 2013-07-19 16:07:43 +02:00
Lars Magne Ingebrigtsen
2d756ae0d8 * net/shr.el (shr-map): Reinstate the `u' key binding
It's been used a while.
2013-07-08 13:19:51 +02:00
Lars Magne Ingebrigtsen
2fae38e5f9 Fix shr table rendering infloop
* net/shr.el (shr-make-table-1): Add a sanity check that allows
progression on degenerate tables.
(shr-rescale-image): ImageMagick animated images currently doesn't
work.
2013-06-30 15:11:41 +02:00
Ivan Kanis
eadb606887 * net/shr.el (shr-render-region): New function. 2013-06-28 09:57:49 +02:00
Lars Magne Ingebrigtsen
7f13406b7a * net/shr.el (add-face-text-property): Removed compat definition. 2013-06-27 11:01:08 +02:00
Lars Magne Ingebrigtsen
16f74f10ba Use `w' for copying URLs in shr and eww
* net/eww.el (eww-mode-map): Ditto.

* net/eww.el (eww-copy-page-url): Changed name of command.

* net/shr.el (shr-map): Change `shr-copy-url' from `u' to `w' to
be more consistent with Info and dired.
2013-06-25 21:25:14 +02:00
Ivan Kanis
5196f88a95 * net/shr.el (shr-browse-url): Fix interactive spec. 2013-06-24 19:41:26 +02:00
Lars Magne Ingebrigtsen
bdaa086b77 * net/shr.el (shr-browse-url): Use an external browser if given a prefix. 2013-06-24 16:03:26 +02:00
Lars Magne Ingebrigtsen
0ebd92a3e9 * net/eww.el (eww-external-browser): Moved to shr. 2013-06-24 15:57:35 +02:00
Lars Magne Ingebrigtsen
f3f9606c7a Implement :max-width/:max-height for (ImageMagic) images
* doc/lispref/display.texi (ImageMagick Images): Mention :max-width and
:max-height.

* lisp/net/shr.el (shr-rescale-image): Use the new
:max-width/:max-height functionality.

* src/image.c (compute_image_size): New function to implement
:max-width and :max-height.
(imagemagick_load_image): Use it.
2013-06-23 21:24:27 +02:00
Gnus developers
970ad972b9 Merge changes made in Gnus master
2013-06-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
* net/eww.el (eww-process-text-input): Display passwords as asterisks.
* net/shr.el (shr-make-table-1): Protect against invalid column-spans.

2013-06-19  Tom Tromey  <tromey@redhat.com>
* net/eww.el (eww-top-url): Remove.
(eww-home-url, eww-start-url, eww-contents-url): New defvars.
(eww-render): Set new variables.  Don't set eww-top-url.
(eww-handle-link): Handle "prev", "home", and "contents".
Downcase the rel text.
(eww-top-url): Choose best top URL.

2013-06-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
* net/eww.el: Rewrite to implement form elements "by hand" instead of
relying in widget.el.  Using widget.el leads to too many
user interface inconsistencies.
(eww-self-insert): Implement entering commands in text fields.
(eww-process-text-input): New function to make text input field editing
work.
(eww-submit): Rewrite to use the new-style form methods.
(eww-select-display): Display the correct selected item.
(eww-change-select): Implement changing the select value.
(eww-toggle-checkbox): Implement radio/checkboxes.
(eww-update-field): Fix compilation error.
(eww-tag-textarea): Implement <textarea>.
* net/shr.el (shr-urlify): Use `keymap' instead of `local-map' so that we
don't shadow mode-specific bindings.
* net/eww.el (eww-browse-url): Don't push stuff onto history if there's
nothing to push.
* net/shr.el (shr-map): Bind [down-mouse-1] to browse URLs.
2013-06-19 22:28:04 +00:00
Gnus developers
924d699786 Merge changes made in Gnus master
2013-06-18 Teodor Zlatanov <tzz@lifelogs.com>
* auth-source.el (auth-source-netrc-parse-entries): Remove debugging.

2013-06-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-make-table-1): Implement <td rowspan>.
(shr-table-horizontal-line): Allow nil as a value, and change the default.
(shr-insert-table-ruler): Respect the nil value.

2013-06-18 Tom Tromey <tromey@barimba>
* net/eww.el (eww-next-url, eww-previous-url, eww-up-url, eww-top-url):
  New defvars.
(eww-open-file): New defun.
(eww-render): Initialize new variables.
(eww-display-html): Handle "link" and "a".
(eww-handle-link, eww-tag-link, eww-tag-a): New defuns.
(eww-mode-map): Move "p" to "l".  Bind "p", "n", "t", and "u".
(eww-back-url): Rename from eww-previous-url.
(eww-next-url, eww-previous-url, eww-up-url, eww-top-url): New defuns.
2013-06-18 22:38:34 +00:00
Glenn Morris
4ba54f7d9d Move some files from gnus/ to net/
Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00567.html
2013-06-18 14:04:09 -04:00
Renamed from lisp/gnus/shr.el (Browse further)