From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joaotavora@gmail.com (=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?=) Newsgroups: gmane.emacs.bugs Subject: bug#17007: 24.3.50; describe-key/function evaluates documentation function in the wrong buffer Date: Thu, 13 Mar 2014 11:22:32 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1394709789 1410 80.91.229.3 (13 Mar 2014 11:23:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2014 11:23:09 +0000 (UTC) To: 17007@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 13 12:23:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WO3jJ-0005na-S4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Mar 2014 12:23:18 +0100 Original-Received: from localhost ([::1]:38282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3jJ-0000IH-EI for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Mar 2014 07:23:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3jA-0000AW-Tj for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:23:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO3j5-0006K0-7i for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:23:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO3j5-0006Jw-4a for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:23:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WO3j4-0008J6-Jj for bug-gnu-emacs@gnu.org; Thu, 13 Mar 2014 07:23:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.139470977831913 (code B ref -1); Thu, 13 Mar 2014 11:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Mar 2014 11:22:58 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86813 Archived-At: 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