From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Mar 2014 11:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 17007@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139470977831913 (code B ref -1); Thu, 13 Mar 2014 11:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Mar 2014 11:22:58 +0000 Received: from localhost ([127.0.0.1]:35415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO3iz-0008Id-5m for submit@debbugs.gnu.org; Thu, 13 Mar 2014 07:22:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55915) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO3iw-0008IU-T0 for submit@debbugs.gnu.org; Thu, 13 Mar 2014 07:22:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO3ir-0006Fe-Fe for submit@debbugs.gnu.org; Thu, 13 Mar 2014 07:22:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3ir-0006Fa-D0 for submit@debbugs.gnu.org; Thu, 13 Mar 2014 07:22:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3il-00081k-Qo for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:22:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO3ie-0006D8-P2 for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:22:43 -0400 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:48952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3ie-0006Cc-IP for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:22:36 -0400 Received: by mail-we0-f178.google.com with SMTP id u56so698354wes.37 for ; Thu, 13 Mar 2014 04:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=EM9LfH6XvHwn87bYeBTw5wULuhRb4q31TGvdlkV4byo=; b=JlA1Z5W/fVz4rJG0cHSqPaFBuhIMGOuMkzQvHTKavxe7aHJtu5FNYMfui4Sf9CUD85 XfzLwYirr1bXqId8/t7bA4zdBccJxEsue0PGmknn1bUL8xPwkDQfgtxXmjHzuxbd4dpM FTNHG5YzMMluNazjXKfMM8IdmmEy2wZAgU6Ei7fWN3/2up0Bv4z0FbHfvtOF2ui4f7TH X5M9611Iq7beNrG1u7QcfyccjcCSccDEJbntABYJwA0XKk7OTCy1dEWTpC0fTYbvvnn0 rCUvcnyitTpXwj8H/CekYAbED9AiIo6p0WCl+2MDbndFqZZjTaOU33qw/Qmi193hCcjF 6iCQ== X-Received: by 10.180.12.233 with SMTP id b9mr1199936wic.8.1394709755397; Thu, 13 Mar 2014 04:22:35 -0700 (PDT) Received: from BELMONTE.yourcompany.com (a81-84-241-129.static.cpe.netcabo.pt. [81.84.241.129]) by mx.google.com with ESMTPSA id mw3sm24636384wic.7.2014.03.13.04.22.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Mar 2014 04:22:34 -0700 (PDT) From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Date: Thu, 13 Mar 2014 11:22:32 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hi So yasnippet has this bit of code (simplified for this report) (put 'yas-expand 'function-documentation '(yas--expand-from-trigger-key-doc t)) (defun yas--expand-from-trigger-key-doc (context) "A doc synthesizer for `yas-expand'." (concat "Expand a snippet before point. If no snippet expansion is possible, " (let* ((fallback (yas--keybinding-beyond-yasnippet))) (or (and fallback (format "call command `%s'" (pp-to-string fallback))) "do nothing (`yas-expand' doesn't shadow\nanything)."))= )) This used to work fine and output something like runs the command yas-expand, which is an alias for `yas-expand-from-trigger-key' in `yasnippet.el'. =20=20=20=20=20 (yas-expand &optional FIELD) =20=20=20=20=20 Expand a snippet before point. If no snippet expansion is possible, call command `indent-for-tab-command' This has stopped working in 24.3.5 since `with-help-window' started replaced `with-output-to-temp-buffer' with `with-temp-buffer-window'. The former just binds `standard-output' while the latter also sets the current buffer to the *Help* buffer. The result is that the fallback keybinding reported is always "forward-button", which is almost always wrong. One could either 1. revert that change (was it just a cleanup?) 2. fix/parametrize that particular behaviour of `with-temp-buffer-window' 3. pass an extra original-buffer arg to `describe-function-1' 4. dynamically bind some new `help-original-buffer' var. Even though a better mechanism for "fallback keybindings" is being discussed (and by then yasnippet can get rid of its own technique, which is half-baked but working since emacs 22), it'd be nice if the current function-documentation trick is kept working for upcoming emacs 24.4. This originated in https://github.com/capitaomorte/yasnippet/issues/468 http://github.com/capitaomorte/autopair does something similar and is probably also affected, but I plan to deprecate autopair in favor of 24.4's electric-pair-mode anyway. Thanks, Jo=E3o =20=20=20=20 In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2014-01-04 on LEG570 From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Mar 2014 15:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Cc: 17007@debbugs.gnu.org Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.13947262575311 (code B ref 17007); Thu, 13 Mar 2014 15:58:01 +0000 Received: (at 17007) by debbugs.gnu.org; 13 Mar 2014 15:57:37 +0000 Received: from localhost ([127.0.0.1]:36040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO80n-0001Nb-5B for submit@debbugs.gnu.org; Thu, 13 Mar 2014 11:57:37 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:53911) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO80m-0001NU-0T for 17007@debbugs.gnu.org; Thu, 13 Mar 2014 11:57:36 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WO80l-0000Og-8B; Thu, 13 Mar 2014 11:57:35 -0400 From: Glenn Morris References: X-Spook: Waco, Texas Glock pipeline Afghanistan Uzi South Africa X-Ran: K;0uKk/y+oHs*47'wM#9!o)6v#yt~\hx&iiV(x1D7H>4FTSosa\H^uQwax]>}3A,]r&~]R X-Hue: yellow X-Attribution: GM Date: Thu, 13 Mar 2014 11:57:34 -0400 In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 13 Mar 2014 11:22:32 +0000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Jo=C3=A3o T=C3=A1vora wrote: > This has stopped working in 24.3.5 since `with-help-window' started > replaced `with-output-to-temp-buffer' with > `with-temp-buffer-window'. The former just binds `standard-output' while > the latter also sets the current buffer to the *Help* buffer. The former was changed 2014-02-28, so presumably the issue you are reporting is already gone in the current trunk. > In GNU Emacs 24.3.50.1 (i686-pc-mingw32) > of 2014-01-04 on LEG570 From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Mar 2014 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Glenn Morris Cc: 17007@debbugs.gnu.org Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.13947281579278 (code B ref 17007); Thu, 13 Mar 2014 16:30:02 +0000 Received: (at 17007) by debbugs.gnu.org; 13 Mar 2014 16:29:17 +0000 Received: from localhost ([127.0.0.1]:36054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO8VQ-0002PZ-9G for submit@debbugs.gnu.org; Thu, 13 Mar 2014 12:29:16 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:39746) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO8VM-0002PN-Lu for 17007@debbugs.gnu.org; Thu, 13 Mar 2014 12:29:13 -0400 Received: by mail-wg0-f42.google.com with SMTP id y10so1070228wgg.1 for <17007@debbugs.gnu.org>; Thu, 13 Mar 2014 09:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:content-transfer-encoding; bh=7xJZA1lw3rpkRJ4GzXfbts/S+9oKGMAB1VFlOUbTukk=; b=zF/KU7QUKMAvQIl4KtEqsry4iOKXXOFweJ6rRTmQOo0wYUiyhdkEQ8Xvmwmnjt/tKQ 2BtSN88zG/Tjo4+yINws24Pn9Unq8GllLmEQOR+C3XcIKogce/4dhIn0GYngzoiiaUic 4aOK4kSHPh2+fy85Ef/Xuu62CnhN/W7uQVywWHx9aT1dFb4aDAh+WsfeKzJp8c2wdfR1 q5Uh3Bi/lzW4Ewbl6pUqEPBoqrJqSjrp/h6oC+HRCzFSY+UOi57gT6gr17LjPTKAno+g Dq/Ub+RR/aZCB4tNaUkUpVYeyINbhyA4XBsMKWh9z/LSLpI5Uf/CkrVHCtdqZ42sGXiB l45A== X-Received: by 10.180.91.164 with SMTP id cf4mr2344538wib.37.1394728151488; Thu, 13 Mar 2014 09:29:11 -0700 (PDT) Received: from BELMONTE.yourcompany.com (a81-84-241-129.static.cpe.netcabo.pt. [81.84.241.129]) by mx.google.com with ESMTPSA id pm2sm26863014wic.0.2014.03.13.09.29.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Mar 2014 09:29:10 -0700 (PDT) From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) In-Reply-To: (Glenn Morris's message of "Thu, 13 Mar 2014 11:57:34 -0400") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) Date: Thu, 13 Mar 2014 16:29:08 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Glenn Morris writes: > Jo=E3o T=E1vora wrote: > >> This has stopped working in 24.3.5 since `with-help-window' started >> replaced `with-output-to-temp-buffer' with >> `with-temp-buffer-window'. The former just binds `standard-output' while >> the latter also sets the current buffer to the *Help* buffer. > > The former was changed 2014-02-28, so presumably the issue you are > reporting is already gone in the current trunk. Ah, the former is good news, I'll try it out. Jo=E3o From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: joaot@siscog.pt (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Mar 2014 19:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 17007@debbugs.gnu.org Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139473948531783 (code B ref 17007); Thu, 13 Mar 2014 19:39:02 +0000 Received: (at 17007) by debbugs.gnu.org; 13 Mar 2014 19:38:05 +0000 Received: from localhost ([127.0.0.1]:36137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOBS8-0008GY-E2 for submit@debbugs.gnu.org; Thu, 13 Mar 2014 15:38:04 -0400 Received: from a81-84-241-129.static.cpe.netcabo.pt ([81.84.241.129]:59347 helo=mail3.siscog.pt) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOB9e-0007hN-BT for 17007@debbugs.gnu.org; Thu, 13 Mar 2014 15:18:59 -0400 Received: from modifs.siscog (lximaps01.siscog.com [::ffff:194.100.100.99]) by mail3.siscog.pt with esmtp; Thu, 13 Mar 2014 19:18:56 +0000 id 0001E063.532204A0.00002124 Received: from BELMONTE (belmonte.siscog.com [194.100.100.149]) by modifs.siscog (Postfix) with ESMTP id EAC5C6D2C2; Thu, 13 Mar 2014 19:18:53 +0000 (WET) From: joaot@siscog.pt (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) References: Date: Thu, 13 Mar 2014 19:18:52 +0000 In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 13 Mar 2014 16:29:08 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 13 Mar 2014 15:38:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) joaotavora@gmail.com (Jo=E3o T=E1vora) writes: > Glenn Morris writes: >> Jo=E3o T=E1vora wrote: >>> replaced `with-output-to-temp-buffer' with >>> `with-temp-buffer-window'. The former just binds `standard-output' while >> The former was changed 2014-02-28, so presumably the issue you are >> reporting is already gone in the current trunk. > Ah, the former is good news, I'll try it out. Alas, the problem persists, but it was probably solved for a week in February. I assumed you were talking about revno, which is the only relevant one I found from 2014-02-28. r116606: Revert recent with-temp-buffer-window chang But I can confirm that it's not working now, with a build from precisely that day and revno r116614. It probably worked when the change that 116606 reverts was in place. I can't find a note in the commit message stating the reason for the reversion. =3D=3D=3D modified file 'lisp/window.el' --- a/lisp/window.el 2014-02-21 11:04:27 +0000 +++ b/lisp/window.el 2014-02-28 09:10:55 +0000 @@ -189,8 +188,8 @@ `(let* ((,buffer (temp-buffer-window-setup ,buffer-or-name)) (standard-output ,buffer) ,window ,value) - (setq ,value (progn ,@body)) (with-current-buffer ,buffer + (setq ,value (progn ,@body)) (setq ,window (temp-buffer-window-show ,buffer ,action))) =20 (if (functionp ,quit-function) Jo=E3o From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Mar 2014 11:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: 17007@debbugs.gnu.org Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139479674221480 (code B ref 17007); Fri, 14 Mar 2014 11:33:02 +0000 Received: (at 17007) by debbugs.gnu.org; 14 Mar 2014 11:32:22 +0000 Received: from localhost ([127.0.0.1]:36506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOQLd-0005aO-KK for submit@debbugs.gnu.org; Fri, 14 Mar 2014 07:32:21 -0400 Received: from mout.gmx.net ([212.227.17.22]:53959) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOQLb-0005aE-E2 for 17007@debbugs.gnu.org; Fri, 14 Mar 2014 07:32:20 -0400 Received: from [93.82.10.128] ([93.82.10.128]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MRXVc-1WZJN33kaG-00Scvn; Fri, 14 Mar 2014 12:32:18 +0100 Message-ID: <5322E8C0.5020106@gmx.at> Date: Fri, 14 Mar 2014 12:32:16 +0100 From: martin rudalics MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:tmScA8cAZZsEPwuNx/cxy6cuJ+gz9YSwO0PdRbifFcf4EdTdnWT IV0IuaydT37MKr4GUAZKxb2auNwnpU5SyZhuNPWGnkWmf2N7CDgqiaYkzQiDp2Rf7zhIaP7 tbsMZwxj7hEE64n+mILIqHIHi3aTiLbbd3j1FBDPCyJzS2FYBlLOau0nuYFmbR3COoThDKH OZJBqQIeWnXdfIoTD/zDw== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > This has stopped working in 24.3.5 since `with-help-window' started > replaced `with-output-to-temp-buffer' with > `with-temp-buffer-window'. The former just binds `standard-output' while > the latter also sets the current buffer to the *Help* buffer. > > The result is that the fallback keybinding reported is always > "forward-button", which is almost always wrong. > > One could either > > 1. revert that change (was it just a cleanup?) > 2. fix/parametrize that particular behaviour of > `with-temp-buffer-window' > 3. pass an extra original-buffer arg to `describe-function-1' > 4. dynamically bind some new `help-original-buffer' var. > > Even though a better mechanism for "fallback keybindings" is being > discussed (and by then yasnippet can get rid of its own technique, which > is half-baked but working since emacs 22), it'd be nice if the current > function-documentation trick is kept working for upcoming emacs 24.4. > > This originated in https://github.com/capitaomorte/yasnippet/issues/468 > > http://github.com/capitaomorte/autopair does something similar and is > probably also affected, but I plan to deprecate autopair in favor of > 24.4's electric-pair-mode anyway. Sorry, I messed this up too often already. Hopefully, it's sufficient to add one `with-current-buffer' binding at some particular level. Could you please send me the calling sequence used by yasnippet, so I can identify the location where this is necessary? martin From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Mar 2014 12:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 17007@debbugs.gnu.org Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139479889925659 (code B ref 17007); Fri, 14 Mar 2014 12:09:01 +0000 Received: (at 17007) by debbugs.gnu.org; 14 Mar 2014 12:08:19 +0000 Received: from localhost ([127.0.0.1]:36528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOQuR-0006fn-3U for submit@debbugs.gnu.org; Fri, 14 Mar 2014 08:08:19 -0400 Received: from mail-we0-f180.google.com ([74.125.82.180]:34102) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOQuP-0006fe-6T for 17007@debbugs.gnu.org; Fri, 14 Mar 2014 08:08:18 -0400 Received: by mail-we0-f180.google.com with SMTP id p61so1996904wes.25 for <17007@debbugs.gnu.org>; Fri, 14 Mar 2014 05:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=Zd3MBfSQ1383bvYWh24VLcBldK+uS4zaJvBssFhzIWU=; b=IXzvZLOXS6+0hYCaWaxkLpaPXqjS2svHRcd0TkRsk93f0JKEy3s75SxDshVqyKsPEB J2Frc8heADaDrLtpTzrZPHCAQdJG0U/Wh79jrT5TvTJIBL6v62A6C3XsbMK+YkbphUqf XoedO6ivcJ6SoeUSpuJiGu7Y7kGu1ENdzFAb2i60WNni8KGjndhHd3a8AfEk921j7KjO TMIqwKJzdTjz/gj8aJ25B2uvJilM16IklSpGuNtGarIJN0YVUXR107mbVhRUobzYf1qt Eok/bC33LM4hHvcHprQ/w/BoGgJjtp7KZV9QsW89nitOtbhfd1OTXz5CM3yhQH6MDjBn Er3Q== X-Received: by 10.194.48.100 with SMTP id k4mr1810045wjn.49.1394798895885; Fri, 14 Mar 2014 05:08:15 -0700 (PDT) Received: from BELMONTE.yourcompany.com (a81-84-241-129.static.cpe.netcabo.pt. [81.84.241.129]) by mx.google.com with ESMTPSA id v6sm16350400wif.0.2014.03.14.05.08.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Mar 2014 05:08:15 -0700 (PDT) From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) References: <5322E8C0.5020106@gmx.at> Date: Fri, 14 Mar 2014 12:08:08 +0000 In-Reply-To: <5322E8C0.5020106@gmx.at> (martin rudalics's message of "Fri, 14 Mar 2014 12:32:16 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) martin rudalics writes: > Sorry, I messed this up too often already. Hopefully, it's sufficient > to add one `with-current-buffer' binding at some particular level. > Could you please send me the calling sequence used by yasnippet, so I > can identify the location where this is necessary? It's simpler if I give you an emacs -Q recipe, right? In your *scratch* buffer: (defun foo ()) (defun foo-doc () (format "Foo does nothing, and by the way your tab does `%s'" (key-binding "\t"))) (put 'foo 'function-documentation '(foo-doc)) (describe-function 'foo) This fails on the latest Emacs, i.e. the last line returned by the last form is "Foo does nothing, and by the way your tab does `forward-button'" Whereas it should report, as in Emacs 24.3 "Foo does nothing, and by the way your tab does `indent-for-tab-command= '" The trace of functions is the following: 1 -> (describe-function foo) | 2 -> (describe-function-1 foo) | | 3 -> (documentation foo t) | | 3 <- documentation: "Foo does nothing, and by the way your tab does `fo= rward-button'" | 2 <- describe-function-1: nil 1 <- describe-function: "foo is a Lisp function. But that doesn't show how the macro `with-temp-buffer-window', expanded from `with-help-window', eventually wraps the latter's BODY in a `with-current-buffer' call, making its forms be evaluated in the newly created *Help* buffer, instead of *scratch*. One of those forms is the call to `describe-function-1', which eventually calls `foo-doc'. As I explained in my last email (which got sent from the wrong address but is here http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-03/msg00411.html) it was the reversion of two lines in `with-temp-buffer-window' that broke it. But maybe it was fixing something else that I don't understand. Can you help me understand what you were achieving with the original fix and the reversion? =20=20=20=20 Jo=E3o =20=20=20=20 From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Mar 2014 14:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: 17007@debbugs.gnu.org Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139480768510282 (code B ref 17007); Fri, 14 Mar 2014 14:35:01 +0000 Received: (at 17007) by debbugs.gnu.org; 14 Mar 2014 14:34:45 +0000 Received: from localhost ([127.0.0.1]:36929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOTC7-0002fk-TG for submit@debbugs.gnu.org; Fri, 14 Mar 2014 10:34:44 -0400 Received: from mout.gmx.net ([212.227.17.21]:61869) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOTC5-0002fV-BF for 17007@debbugs.gnu.org; Fri, 14 Mar 2014 10:34:42 -0400 Received: from [188.22.110.178] ([188.22.110.178]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M3i8r-1XFCGs3SID-00rGK5; Fri, 14 Mar 2014 15:34:40 +0100 Message-ID: <5323137D.2020103@gmx.at> Date: Fri, 14 Mar 2014 15:34:37 +0100 From: martin rudalics MIME-Version: 1.0 References: <5322E8C0.5020106@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:7W99vvORJ2o2K2Cb/CzCxjj3zayjv6YI033nh4l7SErBxfSPMKK pPDUnQvF6AgPdoHvgXhYKMitGfvdicqdG/lAT9jzDg/OxHXOClkWlDLokdDb6+6l2OgYPtn bMLU70bXR23HtKKwm4KC0dSsjOKjtjIA5FUtGj55G83MZ7Nj+zIPNeBz1uz9yxPQ/1H1sP4 d89r6fl6WmJfFyBzKNNLQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > It's simpler if I give you an emacs -Q recipe, right? In your *scratch* > buffer: > > (defun foo ()) > (defun foo-doc () > (format "Foo does nothing, and by the way your tab does `%s'" > (key-binding "\t"))) > (put 'foo 'function-documentation '(foo-doc)) > (describe-function 'foo) > > This fails on the latest Emacs, i.e. the last line returned by the last > form is > > "Foo does nothing, and by the way your tab does `forward-button'" > > Whereas it should report, as in Emacs 24.3 > > "Foo does nothing, and by the way your tab does `indent-for-tab-command'" Confirmed. > The trace of functions is the following: > > 1 -> (describe-function foo) > | 2 -> (describe-function-1 foo) > | | 3 -> (documentation foo t) > | | 3 <- documentation: "Foo does nothing, and by the way your tab does `forward-button'" > | 2 <- describe-function-1: nil > 1 <- describe-function: "foo is a Lisp function. > > But that doesn't show how the macro `with-temp-buffer-window', expanded > from `with-help-window', eventually wraps the latter's BODY in a > `with-current-buffer' call, making its forms be evaluated in the newly > created *Help* buffer, instead of *scratch*. Indeed. > One of those forms is the > call to `describe-function-1', which eventually calls `foo-doc'. > > As I explained in my last email (which got sent from the wrong address > but is here > http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-03/msg00411.html) > it was the reversion of two lines in `with-temp-buffer-window' that > broke it. Not really. The current version of `with-temp-buffer-window' and that released with Emacs 24.3 are the same. It changed only intermittently and that's what you noticed. Or can you spot a difference now? > But maybe it was fixing something else that I don't understand. Can > you help me understand what you were achieving with the original fix > and the reversion? I first reacted to a bug report by Nicolas Richard http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16816 and tried to make it behave as in the doc-string. Unfortunately, this broke things as subsequently remarked by Juanma in the same thread and also broke code Thierry wrote as reported in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16882 so I decided to restore the 24.3 behavior. I'm still not fine with that but it's now some time since 24.3 is out and I'm a bit reluctant to change it back again, mostly so because I don't know how many bugs such a change might produce and how soon they'd get detected. And I'm still too silly to understand how this (apparently?) worked with 24.3 and why it's broken now. Any ideas? martin From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: Nicolas Richard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Mar 2014 15:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 17007@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139480954613907 (code B ref 17007); Fri, 14 Mar 2014 15:06:01 +0000 Received: (at 17007) by debbugs.gnu.org; 14 Mar 2014 15:05:46 +0000 Received: from localhost ([127.0.0.1]:36940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOTg9-0003cF-TY for submit@debbugs.gnu.org; Fri, 14 Mar 2014 11:05:46 -0400 Received: from mxin.ulb.ac.be ([164.15.128.112]:29213) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOTg8-0003c4-6a for 17007@debbugs.gnu.org; Fri, 14 Mar 2014 11:05:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EACYaI1OkD4Xx/2dsb2JhbABZxgqBLXSCJgEBBHkQCAMUDSUPAQRJE4dkAQMRsgSZeAGHdheHYoRtghgHhDgEmEWGNYt5gW+BPzw Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 14 Mar 2014 16:05:42 +0100 From: Nicolas Richard References: <5322E8C0.5020106@gmx.at> <5323137D.2020103@gmx.at> Date: Fri, 14 Mar 2014 16:05:48 +0100 In-Reply-To: <5323137D.2020103@gmx.at> (martin rudalics's message of "Fri, 14 Mar 2014 15:34:37 +0100") Message-ID: <87txb0g6r7.fsf@yahoo.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) martin rudalics writes: > And I'm still too silly to understand how this (apparently?) worked with > 24.3 and why it's broken now. Any ideas? The 24.3 version of with-help-window used with-output-to-temp-buffer AFAICT. I'm looking at a commit made on Sun Mar 10 19:35:23 2013 -0700 by Glenn Morris, tagged emacs-24.3 in the git repo (commit 3a1ce06) Annotating, it was changed on Date: Sat Nov 30 10:25:31 2013 +0100 as part of the commit (cc07bdb7) entitled "Support resizing frames and windows pixelwise." (Sorry for using only git hashes, I don't have the bzr repo up to date) -- Nico. From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Mar 2014 17:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Nicolas Richard Cc: 17007@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.13948189664415 (code B ref 17007); Fri, 14 Mar 2014 17:43:01 +0000 Received: (at 17007) by debbugs.gnu.org; 14 Mar 2014 17:42:46 +0000 Received: from localhost ([127.0.0.1]:37051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOW86-000197-2Q for submit@debbugs.gnu.org; Fri, 14 Mar 2014 13:42:46 -0400 Received: from mout.gmx.net ([212.227.17.22]:50836) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WOW83-00018w-5n for 17007@debbugs.gnu.org; Fri, 14 Mar 2014 13:42:44 -0400 Received: from [91.113.0.209] ([91.113.0.209]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MRGTX-1WZoIJ0H0h-00UZSs; Fri, 14 Mar 2014 18:42:40 +0100 Message-ID: <53233F8D.30407@gmx.at> Date: Fri, 14 Mar 2014 18:42:37 +0100 From: martin rudalics MIME-Version: 1.0 References: <5322E8C0.5020106@gmx.at> <5323137D.2020103@gmx.at> <87txb0g6r7.fsf@yahoo.fr> In-Reply-To: <87txb0g6r7.fsf@yahoo.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:2vKvt/kfOl9ds7p8O4WjXKKdH7fB1BZNuiH0LBdEM7308AAMxmx u//oeVumgo3ilv6iFolL8grLLtdZ+cS1H4QhLFzOtonH+Pj3Ipkce1XXF7yTvLFq4OquA+r /vlGe5KFuIS9YLTOOp8QPP/LagqD244cx2caw1h+YMveLgQjpmEsuYSTomPcFjKN2bEzZt8 hav5XT31kzsySxznBsqbg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > The 24.3 version of with-help-window used with-output-to-temp-buffer > AFAICT. You're right. I must fix this. Thanks, martin From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Mar 2014 10:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: 17007@debbugs.gnu.org Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139496410930584 (code B ref 17007); Sun, 16 Mar 2014 10:02:02 +0000 Received: (at 17007) by debbugs.gnu.org; 16 Mar 2014 10:01:49 +0000 Received: from localhost ([127.0.0.1]:37945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WP7t6-0007xE-KL for submit@debbugs.gnu.org; Sun, 16 Mar 2014 06:01:48 -0400 Received: from mout.gmx.net ([212.227.15.18]:60361) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WP7t4-0007x5-A3 for 17007@debbugs.gnu.org; Sun, 16 Mar 2014 06:01:46 -0400 Received: from [62.46.211.76] ([62.46.211.76]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MH4Os-1WLDsw27sI-00DlXq; Sun, 16 Mar 2014 11:01:44 +0100 Message-ID: <53257683.8090604@gmx.at> Date: Sun, 16 Mar 2014 11:01:39 +0100 From: martin rudalics MIME-Version: 1.0 References: <5322E8C0.5020106@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ynagL9cJAkCVKT9gdi2J2ALurAu3u6RNo2S6GTwtLsauPeQxK0O QiimHACz/b0dRxk8dIR43bkJqfWYItXegxyrRw8kSCvjDVokTk/QjNwWvx8ib5C28QxCNfE K67A1BNpJ/2HxA9g5E7UU7JrUUST/OY7x0afOw38387nzhMmAt6X74P4j9e4nIgQX6pdewz cFjK7Ev1oUuaT3QeIsdJg== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > It's simpler if I give you an emacs -Q recipe, right? In your *scratch* > buffer: > > (defun foo ()) > (defun foo-doc () > (format "Foo does nothing, and by the way your tab does `%s'" > (key-binding "\t"))) > (put 'foo 'function-documentation '(foo-doc)) > (describe-function 'foo) > > This fails on the latest Emacs, i.e. the last line returned by the last > form is > > "Foo does nothing, and by the way your tab does `forward-button'" > > Whereas it should report, as in Emacs 24.3 > > "Foo does nothing, and by the way your tab does `indent-for-tab-command'" Should work now as intended. Please try again. Thanks, martin From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Mar 2014 10:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Nicolas Richard Cc: 17007@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139496414930685 (code B ref 17007); Sun, 16 Mar 2014 10:03:01 +0000 Received: (at 17007) by debbugs.gnu.org; 16 Mar 2014 10:02:29 +0000 Received: from localhost ([127.0.0.1]:37950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WP7tl-0007yr-5W for submit@debbugs.gnu.org; Sun, 16 Mar 2014 06:02:29 -0400 Received: from mout.gmx.net ([212.227.17.22]:55897) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WP7te-0007yX-Tv for 17007@debbugs.gnu.org; Sun, 16 Mar 2014 06:02:27 -0400 Received: from [62.46.211.76] ([62.46.211.76]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MVvi4-1WePif14Ui-00X3va; Sun, 16 Mar 2014 11:02:21 +0100 Message-ID: <532576A7.6090600@gmx.at> Date: Sun, 16 Mar 2014 11:02:15 +0100 From: martin rudalics MIME-Version: 1.0 References: <5322E8C0.5020106@gmx.at> <5323137D.2020103@gmx.at> <87txb0g6r7.fsf@yahoo.fr> In-Reply-To: <87txb0g6r7.fsf@yahoo.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:vmXYU3axvwheJHYUWkL5obK5MqNvPSl6mSulnll+jongpCD5vaA 5vL2qGc1gDO6zDI/d8uBVV+E8j4O3k8qqtW/ssxsKT+XAx2XKiAAMSwI1cP/SHBqbk3q5GG NT9hyzdTi5B1U531mFt4TIp1G0I3tJ8OGHtc3X+Aap1K8JGfxuUynW6d0dC+UVlqoKmGm7D /VNeD0+geDGEEqK9vddBw== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > The 24.3 version of with-help-window used with-output-to-temp-buffer > AFAICT. I have tried to fix all problems I found in this area. If you have some spare time could you please try to give the new `with-help-window' and `with-temp-buffer-window' code some checking? After all, you were the one who detected the inconsistency that was the root of all evil here and I trust that you could detect any remaining inconsistencies as well. Thanks, martin From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: Nicolas Richard Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Mar 2014 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: Nicolas Richard , 17007@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139497032713358 (code B ref 17007); Sun, 16 Mar 2014 11:46:01 +0000 Received: (at 17007) by debbugs.gnu.org; 16 Mar 2014 11:45:27 +0000 Received: from localhost ([127.0.0.1]:37967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WP9VO-0003TN-J0 for submit@debbugs.gnu.org; Sun, 16 Mar 2014 07:45:26 -0400 Received: from mailrelay001.isp.belgacom.be ([195.238.6.51]:17504) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WP9VL-0003TB-Jp for 17007@debbugs.gnu.org; Sun, 16 Mar 2014 07:45:24 -0400 X-Belgacom-Dynamic: yes Received: from 220.177-178-91.adsl-dyn.isp.belgacom.be (HELO LDLC-portable) ([91.178.177.220]) by relay.skynet.be with ESMTP; 16 Mar 2014 12:45:22 +0100 From: Nicolas Richard References: <5322E8C0.5020106@gmx.at> <5323137D.2020103@gmx.at> <87txb0g6r7.fsf@yahoo.fr> <532576A7.6090600@gmx.at> Date: Sun, 16 Mar 2014 12:45:21 +0100 In-Reply-To: <532576A7.6090600@gmx.at> (martin rudalics's message of "Sun, 16 Mar 2014 11:02:15 +0100") Message-ID: <871ty2xt7y.fsf@yahoo.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) martin rudalics writes: >> The 24.3 version of with-help-window used with-output-to-temp-buffer >> AFAICT. > > I have tried to fix all problems I found in this area. If you have some > spare time could you please try to give the new `with-help-window' and > `with-temp-buffer-window' code some checking? After all, you were the > one who detected the inconsistency that was the root of all evil here > and I trust that you could detect any remaining inconsistencies as well. The fact that I found an inconsistency in the first place is because I'm not a heavy user of that kind of code, hence I relied on the docstring. Of course I'll report anything that I find, but I don't expect much from myself. Thanks for your fixes. -- Nico. From unknown Sun Jun 22 03:57:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Mar 2014 13:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17007 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: Nicolas Richard , 17007@debbugs.gnu.org Received: via spool by 17007-submit@debbugs.gnu.org id=B17007.139497649824303 (code B ref 17007); Sun, 16 Mar 2014 13:29:02 +0000 Received: (at 17007) by debbugs.gnu.org; 16 Mar 2014 13:28:18 +0000 Received: from localhost ([127.0.0.1]:37987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WPB6t-0006Jp-MH for submit@debbugs.gnu.org; Sun, 16 Mar 2014 09:28:16 -0400 Received: from mail-qa0-f50.google.com ([209.85.216.50]:61102) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WPB6o-0006Jb-LO for 17007@debbugs.gnu.org; Sun, 16 Mar 2014 09:28:13 -0400 Received: by mail-qa0-f50.google.com with SMTP id o15so4263381qap.23 for <17007@debbugs.gnu.org>; Sun, 16 Mar 2014 06:28:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=nEmcfu/kWpKxHxhKm1aEV85viVDX6BdifZPrxlQVsj8=; b=ZAtB0gPySWwaYCM3roeDeIiwoeTAr+NykmzXpGQcmuEanHzH1+Bjm4UXjLI6nblGL8 dMTL5gMl3KzGuwfYbmCzQ0eLQtBHN0WJg8tGTqp8G0G8zjTuEl7pbVj/G5bd1DHf0LZJ GnT4h5WV2SBwbNaJ4J6Uc5Nny0DDGHBiWaeg/Qn+lAqruMuoqOITbtiLJnMVCtPQUEgi Yv2g8p6WKFoK0nRJ9/UWyOn82cmLoLXl+Si95Zjc9LrlEZHvvCfjwI+oi/N+9pnz3AuH EiyLXEkVjTXRc3vskRKpGfUOXpSilPXTyab+Cs8LSUWEh4ZxATbXday3/JW5+akryvwy zgOw== X-Received: by 10.140.20.17 with SMTP id 17mr21186352qgi.28.1394976490150; Sun, 16 Mar 2014 06:28:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.47.201 with HTTP; Sun, 16 Mar 2014 06:27:50 -0700 (PDT) In-Reply-To: <532576A7.6090600@gmx.at> References: <5322E8C0.5020106@gmx.at> <5323137D.2020103@gmx.at> <87txb0g6r7.fsf@yahoo.fr> <532576A7.6090600@gmx.at> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Date: Sun, 16 Mar 2014 13:27:50 +0000 Message-ID: Content-Type: multipart/alternative; boundary=001a11c124f62a62e304f4b94636 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a11c124f62a62e304f4b94636 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Mar 16, 2014 at 10:02 AM, martin rudalics wrote: > > The 24.3 version of with-help-window used with-output-to-temp-buffer > > AFAICT. > > `with-temp-buffer-window' code some checking? After all, you were the > one who detected the inconsistency that was the root of all evil here > and I trust that you could detect any remaining inconsistencies as well. > > Thanks, martin > Thanks, will do, as soon as I have time to make a new build. I wonder if one could write unit tests for these scenarios... Just a thought, not thoroughly tested, and could be brittle: (ert-deftest help-window-describe-function-in-correct-buffer () "Check if `function-documentation' is eval'ed in right buffer." (defun help-foo ()) (defun help-foo-doc () (format "Does nothing, but your tab does `%s'" (key-binding "\t"))) (put 'help-foo 'function-documentation '(foo-doc)) (let* ((selected-window-before (selected-window)) (text (describe-function 'help-foo)) (help-windows (get-buffer-window-list "*Help*"))) (unwind-protect (progn (should (eq selected-window-before (selected-window))) (should (= 1 (length help-windows))) (with-selected-window (car help-windows) (should-error (search-forward "forward-button")))) (delete-other-windows)))) --001a11c124f62a62e304f4b94636 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Sun, Mar 16, 2014 at 10:02 AM, martin rudalics <rud= alics@gmx.at> wrote:
> The 24.3 version of with-help-window used with-output= -to-temp-buffer
> AFAICT.

`with-temp-buffer-window' code some checking? =A0After all, you wer= e the
one who detected the inconsistency that was the root of all evil here
and I trust that you could detect any remaining inconsistencies as well.
Thanks, martin

Thanks, will do, as soon= as I have time to make a new build.

I wonder if o= ne could write unit tests for these scenarios...

Just a thought, not thoroughly tested, and could be brittle:

=
(ert-deftest help-window-describe-function-in-correct-buffe= r
=A0 =A0 ()
=A0 "Check if `function-documentation= ' is eval'ed in right
=A0 buffer."
=A0 (defun help-foo ())
=A0 (def= un help-foo-doc ()
=A0 =A0 (format "Does nothing, but your t= ab does `%s'"
=A0 =A0 =A0 =A0 =A0 =A0 (key-binding "= ;\t")))
=A0 (put 'help-foo 'function-documentation '(foo-doc))
=A0 (let* ((selected-window-before (selected-window))
=A0 = =A0 =A0 =A0 =A0(text (describe-function 'help-foo))
=A0 =A0 = =A0 =A0 =A0(help-windows (get-buffer-window-list "*Help*")))
=A0 =A0 (unwind-protect
=A0 =A0 =A0 =A0 (progn=A0
= =A0 =A0 =A0 =A0 =A0 (should (eq selected-window-before (selected-window)))<= /div>
=A0 =A0 =A0 =A0 =A0 (should (=3D 1 (length help-windows)))
<= div>=A0 =A0 =A0 =A0 =A0 (with-selected-window
=A0 =A0 =A0 =A0 =A0 =A0 =A0 (car help-windows)
=A0 =A0 =A0 = =A0 =A0 =A0 (should-error (search-forward "forward-button"))))
=A0 =A0 =A0 (delete-other-windows))))
--001a11c124f62a62e304f4b94636-- From unknown Sun Jun 22 03:57:44 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Subject: bug#17007: closed (Re: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer) Message-ID: References: X-Gnu-PR-Message: they-closed 17007 X-Gnu-PR-Package: emacs Reply-To: 17007@debbugs.gnu.org Date: Wed, 19 Mar 2014 10:51:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1395226263-24824-1" This is a multi-part message in MIME format... ------------=_1395226263-24824-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #17007: 24.3.50; describe-key/function evaluates documentation function in = the wrong buffer which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 17007@debbugs.gnu.org. --=20 17007: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D17007 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1395226263-24824-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 17007-done) by debbugs.gnu.org; 19 Mar 2014 10:50:56 +0000 Received: from localhost ([127.0.0.1]:40744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQE5I-0006S7-5i for submit@debbugs.gnu.org; Wed, 19 Mar 2014 06:50:56 -0400 Received: from mail-yh0-f49.google.com ([209.85.213.49]:57014) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WQE5G-0006Rj-7z for 17007-done@debbugs.gnu.org; Wed, 19 Mar 2014 06:50:54 -0400 Received: by mail-yh0-f49.google.com with SMTP id z6so8228035yhz.22 for <17007-done@debbugs.gnu.org>; Wed, 19 Mar 2014 03:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=PTFJqCsdM41W2EkKKTU9EdWvWShpw/yyuJ5OVmTHyCs=; b=SgoDnPvrrIMfRll1aGQxOEmqDc4yruNOxD1mL/7oN3h7+TpuuJsM1a+7VwfQWCyFK8 3uuJrwLqv/5/jzqPYPNYynoC0rWHKo1PuLufV5kwKYs2CHKfzhNgBJxvlbFvABumfv2b wXHMktbJoVNVZD8uvobSryl5QhQkS1Wv5Nr38XSWngWd3f2u62hcxuonegQQJP1Mze1E z7rxpSBGpKv2ggRhqlyuC7Guy00tzrVFj2HVevdfUwCFhMYyFSiEu1PaMG1P0GIyUg8r nfjUcdfRQCTWB1t5BpR+UEf2PyiVfJRiYGbYF8C+F4SN6JcRJF3UPiMOUiFQ6pkGep6y k6Cg== X-Received: by 10.236.60.68 with SMTP id t44mr25025697yhc.47.1395226248528; Wed, 19 Mar 2014 03:50:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.170.163.3 with HTTP; Wed, 19 Mar 2014 03:50:08 -0700 (PDT) In-Reply-To: References: <5322E8C0.5020106@gmx.at> <5323137D.2020103@gmx.at> <87txb0g6r7.fsf@yahoo.fr> <532576A7.6090600@gmx.at> From: Juanma Barranquero Date: Wed, 19 Mar 2014 11:50:08 +0100 Message-ID: Subject: Re: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 17007-done Cc: martin rudalics , 17007-done@debbugs.gnu.org, Nicolas Richard X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Closing, presumably fixed in 2014-03-16 Martin Rudalics Fix behavior of with-temp-buffer-window (Bug#16816, Bug#17007). ------------=_1395226263-24824-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Mar 2014 11:22:58 +0000 Received: from localhost ([127.0.0.1]:35415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO3iz-0008Id-5m for submit@debbugs.gnu.org; Thu, 13 Mar 2014 07:22:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55915) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WO3iw-0008IU-T0 for submit@debbugs.gnu.org; Thu, 13 Mar 2014 07:22:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO3ir-0006Fe-Fe for submit@debbugs.gnu.org; Thu, 13 Mar 2014 07:22:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3ir-0006Fa-D0 for submit@debbugs.gnu.org; Thu, 13 Mar 2014 07:22:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3il-00081k-Qo for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:22:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO3ie-0006D8-P2 for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:22:43 -0400 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:48952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3ie-0006Cc-IP for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:22:36 -0400 Received: by mail-we0-f178.google.com with SMTP id u56so698354wes.37 for ; Thu, 13 Mar 2014 04:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=EM9LfH6XvHwn87bYeBTw5wULuhRb4q31TGvdlkV4byo=; b=JlA1Z5W/fVz4rJG0cHSqPaFBuhIMGOuMkzQvHTKavxe7aHJtu5FNYMfui4Sf9CUD85 XfzLwYirr1bXqId8/t7bA4zdBccJxEsue0PGmknn1bUL8xPwkDQfgtxXmjHzuxbd4dpM FTNHG5YzMMluNazjXKfMM8IdmmEy2wZAgU6Ei7fWN3/2up0Bv4z0FbHfvtOF2ui4f7TH X5M9611Iq7beNrG1u7QcfyccjcCSccDEJbntABYJwA0XKk7OTCy1dEWTpC0fTYbvvnn0 rCUvcnyitTpXwj8H/CekYAbED9AiIo6p0WCl+2MDbndFqZZjTaOU33qw/Qmi193hCcjF 6iCQ== X-Received: by 10.180.12.233 with SMTP id b9mr1199936wic.8.1394709755397; Thu, 13 Mar 2014 04:22:35 -0700 (PDT) Received: from BELMONTE.yourcompany.com (a81-84-241-129.static.cpe.netcabo.pt. [81.84.241.129]) by mx.google.com with ESMTPSA id mw3sm24636384wic.7.2014.03.13.04.22.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Mar 2014 04:22:34 -0700 (PDT) From: joaotavora@gmail.com (=?iso-8859-1?Q?Jo=E3o_T=E1vora?=) To: bug-gnu-emacs@gnu.org Subject: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Date: Thu, 13 Mar 2014 11:22:32 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hi So yasnippet has this bit of code (simplified for this report) (put 'yas-expand 'function-documentation '(yas--expand-from-trigger-key-doc t)) (defun yas--expand-from-trigger-key-doc (context) "A doc synthesizer for `yas-expand'." (concat "Expand a snippet before point. If no snippet expansion is possible, " (let* ((fallback (yas--keybinding-beyond-yasnippet))) (or (and fallback (format "call command `%s'" (pp-to-string fallback))) "do nothing (`yas-expand' doesn't shadow\nanything)."))= )) This used to work fine and output something like runs the command yas-expand, which is an alias for `yas-expand-from-trigger-key' in `yasnippet.el'. =20=20=20=20=20 (yas-expand &optional FIELD) =20=20=20=20=20 Expand a snippet before point. If no snippet expansion is possible, call command `indent-for-tab-command' This has stopped working in 24.3.5 since `with-help-window' started replaced `with-output-to-temp-buffer' with `with-temp-buffer-window'. The former just binds `standard-output' while the latter also sets the current buffer to the *Help* buffer. The result is that the fallback keybinding reported is always "forward-button", which is almost always wrong. One could either 1. revert that change (was it just a cleanup?) 2. fix/parametrize that particular behaviour of `with-temp-buffer-window' 3. pass an extra original-buffer arg to `describe-function-1' 4. dynamically bind some new `help-original-buffer' var. Even though a better mechanism for "fallback keybindings" is being discussed (and by then yasnippet can get rid of its own technique, which is half-baked but working since emacs 22), it'd be nice if the current function-documentation trick is kept working for upcoming emacs 24.4. This originated in https://github.com/capitaomorte/yasnippet/issues/468 http://github.com/capitaomorte/autopair does something similar and is probably also affected, but I plan to deprecate autopair in favor of 24.4's electric-pair-mode anyway. Thanks, Jo=E3o =20=20=20=20 In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2014-01-04 on LEG570 ------------=_1395226263-24824-1--