* switch buffer variable context after (push-button)?
@ 2024-12-31 22:56 Christopher Howard
2025-01-01 2:07 ` Joel Reicher
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Howard @ 2024-12-31 22:56 UTC (permalink / raw)
To: Help Gnu Emacs Mailing List
Hi, I'm trying to automate some various procedures I do — private tasks, not of general interest. One was to navigate to a button in a buffer, and then run (push-button) which opens a link to a Web page in EWW. (The button target may vary.) After that, I wanted to run (eww-readable), but it gives me an error. After some debugging, I figured out the eww-readable was trying to use the value of the eww-data variable from the previous buffer — which is nil — rather than the value of it in the EWW buffer.
Is there a function that I have to call first, so that my elisp function sees the variable values from the second buffer instead of the original one?
--
📛 Christopher Howard
🚀 gemini://gem.librehacker.com
🌐 http://gem.librehacker.com
בראשית ברא אלהים את השמים ואת הארץ
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: switch buffer variable context after (push-button)?
2024-12-31 22:56 switch buffer variable context after (push-button)? Christopher Howard
@ 2025-01-01 2:07 ` Joel Reicher
0 siblings, 0 replies; 2+ messages in thread
From: Joel Reicher @ 2025-01-01 2:07 UTC (permalink / raw)
To: Christopher Howard; +Cc: Help Gnu Emacs Mailing List
Christopher Howard <christopher@librehacker.com> writes:
> Hi, I'm trying to automate some various procedures I do ―
> private tasks, not of general interest. One was to navigate to a
> button in a buffer, and then run (push-button) which opens a
> link to a Web page in EWW. (The button target may vary.) After
> that, I wanted to run (eww-readable), but it gives me an
> error. After some debugging, I figured out the eww-readable was
> trying to use the value of the eww-data variable from the
> previous buffer ― which is nil ― rather than the value of it in
> the EWW buffer.
>
> Is there a function that I have to call first, so that my elisp
> function sees the variable values from the second buffer instead
> of the original one?
You can use `with-current-buffer' to do it scoped/statelessly, or
`set-buffer' to do it statefully.
Regards,
- Joel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-01 2:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-31 22:56 switch buffer variable context after (push-button)? Christopher Howard
2025-01-01 2:07 ` Joel Reicher
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).