Commit graph

256 commits

Author SHA1 Message Date
Ted Zlatanov
8f2be364dc eww: Revert 2013-12-11T19:01:44Z!tzz@lifelogs.com UI wrappers (eww-exit, eww-close)
* net/eww.el (eww-exit, eww-close, eww-mode-map): Revert change of
2013-12-11T19:01:44Z!tzz@lifelogs.com.
2013-12-19 11:25:25 -05:00
Juri Linkov
7a409b3005 * lisp/menu-bar.el (menu-bar-tools-menu): Add `browse-web'.
* lisp/startup.el (fancy-startup-screen, fancy-about-screen):
Set browse-url-browser-function to eww-browse-url locally.
(Bug#14751)

* lisp/net/browse-url.el (browse-url-browser-function): Move `eww'
closer to similar functions.

* lisp/net/eww.el (browse-web): Add alias to `eww'.
(eww-mode-map): Bind "r" to `eww-forward-url' like in Info.
Bind "S-SPC" to `scroll-down-command'.  (Bug#16178)
2013-12-17 23:17:05 +02:00
Lars Magne Ingebrigtsen
1c4b1e6107 * net/shr.el (shr-tag-a): Support zero-length <a name="foo"> elements. 2013-12-17 00:40:17 +01:00
Lars Magne Ingebrigtsen
11bade0ad8 eww anchor pointer movement fixup
* net/eww.el (eww-display-html): If we can't find the anchor we're
looking for, then go to point-min.
2013-12-17 00:29:47 +01:00
Ted Zlatanov
f4fe8fdd37 eww: exit and close actions
* net/eww.el (eww-exit, eww-close): Add UI convenience wrappers.
(eww-mode-map): Use them.
2013-12-11 14:01:44 -05:00
Kenjiro NAKAYAMA
b68cf43cfb eww easy-menu fixes
* net/eww.el (eww-mode-map): Instead of "Quit" show "Exit" and
"Close browser" menu items.  Fix wrong function of "List
bookmarks".
2013-12-10 19:27:27 -05:00
Ted Zlatanov
ff69c18f0c eww: add command to view page source
* net/eww.el (eww-current-source): New variable to store page
source.
(eww-display-html, eww-mode, eww-save-history)
(eww-restore-history): Use it.
(eww-view-source): New command to view page source.
Opportunistically uses `html-mode' to highlight the buffer.
(eww-mode-map): Install it.
2013-12-05 11:04:53 -05:00
Katsumi Yamaoka
39fa32d635 lisp/net/eww.el (eww-render): Don't pass arg to eww-display-image 2013-12-03 04:54:17 +00:00
Paul Eggert
f224e50022 Spelling and punctuation fixes. 2013-12-01 14:33:13 -08:00
Lars Magne Ingebrigtsen
1f6e1bb000 eww: Have q' do a normal quit-window' instead of killing the buffer. 2013-12-01 18:00:04 +01:00
Rüdiger Sonderfeld
4570dd1614 Allow customizing the checkboxes in eww
* net/shr.el (shr-tag-table): Fix comment typo.

* net/eww.el (eww-text-input-types): : New const.
(eww-process-text-input): Treat input types in
`eww-text-input-types' as text.

* net/shr.el (shr-tag-video): Display content for video if no
poster is available.
(shr-tag-audio): Add support for <audio> tag.

* net/eww.el (eww-use-external-browser-for-content-type): New
variable.
(eww-render): Handle `eww-use-external-browser-for-content-type'.
Use \\` to match beginning of string instead of ^.
(eww-browse-with-external-browser): Provide optional URL parameter.
(eww-render): Set `eww-current-title' back to "".

* 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.

* net/eww.el (eww-form-checkbox-selected-symbol): New
customizable variable.
(eww-form-checkbox-symbol): New customizable variable.
(eww-form-checkbox): Use `eww-form-checkbox-selected-symbol' and
`eww-form-checkbox-symbol'.
(eww-toggle-checkbox): Use `eww-form-checkbox-selected-symbol' and
`eww-form-checkbox-symbol'.
2013-12-01 16:52:04 +01:00
Rüdiger Sonderfeld
450c7b358c (eww-render): Set `eww-current-title' back to "". 2013-12-01 16:47:37 +01:00
Lars Magne Ingebrigtsen
eff0a2bda9 Fix typo after manual merge in last checkin. 2013-12-01 16:45:49 +01:00
Rüdiger Sonderfeld
b2afb3ea3e Option to always use external-browser for certain content.
* net/eww.el (eww-use-external-browser-for-content-type): New
variable.
(eww-render): Handle `eww-use-external-browser-for-content-type'.
Use \\` to match beginning of string instead of ^.
(eww-browse-with-external-browser): Provide optional URL parameter.
2013-12-01 16:44:25 +01:00
Rüdiger Sonderfeld
10240949ca Treat HTML5 input types as text
* net/eww.el (eww-text-input-types): : New const.
(eww-process-text-input): Treat input types in
`eww-text-input-types' as text.
2013-12-01 16:38:43 +01:00
Lars Magne Ingebrigtsen
1af6643718 Compilation warning fix
Move eww-link-keymap definition to before usage

Fixes: debbugs:15243
2013-12-01 15:45:02 +01:00
Lars Magne Ingebrigtsen
de8a5633bd Special mode buffers shouldn't query before exiting.
(eww-quit): Special mode buffers shouldn't query before exiting.
2013-12-01 15:22:03 +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
Kenjiro NAKAYAMA
9dd99753de Support <optgroup> tags in <select> forms.
* net/eww.el (eww-tag-select): Support <optgroup> tags in <select>
forms.

Test case:

<html>
<head><title>SELECT TEST</title></head>
<body>

<form method="POST" action="./dummy.php">
<input type="text" name="text1">
<input type="submit" name="btn1" value="val1">

<select>
<optgroup label="group 1">
<option value="a">Value A</option>
<option value="b">Value B</option>
</optgroup>
<optgroup label="group 2">
<option value="c">Value C</option>
<option value="d">Value D</option>
</optgroup>
</select>

</form>
</body>
</html>

Fixes: debbugs:15860
2013-12-01 14:21:53 +01:00
Lars Magne Ingebrigtsen
ab6dea82bf (eww-current-dom): New variable used to save the current DOM.
Rewritten from a short patch by T.V. Raman.
2013-12-01 14:11:36 +01:00
Lars Magne Ingebrigtsen
3e9876dedc Update the window title after moving in the history
* net/eww.el (eww-restore-history): Update the window title after
moving in the history.
2013-12-01 14:05:26 +01:00
Ted Zlatanov
e47112ee5d eww usability improvements
* net/eww.el (eww-bookmark-browse): Use 'eww-browse-url'.
(eww-add-bookmark): ask confirmation when add to bookmarks
(eww-quit): ask confirmation before quitting eww
2013-11-26 15:05:48 -05:00
Ted Zlatanov
604ede6c07 net/eww.el: Detect localhost and similar patterns. 2013-11-21 11:41:35 -05:00
Glenn Morris
62ad85e6af * net/eww.el (eww-render): Always set eww-current-url, and update header line.
(eww-display-html): ... Rather than just doing it here.

Fixes: debbugs:15622
2013-10-15 18:30:55 -07:00
Glenn Morris
5148da153e * net/eww.el (libxml-parse-html-region): Declare.
(eww-display-html): Explicit error if no libxml2 support.
2013-09-17 21:48:55 -07:00
Daniel Hackney
6c42fc3efb * lisp/dired-x.el:
* lisp/net/ange-ftp.el:
* lisp/net/browse-url.el:
* lisp/net/dbus.el:
* lisp/net/eudc.el:
* lisp/net/eudcb-ldap.el:
* lisp/net/eww.el:
* lisp/net/imap.el:
* lisp/printing.el:
* lisp/vc/ediff-diff.el:
* lisp/vc/ediff-init.el:
* lisp/vc/ediff-merg.el:
* lisp/vc/ediff-mult.el:
* lisp/vc/ediff-util.el:
* lisp/vc/ediff-wind.el:
* lisp/vc/ediff.el:
* lisp/vc/emerge.el:
* lisp/vc/pcvs.el:
* vc/vc-annotate.el: Prefix unused arguments with `_' to silence
byte compiler.  Remove some unused let-bound variables.
2013-09-04 23:30:07 -04:00
Stefan Monnier
fde38d4978 * lisp/finder.el (finder-compile-keywords): Don't mess with windows.
* lisp/net/eww.el (eww-display-raw): Remove unused argument `charset'.
Update call to it.
(eww-change-select): Remove unused var `properties'.
(eww-make-unique-file-name): Remove unused var `base'.
2013-09-03 15:49:54 -04:00
Glenn Morris
6ee877c795 * lisp/net/eww.el (eww-mode-map): Lower-case menu bar entries look bad.
(If "eww" is supposed to be an acronym then maybe capitalize the whole thing.)
2013-08-28 21:17:10 -04: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
Lars Magne Ingebrigtsen
3e41a054bf * net/eww.el (eww-display-html): Ignore coding system errors.
One web site uses "utf-8lias" as the coding system.
2013-08-11 23:51:10 +02:00
Lars Magne Ingebrigtsen
997798bf65 (eww-setup-buffer): Switching to the buffer seems more natural than popping. 2013-07-30 16:31:51 +02:00
Lars Magne Ingebrigtsen
dfbc66e3e4 eww textarea input fixup
* net/eww.el (eww-process-text-input): Allow inputting when the
point is at the start of the line, as the properties aren't
front-sticky.
2013-07-19 16:44:16 +02:00
Ivan Kanis
75dbaf9d8b * net/eww.el: Autoload `eww-browse-url'. 2013-06-28 09:54:42 +02:00
Leo Liu
99906aa0d9 * net/eww.el (eww-read-bookmarks): Check file size. 2013-06-27 12:27:53 +08:00
Lars Magne Ingebrigtsen
47fd571be7 (eww-bookmark-browse): Don't bug out if it's the only window. 2013-06-26 19:14:46 +02:00
Lars Magne Ingebrigtsen
a285ce999f (eww-add-bookmark): Remove newlines from the title. 2013-06-26 18:59:21 +02:00
Lars Magne Ingebrigtsen
2b4f050643 Add bookmark support to eww
* net/eww.el (eww-mode): Undo isn't necessary in eww buffers,
probably.
(eww-mode-map): Add a menu bar.
(eww-add-bookmark): New command.
(eww-bookmark-mode): New mode and commands.
2013-06-26 18:54:48 +02:00
Lars Magne Ingebrigtsen
23a75d7f59 (eww-mode-map): Add a menu bar. 2013-06-26 15:07:24 +02:00
Lars Magne Ingebrigtsen
843571cba9 Implement a command and mode for displaying and editing cookies 2013-06-26 14:54:33 +02:00
Lars Magne Ingebrigtsen
26bf2b82d8 (eww-render): Move the history reset to the correct buffer. 2013-06-26 00:29:01 +02:00
Lars Magne Ingebrigtsen
8308f18498 * net/eww.el: Rework history traversal.
When going forward/back, put these actions into the history, too, so
that they can be replayed.
2013-06-26 00:24:43 +02:00
Ivan Kanis
bfbc93a1de * net/eww.el (eww-download): New command and keystroke.
* net/eww.el (eww-make-unique-file-name): Create a unique file
name before saving to entering `y' accidentally asynchronously.
2013-06-25 21:50:05 +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
Lars Magne Ingebrigtsen
d3f0f918e9 (eww-forward-url) Allow going forward in the history, too.
This may not be the most intuitive way to implement this.  Perhaps
following links should flush "forwards"...
2013-06-25 17:39:13 +02:00
Lars Magne Ingebrigtsen
e82b099100 (eww) Reimplement the history functionality
* net/eww.el (eww-back-url): Implement the history by stashing all
the data into a list.
2013-06-25 16:59:13 +02:00
Lars Magne Ingebrigtsen
be549ce6f9 * net/eww.el (eww): Start of strings is \\`, not ^. 2013-06-24 19:42:22 +02:00
Ivan Kanis
71d4c19d3d * net/eww.el (eww): Add a trailing slash to domain names. 2013-06-24 19:38:51 +02:00
Lars Magne Ingebrigtsen
0ebd92a3e9 * net/eww.el (eww-external-browser): Moved to shr. 2013-06-24 15:57:35 +02:00
Ivan Kanis
b89fc1569b eww improvements
* net/eww.el (eww): Work more correctly for file: URLs.
(eww-detect-charset): Allow quoted charsets.
(eww-yank-page-url): New command and keystroke.
2013-06-24 15:42:07 +02:00
Ivan Kanis
e854cfc719 * net/eww.el: Bind `C-c C-c' to "submit" in all form keymaps. 2013-06-23 20:29:30 +02:00