From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: why do some programming modes have customize hooks and others do not? Date: Mon, 20 Oct 2014 13:07:55 +0100 Message-ID: References: <87bnp9eir3.fsf@ferrier.me.uk> <2128728.y75FreRA9t@descartes> <871tq36tpl.fsf@ferrier.me.uk> <87y4sb57uk.fsf@ferrier.me.uk> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1413806899 27639 80.91.229.3 (20 Oct 2014 12:08:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Oct 2014 12:08:19 +0000 (UTC) Cc: emacs-devel To: Nic Ferrier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 20 14:08:12 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XgBkx-000551-BJ for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2014 14:08:11 +0200 Original-Received: from localhost ([::1]:44341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgBkw-0001g8-T4 for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2014 08:08:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgBki-0001fp-PL for emacs-devel@gnu.org; Mon, 20 Oct 2014 08:07:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgBkh-0003pg-Sx for emacs-devel@gnu.org; Mon, 20 Oct 2014 08:07:56 -0400 Original-Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]:45665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgBkh-0003pY-N6 for emacs-devel@gnu.org; Mon, 20 Oct 2014 08:07:55 -0400 Original-Received: by mail-ob0-f180.google.com with SMTP id va2so3607707obc.25 for ; Mon, 20 Oct 2014 05:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=RNhVB+fpqkqtRjXeLFpk/fceQyIyfcivECykO+kOnH4=; b=MZioYZYJwP9akDkhsNS6prldCPQvqjohqJgp4OMqETcBs0W3cqKrtrnnRKBeGDBZdF dUUcXH/9/v8imfXlpEUWVFr1xDntBpWO2MIsSHXf1WDOz4M3PWOYfloOCT1/5VTv26mT 8SePDdcBL+Z3ZAYrWJ0uhlBb8WnK1dMStoaGNlscK6TEjSHxjVZT9ENVC3xX4TNz/7Zt zW/RXoGnGfMBic77xqOSp39r8oGeG3xNV0Eqd8W8MifskGibO/zHS0i3LbBDkCLeJMMN Hwstuy8SC0A6fsVkYMJ0ShKu19zBneUWis5vIp3o5YHEuGIQGR77llF/M9tMmwfKLLrP od/w== X-Received: by 10.182.234.35 with SMTP id ub3mr7215515obc.37.1413806875189; Mon, 20 Oct 2014 05:07:55 -0700 (PDT) Original-Received: by 10.76.1.137 with HTTP; Mon, 20 Oct 2014 05:07:55 -0700 (PDT) In-Reply-To: <87y4sb57uk.fsf@ferrier.me.uk> X-Google-Sender-Auth: rgzZDN0dn5iBztHccpQvVJvaQqg X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175588 Archived-At: > If I use a hooked function to autoload my package, then using the > non-customize hook won't work. The user ends up having to require my > package in their .emacs. I don't understand. Why would the hooked function not load your package? > I think the route of all this is that there are a significant number of > authors who don't care about customize and don't try and use it. Yes. Another possible solution to this conundrum would be for the customize interface itself to provide special treatment on hook variables. Customize can keep track of which functions were added through the interface. Whenever the hook is customized, only those items are displayed on the interface (or maybe the other items are displayed but not editable). When the user makes some change and performs a save, Customize then saves only the user-added functions. The other ones are left in the hook, but they are not saved to =E2=80=9Ccustom-file=E2=80=9D. This would have almost no effect on the user and the authors, but would prevent packages from leaving garbage behind. It might be a little cumbersome to code, but I don't forsee any fundamental problems with it. Anyone?