From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joel Reicher Newsgroups: gmane.emacs.help Subject: Re: switch buffer variable context after (push-button)? Date: Wed, 01 Jan 2025 13:07:49 +1100 Message-ID: <86cyh78ex6.fsf@gmail.com> References: <87ed1nv4vr.fsf@librehacker.com> Mime-Version: 1.0 Content-Type: text/plain; charset=shift_jis; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11532"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Help Gnu Emacs Mailing List To: Christopher Howard Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 01 03:08:21 2025 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tSo9l-0002rx-8T for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 01 Jan 2025 03:08:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSo9W-0000as-E9; Tue, 31 Dec 2024 21:08:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSo9P-0000aY-Ns for help-gnu-emacs@gnu.org; Tue, 31 Dec 2024 21:08:00 -0500 Original-Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSo9M-00081v-W4 for help-gnu-emacs@gnu.org; Tue, 31 Dec 2024 21:07:58 -0500 Original-Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2166360285dso139976085ad.1 for ; Tue, 31 Dec 2024 18:07:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735697275; x=1736302075; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=90gEkRH3Dbx7EbGYZ5zaiDm0EEoTGQ30KWudq5yN47I=; b=VukPLotGuvxd+vsv2nSu3tJtt4U+Y31UbJYtby4uNbKMFb28L/ysJI9nRF0nY5o1jV SrQ5vGazFaN20YRPttM2Y9J3039dUwB3Plg+DfpBVKIBG/cR3mB1hba19vveSzPQca4I k2UsQ3D2UU5j87AxgW7G0VEOSsDeFSmgh64TrZGqvG23x+5vF08KWaf3Y62JzrM3+oTA /syfSO8VNbNjqma6JYDeqtdSpiV2UEZl3v16OQQUURhorQtJ11fi40JdnJph2nbTRcC4 Cg7Sckuw3VP3RynW9p4cl+Pk/FqMDvw3pVaApLHBSWtRJwPq4BQIpwAByetPL0f6Nu24 Aiqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735697275; x=1736302075; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=90gEkRH3Dbx7EbGYZ5zaiDm0EEoTGQ30KWudq5yN47I=; b=U9n0RYdVTePT44/w5S4jXk/kVlTkfDv6K6T53K/BygRDpoNQK+VfrcubymhvR9wLzA D1DZAKO11DDW5dSJaarLm/J9FZLebhn6sW1DI9NETJtmVxwKRw4PMM7/fKZ0a3z26FB6 pdq1tgbMC1207TNaZHl/YvD1f+sil60CR+J4jMhQlmCxFwl36gMToX4l7LRgamajRjly ARC9aJUSqGl2STnIUbB8SgBrLHy1ds3+l5OJooFH7TAxqIo5JId8KG1NvM6Zk2vWRfOh aLV45+a+dgXXyNpzrFEcdkDWPlSQt4NsIKLQ80DzipUivbhDyN2JMe7/LGInaIjG53yH f/MA== X-Gm-Message-State: AOJu0YzCprunyWphEdMRBoGDUwgwwu8swLhrpxLTgmRkfbIYYQeZP96+ zFVisSaLbwv0GzoXmytCS6w9+B+9qCx0a5/IHcaLEqIYiJyYC1fF58iEhA== X-Gm-Gg: ASbGnctCmL7FXBm/rCn2xM3c7a6HMeKUWAK0TfrelqPcucwYXk4CTZb8zBWwW5nRuXu QiHIeVoTipRbrVT8Dk+n0VVj/bki/gkTobFbbEVT8seDgDfX/sOanFIeWtyMzvJVEmUGB5H/zrV JNjsB35BCze4UQILEaxIkqqHQg+o5w2jAzTEI0iBx3MtgZWVpKRKgBhmB/kJQYnB/XB/lTt5WA5 A8j+qluX0ix9oa5TY9pufsJNr9Lx3PV9uVtIOes/IdHYUOt2Vg4xyJRfv7VdA/hi7/PHD5cyO/q Oy3JtrXkMa43EsfMeaJuj6mQ9U2ysPlrL4eKkJDMW559 X-Google-Smtp-Source: AGHT+IGsKCeYjo5GQJit8daYro+AD1Vo7MgMOSEDE8JPyU93jVICR07tj3Lordoil+QqFcqwyp+79g== X-Received: by 2002:a17:903:230e:b0:215:781a:9183 with SMTP id d9443c01a7336-219e6f1094dmr632252165ad.38.1735697274817; Tue, 31 Dec 2024 18:07:54 -0800 (PST) Original-Received: from LAPTOP-ACR66VVN (139-218-25-158.sta.wbroadband.net.au. [139.218.25.158]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2ee26b131sm27898343a91.44.2024.12.31.18.07.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 18:07:54 -0800 (PST) In-Reply-To: <87ed1nv4vr.fsf@librehacker.com> (Christopher Howard's message of "Tue, 31 Dec 2024 13:56:08 -0900") Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=joel.reicher@gmail.com; helo=mail-pl1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:149089 Archived-At: Christopher Howard writes: > Hi, I'm trying to automate some various procedures I do =81\=20 > private tasks, not of general interest. One was to navigate to a=20 > button in a buffer, and then run (push-button) which opens a=20 > link to a Web page in EWW. (The button target may vary.) After=20 > that, I wanted to run (eww-readable), but it gives me an=20 > error. After some debugging, I figured out the eww-readable was=20 > trying to use the value of the eww-data variable from the=20 > previous buffer =81\ which is nil =81\ rather than the value of it in=20 > the EWW buffer. > > Is there a function that I have to call first, so that my elisp=20 > function sees the variable values from the second buffer instead=20 > of the original one? You can use `with-current-buffer' to do it scoped/statelessly, or=20 `set-buffer' to do it statefully. Regards, - Joel