unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tomas Hlavaty <tom@logand.com>
To: Michael Heerdegen <michael_heerdegen@web.de>,
	"Basil L. Contovounesios" <contovob@tcd.ie>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org
Subject: Re: eww and bookmarks
Date: Sun, 07 Jun 2020 18:36:05 +0200	[thread overview]
Message-ID: <87v9k27s0a.fsf@logand.com> (raw)
In-Reply-To: <87img2c0rv.fsf@web.de>

Michael Heerdegen <michael_heerdegen@web.de> writes:
> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>> There's eww-after-render-hook.  Sample usage:
>> https://emacs.stackexchange.com/a/36287/15748
>
> Yes, I know about the hook.  But just binding it will not be enough
> because the binding will be gone when it is consulted.  We would have to
> add a self-removing function at least to the local binding of the hook.
> That's what I would call a hack.

eww-after-render-hook does not seem to be useable because it runs in the
wrong buffer at the wrong time.

I hit the issue when implementing the following use-case:

1) Open login page URL
2) Automatically fill in username and password
3) Automatically submit the login form

My workaround something like this:

(defun login-fn-delayed ()
  (with-current-buffer "*eww*"
    (fill-in-username-and-password)
    (submit-login-form)))

(defun login-fn ()
  (interactive)
  (eww some-url)
  (run-with-timer "1 sec" nil 'login-fn-delayed))

It would be nice, if there was no need for run-with-timer and no need
for (with-current-buffer "*eww*"...).



  reply	other threads:[~2020-06-07 16:36 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 11:48 eww and bookmarks Matthias Meulien
2020-05-20 16:29 ` Drew Adams
2020-05-20 16:35   ` Noam Postavsky
2020-05-20 16:40     ` Drew Adams
2020-05-20 20:13     ` Matthias Meulien
2020-05-23 22:56       ` Michael Heerdegen
2020-05-24  8:44         ` Matthias Meulien
2020-05-24 14:14           ` Alfred M. Szmidt
2020-05-24 19:06             ` Karl Fogel
2020-05-25  4:35             ` Michael Heerdegen
2020-05-25  5:26               ` Alfred M. Szmidt
2020-05-26  2:17                 ` Michael Heerdegen
2020-06-10 15:39                   ` Lars Ingebrigtsen
2020-06-10 20:03                     ` Drew Adams
2020-05-25 12:51               ` Stefan Monnier
2020-05-25 13:52                 ` Marcin Borkowski
2020-05-25 15:03                 ` Alfred M. Szmidt
2020-05-25 15:24                   ` Stefan Monnier
2020-05-25 23:40                   ` Michael Heerdegen
     [not found]                 ` <e23432dd-212b-4bf0-8e8c-185988c653f0@default>
2020-05-26  1:04                   ` Michael Heerdegen
2020-05-27  5:10                     ` Drew Adams
2020-05-25  4:28           ` Michael Heerdegen
2020-05-25 14:35             ` T.V Raman
2020-05-20 22:14     ` Michael Heerdegen
2020-06-07 15:09       ` Michael Heerdegen
2020-06-07 15:30         ` Basil L. Contovounesios
2020-06-07 16:13           ` Michael Heerdegen
2020-06-07 16:36             ` Tomas Hlavaty [this message]
2020-06-07 18:23             ` Basil L. Contovounesios
2020-06-08 14:49               ` Michael Heerdegen
2020-06-08 16:54                 ` Basil L. Contovounesios
2020-06-10 12:01                   ` Michael Heerdegen
2020-06-07 16:36           ` Lars Ingebrigtsen
2020-06-07 18:23             ` Basil L. Contovounesios
2020-06-08 14:42           ` Michael Heerdegen
2020-06-08 16:58             ` Basil L. Contovounesios
2020-06-10 12:06               ` Michael Heerdegen
2020-10-26 18:15                 ` Adam Porter
2020-10-26 18:33                   ` Drew Adams
2020-10-26 18:43                   ` Lars Ingebrigtsen
2020-10-26 19:05                     ` Adam Porter
2020-10-26 19:26                   ` Karl Fogel
2020-06-07 16:31         ` Clément Pit-Claudel
  -- strict thread matches above, loose matches on Subject: below --
2020-05-27  7:18 Boruch Baum
2020-05-27 14:40 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9k27s0a.fsf@logand.com \
    --to=tom@logand.com \
    --cc=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).