From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8297: Request: Better Emacs self-documentation for customization Date: Mon, 21 Mar 2011 18:00:09 -0400 Message-ID: References: <4D854552.6000509@miszellen.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300754245 6339 80.91.229.12 (22 Mar 2011 00:37:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2011 00:37:25 +0000 (UTC) Cc: 8297@debbugs.gnu.org To: Florian Beck Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 22 01:37:20 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1pb6-0002tC-4r for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Mar 2011 01:37:20 +0100 Original-Received: from localhost ([127.0.0.1]:58315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1pb5-00007t-Gs for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Mar 2011 20:37:19 -0400 Original-Received: from [140.186.70.92] (port=35026 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1paw-0008VG-AL for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 20:37:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1pav-0001E0-7c for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 20:37:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1pav-0001Dw-62 for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 20:37:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q1pPC-0006bb-2o; Mon, 21 Mar 2011 20:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Mar 2011 00:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8297 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8297-submit@debbugs.gnu.org id=B8297.130075349425368 (code B ref 8297); Tue, 22 Mar 2011 00:25:01 +0000 Original-Received: (at 8297) by debbugs.gnu.org; 22 Mar 2011 00:24:54 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1pP2-0006b6-K3 for submit@debbugs.gnu.org; Mon, 21 Mar 2011 20:24:52 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1pP1-0006ap-0W; Mon, 21 Mar 2011 20:24:51 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAP6Ih01Ld/X5/2dsb2JhbAClRHiITbsxhWMElWk X-IronPort-AV: E=Sophos;i="4.63,222,1299474000"; d="scan'208";a="97489519" Original-Received: from 75-119-245-249.dsl.teksavvy.com (HELO ceviche.home) ([75.119.245.249]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 21 Mar 2011 20:24:45 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id B8161662C8; Mon, 21 Mar 2011 18:00:09 -0400 (EDT) In-Reply-To: <4D854552.6000509@miszellen.de> (Florian Beck's message of "Sun, 20 Mar 2011 01:07:46 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 21 Mar 2011 20:25:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45242 Archived-At: severity 8297 wishlist thanks > What I would like is for Emacs to track my customisations: > - When I redefine an Emacs function I would like a link to the > previous/original definition, `describe-function' only provides a link to > the current one. I'd like to improve the support for redefinition of functions, indeed. I'm more interested in getting unload-feature to work more reliably, but it could work for this as well: basically remember the previous definitions. Note that for your case, another option is to use a defadvice, and indeed defadvice should also add a hyperlink to the advice. > - 'describe-variable', on the other hand, remembers the original > definition, but doesn't remember the place where I changed the value. That might turn out to be more difficult to track, but at least for some simple cases (e.g. when the vlue is changed via `custom' functions rather than via `setq') that should definitely be doable. If the var was set via `setq' it's more difficult since `setq' is a very low-level primitive that needs to run fast. But maybe we could somehow handle `setq' outside of functions in a special way (these shouldn't impact performance since they can't be in loops). > - `describe-key' only provides a link to the function, not to the place the > key was defined. That's also more difficult because OT1H `define-key' does not get much information (it can check load-file-name, but it doesn't know the line number, nor the name of the map it receives and neither does it know reliably what the key description looks like in the source file, so it's hard to do a regexp-search), and OTOH there's no place currently to store that information, tho I guess we could keep it in some side hash-table. > Obviously, this is not easy, because evaluations don't necessarily > have a fixed place and key bindings can be defined in many ways. Regardless, > I think this is something on which Emacs could improve. Agreed. It's not high on my todo list, but I'll be happy to take patches for those. For defadvice it should be pretty easy, and for function re-definitions it shouldn't be too hard either. Stefan