From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 28 09:32:50 2013 Received: (at submit) by debbugs.gnu.org; 28 Jul 2013 13:32:50 +0000 Received: from localhost ([127.0.0.1]:54207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3R5d-0002Mp-UM for submit@debbugs.gnu.org; Sun, 28 Jul 2013 09:32:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35055) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3R5b-0002MU-NP for submit@debbugs.gnu.org; Sun, 28 Jul 2013 09:32:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3R5O-0000IF-08 for submit@debbugs.gnu.org; Sun, 28 Jul 2013 09:32:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3R5N-0000I9-U5 for submit@debbugs.gnu.org; Sun, 28 Jul 2013 09:32:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3R5F-0002JV-GQ for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2013 09:32:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3R57-0000Fu-4S for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2013 09:32:25 -0400 Received: from mail-bk0-x235.google.com ([2a00:1450:4008:c01::235]:54702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3R56-0000Fl-Tx for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2013 09:32:17 -0400 Received: by mail-bk0-f53.google.com with SMTP id e11so1633625bkh.40 for ; Sun, 28 Jul 2013 06:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=uSLI/GjEPA26Ht0hm7tmGn05Wg8nPmKFWS5iKapbI8c=; b=rSsEqgZOqs5YZCtBjoH8CrNsjWBBSWurSYvZUMl2Z097FeWTYX0sZrEbAy6uVh39ig Zh2yffmqCyFS/9knfKx8q67LRh7GsH0pcuihkGJfSs1+wuupv/v3WFXH39tE+c7b4fUs CPc+CgdVB7lNJLwgLHlwZpLUor42sw7tdf7gJocuJ3ndZOzuImkBUd6q/jq/0Q8bs9vU 41IW7FICCdXb+zqUa639hzk/dGCK1kscEJgjna2Toqp0LPPO6HHgmhUwJrLjSMjn0ufp j469DYdVUyOBu+aXyYnpk4MAbzmyjhj8Rgs8+qYlqLLmGDFqUtzXEofPRaQSIr367yrs HqCA== X-Received: by 10.205.0.194 with SMTP id nn2mr8104380bkb.75.1375018335842; Sun, 28 Jul 2013 06:32:15 -0700 (PDT) Received: from lunaryorn-air.fritz.box (p57995ADD.dip0.t-ipconnect.de. [87.153.90.221]) by mx.google.com with ESMTPSA id d8sm6864953bkj.6.2013.07.28.06.32.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 28 Jul 2013 06:32:15 -0700 (PDT) From: Sebastian Wiesner To: bug-gnu-emacs@gnu.org Subject: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item Date: Sun, 28 Jul 2013 15:32:12 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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: -2.7 (--) 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: -2.7 (--) adaptive-wrap 0.3 adds an autoload for a call to "(easy-menu-add-item =E2=80=A6)". However, "easy-menu-add-item" itself is not autoloaded, and "adaptive-wrap" does not "(require 'easymenu)" before calling "easy-menu-add-item" in an autoload. Hence, *activating* (not even loading!) "adaptive-wrap" fails unless "easymenu" incidentally happens to be loaded before. Obviously this breaks all sorts of things, most notably package installation in "emacs -Q --batch". Greetings, Sebastian Wiesner From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 07:59:35 2013 Received: (at 14974-done) by debbugs.gnu.org; 29 Jul 2013 11:59:35 +0000 Received: from localhost ([127.0.0.1]:55759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3m6w-0006mr-3p for submit@debbugs.gnu.org; Mon, 29 Jul 2013 07:59:34 -0400 Received: from mout.gmx.net ([212.227.17.22]:62796) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3m6r-0006mG-Nv for 14974-done@debbugs.gnu.org; Mon, 29 Jul 2013 07:59:30 -0400 Received: from rosalinde.fritz.box ([89.245.100.49]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MTwYX-1UdcHz3c7l-00QggJ for <14974-done@debbugs.gnu.org>; Mon, 29 Jul 2013 13:59:23 +0200 From: Stephen Berman To: Sebastian Wiesner Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item References: Date: Mon, 29 Jul 2013 13:59:21 +0200 In-Reply-To: (Sebastian Wiesner's message of "Sun, 28 Jul 2013 15:32:12 +0200") Message-ID: <87bo5ly3ty.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:iGKNfepLBlwJ7m/joxGT2MmBlvHDn+t6eiMTmPPIwQ1246ZtQms C+6yIcihB7fyeyaMF2KfDzxvAwHFbuSOS8aaqWFZoigvP5NCpLZCXeXYmtQK0HYluBuggHs DMTDi+Hi7KRxLJTB0+0QgMDg1ynJ+DKLvzGvTDoK2Jzz02CfcZe9xjpvBv9ywXXJwijLMXl 4DN+NKyZ5hQdCSifzOW8w== X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 14974-done Cc: 14974-done@debbugs.gnu.org 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.9 (/) On Sun, 28 Jul 2013 15:32:12 +0200 Sebastian Wiesner = wrote: > adaptive-wrap 0.3 adds an autoload for a call to "(easy-menu-add-item > =E2=80=A6)". However, "easy-menu-add-item" itself is not autoloaded, and > "adaptive-wrap" does not "(require 'easymenu)" before calling > "easy-menu-add-item" in an autoload. > > Hence, *activating* (not even loading!) "adaptive-wrap" fails unless > "easymenu" incidentally happens to be loaded before. > > Obviously this breaks all sorts of things, most notably package > installation in "emacs -Q --batch". Thanks for the report; fixed. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 11:24:26 2013 Received: (at 14974) by debbugs.gnu.org; 29 Jul 2013 15:24:26 +0000 Received: from localhost ([127.0.0.1]:56291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3pJB-0005JM-Fo for submit@debbugs.gnu.org; Mon, 29 Jul 2013 11:24:25 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:33691) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3pJ9-0005Ig-IK for 14974@debbugs.gnu.org; Mon, 29 Jul 2013 11:24:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+LI//2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDYhCBsEtjWGDKQOkeoFegxM X-IPAS-Result: Av8EABK/CFHO+LI//2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDYhCBsEtjWGDKQOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20080625" Received: from 206-248-178-63.dsl.teksavvy.com (HELO pastel.home) ([206.248.178.63]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Jul 2013 11:24:11 -0400 Received: by pastel.home (Postfix, from userid 20848) id 4606862C9B; Mon, 29 Jul 2013 11:24:17 -0400 (EDT) From: Stefan Monnier To: 14974@debbugs.gnu.org Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item Message-ID: References: <87bo5ly3ty.fsf@rosalinde.fritz.box> Date: Mon, 29 Jul 2013 11:24:17 -0400 In-Reply-To: <87bo5ly3ty.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Mon, 29 Jul 2013 13:59:21 +0200") 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.3 (/) X-Debbugs-Envelope-To: 14974 Cc: lunaryorn@gmail.com, stephen.berman@gmx.net 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.3 (/) > Thanks for the report; fixed. I don't think that's enough: the error is signaled before adaptive-wrap.el is loaded, i.e. before seeing the code you modified. You'd need to add a ;;;###autoload in front of the new (require 'easymenu). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 11:32:37 2013 Received: (at 14974) by debbugs.gnu.org; 29 Jul 2013 15:32:37 +0000 Received: from localhost ([127.0.0.1]:56304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3pR7-0005zM-0O for submit@debbugs.gnu.org; Mon, 29 Jul 2013 11:32:37 -0400 Received: from mail-qa0-f44.google.com ([209.85.216.44]:36858) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3pR4-0005yu-Jx for 14974@debbugs.gnu.org; Mon, 29 Jul 2013 11:32:35 -0400 Received: by mail-qa0-f44.google.com with SMTP id hu16so1758197qab.10 for <14974@debbugs.gnu.org>; Mon, 29 Jul 2013 08:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=t1zva5TgeH5JXGidpeU9CKYZqyPkVdB+A0yx2v+kYos=; b=JCbOhM0fIjWvx6Tni29P3up721foJBBzttibPH56gKqEIxoDYr0SgoKnFDTLM3n1DJ mep6v9K0vjPy7rX+IpKYRGRD3RpoyxiaoUUtJezkaSJWTX4XjO7qcUt/3RqyZfDGowNW D0oiYKi9kY4aGoZhxp/z3diHuNZ9uvQFB9g87ghGn/Xta6DF0BdREl/rAmxpkrhx61Tz B7wL78dPb6zkGlQ15eyRRxqR79xwCJAhEBJxCUr26xz9fhwJhODHQ1gJB6Y8yeMgqz12 dC7WbI6z7Gjv3s9WylEmL4oHwiveaiq+06BOGzcdEot6JO/dfcnmDIeDHXTTk9s9ZUgp anzA== MIME-Version: 1.0 X-Received: by 10.224.20.196 with SMTP id g4mr60819210qab.45.1375111948977; Mon, 29 Jul 2013 08:32:28 -0700 (PDT) Received: by 10.224.36.196 with HTTP; Mon, 29 Jul 2013 08:32:28 -0700 (PDT) In-Reply-To: References: <87bo5ly3ty.fsf@rosalinde.fritz.box> Date: Mon, 29 Jul 2013 17:32:28 +0200 Message-ID: Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item From: Sebastian Wiesner To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14974 Cc: 14974@debbugs.gnu.org, stephen.berman@gmx.net 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 (/) 2013/7/29 Stefan Monnier : >> Thanks for the report; fixed. > > I don't think that's enough: the error is signaled before > adaptive-wrap.el is loaded, i.e. before seeing the code you modified. > You'd need to add a ;;;###autoload in front of the new (require 'easymenu). Shouldn't adaptive-wrap rather use one of the autoloadable functions from "easymenu"? From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 12:40:42 2013 Received: (at 14974) by debbugs.gnu.org; 29 Jul 2013 16:40:42 +0000 Received: from localhost ([127.0.0.1]:56456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3qV0-0002QO-AU for submit@debbugs.gnu.org; Mon, 29 Jul 2013 12:40:42 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:31765) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3qUv-0002Po-Ez for 14974@debbugs.gnu.org; Mon, 29 Jul 2013 12:40:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+LI//2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFHO+LI//2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20087574" Received: from 206-248-178-63.dsl.teksavvy.com (HELO pastel.home) ([206.248.178.63]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Jul 2013 12:40:25 -0400 Received: by pastel.home (Postfix, from userid 20848) id 47F5B63C70; Mon, 29 Jul 2013 12:40:31 -0400 (EDT) From: Stefan Monnier To: Sebastian Wiesner Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item Message-ID: References: <87bo5ly3ty.fsf@rosalinde.fritz.box> Date: Mon, 29 Jul 2013 12:40:31 -0400 In-Reply-To: (Sebastian Wiesner's message of "Mon, 29 Jul 2013 17:32:28 +0200") 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.3 (/) X-Debbugs-Envelope-To: 14974 Cc: 14974@debbugs.gnu.org, stephen.berman@gmx.net 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.3 (/) >>> Thanks for the report; fixed. >> I don't think that's enough: the error is signaled before >> adaptive-wrap.el is loaded, i.e. before seeing the code you modified. >> You'd need to add a ;;;###autoload in front of the new (require 'easymenu). > Shouldn't adaptive-wrap rather use one of the autoloadable functions > from "easymenu"? It could, but that would load easymenu just as well. An alternative would be to do the same with define-key rather than using easymenu. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 17:35:24 2013 Received: (at 14974) by debbugs.gnu.org; 29 Jul 2013 21:35:24 +0000 Received: from localhost ([127.0.0.1]:56735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3v6B-0001ry-NV for submit@debbugs.gnu.org; Mon, 29 Jul 2013 17:35:24 -0400 Received: from mout.gmx.net ([212.227.15.15]:60088) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3v68-0001rT-7v for 14974@debbugs.gnu.org; Mon, 29 Jul 2013 17:35:21 -0400 Received: from rosalinde.fritz.box ([89.245.100.49]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MNYxW-1V1CKw2VqM-007BAy for <14974@debbugs.gnu.org>; Mon, 29 Jul 2013 23:35:14 +0200 From: Stephen Berman To: Stefan Monnier Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item References: <87bo5ly3ty.fsf@rosalinde.fritz.box> Date: Mon, 29 Jul 2013 23:35:11 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 29 Jul 2013 12:40:31 -0400") Message-ID: <87y58pvyls.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:brDFGQaFkvqH4zqdQyHbuyZ7WnRTvJVKrpFtqYLBsAFQKvtx3zQ g0qIDr+/XWdZhhd4Dd8FQQxVWSL0o2buFxyTJLzQGpHFQIhrPdOc41UmoawJe0RiimDkuFk FgcgOyDHwAFlA2/wLz90axFPuWRDfSzv22r6M4UloxSx1n8MWvgzcOzhXxeinBud69tL6WI acucgv2pJxIZFpZk1VdVg== X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 14974 Cc: Sebastian Wiesner , 14974@debbugs.gnu.org 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.9 (/) On Mon, 29 Jul 2013 12:40:31 -0400 Stefan Monnier wrote: >>>> Thanks for the report; fixed. >>> I don't think that's enough: the error is signaled before >>> adaptive-wrap.el is loaded, i.e. before seeing the code you modified. >>> You'd need to add a ;;;###autoload in front of the new (require 'easymenu). Hmm, I guess I don't understand what is going wrong -- what error is being signaled and what is causing it? From the shell I invoked emacs -Q --batch --eval "(package-install 'adaptive-wrap)" and that returns "package.el is not yet initialized!" -- but the same thing happens with any other package, so that can't be the problem. What is a recipe to getting the error, so I can understand what the issue is? >> Shouldn't adaptive-wrap rather use one of the autoloadable functions >> from "easymenu"? > > It could, but that would load easymenu just as well. > > An alternative would be to do the same with define-key rather than > using easymenu. The following seems to DTRT (and also allows dispensing with adaptive-wrap-unload-function): (define-key-after (lookup-key menu-bar-options-menu [line-wrapping]) [adaptive-wrap] '(menu-item "Adaptive Wrap" (lambda () (interactive) (if adaptive-wrap-prefix-mode (adaptive-wrap-prefix-mode -1) (adaptive-wrap-prefix-mode 1))) :enable t :visible (and (menu-bar-menu-frame-live-and-visible-p) (featurep 'adaptive-wrap)) :help "Show wrapped long lines with an adjustable prefix" :button (:toggle . adaptive-wrap-prefix-mode)) word-wrap) Should I install it in place of the easy-menu definition? (Though in any case I'd still like to understand just what the problem with the latter is.) Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 18:15:24 2013 Received: (at 14974) by debbugs.gnu.org; 29 Jul 2013 22:15:24 +0000 Received: from localhost ([127.0.0.1]:56834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3vit-0003gj-Ur for submit@debbugs.gnu.org; Mon, 29 Jul 2013 18:15:24 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:17596) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3viq-0003fx-OX for 14974@debbugs.gnu.org; Mon, 29 Jul 2013 18:15:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+LI//2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFHO+LI//2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20121891" Received: from 206-248-178-63.dsl.teksavvy.com (HELO pastel.home) ([206.248.178.63]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Jul 2013 18:15:08 -0400 Received: by pastel.home (Postfix, from userid 20848) id 29DF763C67; Mon, 29 Jul 2013 18:15:14 -0400 (EDT) From: Stefan Monnier To: Stephen Berman Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item Message-ID: References: <87bo5ly3ty.fsf@rosalinde.fritz.box> <87y58pvyls.fsf@rosalinde.fritz.box> Date: Mon, 29 Jul 2013 18:15:14 -0400 In-Reply-To: <87y58pvyls.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Mon, 29 Jul 2013 23:35:11 +0200") 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.3 (/) X-Debbugs-Envelope-To: 14974 Cc: Sebastian Wiesner , 14974@debbugs.gnu.org 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.3 (/) > What is a recipe to getting the error, so I can understand what the > issue is? 1- install adaptive-wrap from ELPA. 2- restart Emacs. > '(menu-item "Adaptive Wrap" (lambda () > (interactive) > (if adaptive-wrap-prefix-mode > (adaptive-wrap-prefix-mode -1) > (adaptive-wrap-prefix-mode 1))) The binding should simply be adaptive-wrap-prefix-mode, shouldn't it? > :enable t > :visible (and (menu-bar-menu-frame-live-and-visible-p) > (featurep 'adaptive-wrap)) Why not always show it? > :button (:toggle . adaptive-wrap-prefix-mode)) adaptive-wrap-prefix-mode only exists after adaptive-wrap has been loaded, so better use (bound-and-true-p adaptive-wrap-prefix-mode). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 19:31:07 2013 Received: (at 14974) by debbugs.gnu.org; 29 Jul 2013 23:31:07 +0000 Received: from localhost ([127.0.0.1]:56930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3wuA-0006tR-Hq for submit@debbugs.gnu.org; Mon, 29 Jul 2013 19:31:06 -0400 Received: from mout.gmx.net ([212.227.15.18]:60205) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3wu7-0006sV-FS for 14974@debbugs.gnu.org; Mon, 29 Jul 2013 19:31:04 -0400 Received: from rosalinde.fritz.box ([89.245.100.49]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MaIsi-1UoTO40uYi-00JuS1 for <14974@debbugs.gnu.org>; Tue, 30 Jul 2013 01:30:57 +0200 From: Stephen Berman To: Stefan Monnier Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item References: <87bo5ly3ty.fsf@rosalinde.fritz.box> <87y58pvyls.fsf@rosalinde.fritz.box> Date: Tue, 30 Jul 2013 01:30:55 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 29 Jul 2013 18:15:14 -0400") Message-ID: <87txjdvt8w.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:NxBpk4qNG1vfw61+XOXuIxHuR1Egrr8PYzoqeMj6tz3TvJ7EjPd +Ahkpcx+GhdbXRTZrULtjHDC5y0Optg9HHJ877b8Ui+gJot9qNfsLR64h1vyISvWdwHKLPg ZXjAbyRcsBHFHxhjy9EhFYEs/+gACUH/3Pse4zrDffyWf1SMWYHbie5o8ACmMk/U13fgjC4 fKeFr36T9B5ZbFz5Gm9Tg== X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 14974 Cc: Sebastian Wiesner , 14974@debbugs.gnu.org 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.9 (/) On Mon, 29 Jul 2013 18:15:14 -0400 Stefan Monnier wrote: >> What is a recipe to getting the error, so I can understand what the >> issue is? > > 1- install adaptive-wrap from ELPA. > 2- restart Emacs. Now I see, thanks. >> '(menu-item "Adaptive Wrap" (lambda () >> (interactive) >> (if adaptive-wrap-prefix-mode >> (adaptive-wrap-prefix-mode -1) >> (adaptive-wrap-prefix-mode 1))) > > The binding should simply be adaptive-wrap-prefix-mode, shouldn't it? You mean (lambda () (interactive) (adaptive-wrap-prefix-mode 'toggle))? Yes, that's better. >> :enable t >> :visible (and (menu-bar-menu-frame-live-and-visible-p) >> (featurep 'adaptive-wrap)) > > Why not always show it? Then the check box remains in the menu after unloading adaptive-wrap.el, but it becomes a noop. Making visibility depend on whether the feature is present is, AFAICS, a way of avoiding a separate adaptive-wrap-unload-function. Or am I wrong about this, or do you mean something else? >> :button (:toggle . adaptive-wrap-prefix-mode)) > > adaptive-wrap-prefix-mode only exists after adaptive-wrap has been > loaded, so better use (bound-and-true-p adaptive-wrap-prefix-mode). Ok. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 21:08:57 2013 Received: (at 14974) by debbugs.gnu.org; 30 Jul 2013 01:08:57 +0000 Received: from localhost ([127.0.0.1]:57039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3yQr-0002wD-CY for submit@debbugs.gnu.org; Mon, 29 Jul 2013 21:08:57 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:62613) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3yQo-0002vz-V0 for 14974@debbugs.gnu.org; Mon, 29 Jul 2013 21:08:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsoXy2/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFsoXy2/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20129094" Received: from 108-161-124-182.dsl.teksavvy.com (HELO pastel.home) ([108.161.124.182]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 29 Jul 2013 21:08:42 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6645863C70; Mon, 29 Jul 2013 21:08:48 -0400 (EDT) From: Stefan Monnier To: Stephen Berman Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item Message-ID: References: <87bo5ly3ty.fsf@rosalinde.fritz.box> <87y58pvyls.fsf@rosalinde.fritz.box> <87txjdvt8w.fsf@rosalinde.fritz.box> Date: Mon, 29 Jul 2013 21:08:48 -0400 In-Reply-To: <87txjdvt8w.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Tue, 30 Jul 2013 01:30:55 +0200") 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.3 (/) X-Debbugs-Envelope-To: 14974 Cc: Sebastian Wiesner , 14974@debbugs.gnu.org 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.3 (/) > You mean (lambda () (interactive) (adaptive-wrap-prefix-mode 'toggle))? No, I mean `adaptive-wrap-prefix-mode', which will already do the same. > Then the check box remains in the menu after unloading adaptive-wrap.el, Big deal. Don't waste code on such a non-issue that will only affect maybe 10 people in the next century, 9 of whom won't even notice it because they won't look at the menu. > but it becomes a noop. Making visibility depend on whether the > feature is present is, AFAICS, a way of avoiding a separate > adaptive-wrap-unload-function. Or am I wrong about this, or do you > mean something else? As I said, unloading a package is largely broken, so some left-over entries in a menu are the least of your worries in this respect. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 30 04:54:21 2013 Received: (at 14974) by debbugs.gnu.org; 30 Jul 2013 08:54:21 +0000 Received: from localhost ([127.0.0.1]:57452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V45hE-00083F-PI for submit@debbugs.gnu.org; Tue, 30 Jul 2013 04:54:21 -0400 Received: from mout.gmx.net ([212.227.17.21]:54449) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V45hB-00082S-KK for 14974@debbugs.gnu.org; Tue, 30 Jul 2013 04:54:18 -0400 Received: from rosalinde.fritz.box ([89.245.121.213]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MBWIM-1UtbIS15ba-00AWrA for <14974@debbugs.gnu.org>; Tue, 30 Jul 2013 10:54:11 +0200 From: Stephen Berman To: Stefan Monnier Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item References: <87bo5ly3ty.fsf@rosalinde.fritz.box> <87y58pvyls.fsf@rosalinde.fritz.box> <87txjdvt8w.fsf@rosalinde.fritz.box> Date: Tue, 30 Jul 2013 10:54:09 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 29 Jul 2013 21:08:48 -0400") Message-ID: <87r4egh1hq.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:iB2pU7L40Ij32xeiljusRp+WTizobeNzSG/Oki+FY/Va6M8bFJq li3nrgc4+ZxcAlVqdW4aPXTtUZPqlwud6UZgByFyGv/3nTxyjmBc7CwmT6z/8zkMEPB3LN3 aGcrxmsRWb4yMpvpzSifeJoPdqUtkFnFIHG5Ea/U2VlRg62tky6MNbLGnounjx7YEv0y1zx vUV88RCcWQ0tO3cBGtIZQ== X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 14974 Cc: Sebastian Wiesner , 14974@debbugs.gnu.org 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: -1.5 (-) On Mon, 29 Jul 2013 21:08:48 -0400 Stefan Monnier wrote: >> You mean (lambda () (interactive) (adaptive-wrap-prefix-mode 'toggle))? > > No, I mean `adaptive-wrap-prefix-mode', which will already do the same. Got it, finally. Sorry for the denseness. >> Then the check box remains in the menu after unloading adaptive-wrap.el, > > Big deal. Don't waste code on such a non-issue that will only affect > maybe 10 people in the next century, 9 of whom won't even notice it > because they won't look at the menu. > >> but it becomes a noop. Making visibility depend on whether the >> feature is present is, AFAICS, a way of avoiding a separate >> adaptive-wrap-unload-function. Or am I wrong about this, or do you >> mean something else? > > As I said, unloading a package is largely broken, so some left-over > entries in a menu are the least of your worries in this respect. I honestly don't see having the feature check as a waste of code, but no matter. I assume, then, that adaptive-wrap-unload-function is also dispensable; so is the following patch ok to check in? Steve Berman === modified file 'packages/adaptive-wrap/adaptive-wrap.el' *** packages/adaptive-wrap/adaptive-wrap.el 2013-07-29 11:56:03 +0000 --- packages/adaptive-wrap/adaptive-wrap.el 2013-07-30 08:15:54 +0000 *************** *** 4,10 **** ;; Author: Stephen Berman ;; Stefan Monnier ! ;; Version: 0.4 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by --- 4,10 ---- ;; Author: Stephen Berman ;; Stefan Monnier ! ;; Version: 0.5 ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by *************** *** 103,127 **** (widen) (remove-text-properties (point-min) (point-max) '(wrap-prefix nil)))))) ! ;;;###autoload ! (easy-menu-add-item menu-bar-options-menu ! '("Line Wrapping in This Buffer") ! ["Adaptive Wrap" ! (lambda () ! (interactive) ! (if adaptive-wrap-prefix-mode ! (adaptive-wrap-prefix-mode -1) ! (adaptive-wrap-prefix-mode 1))) ! :visible (menu-bar-menu-frame-live-and-visible-p) ! :help "Show wrapped long lines with an adjustable prefix" ! :style toggle ! :selected adaptive-wrap-prefix-mode]) ! ! (defun adaptive-wrap-unload-function () ! "Cleanup adaptive-wrap package." ! (easy-menu-remove-item menu-bar-options-menu ! '("Line Wrapping in This Buffer") ! "Adaptive Wrap")) (provide 'adaptive-wrap) ;;; adaptive-wrap.el ends here --- 103,116 ---- (widen) (remove-text-properties (point-min) (point-max) '(wrap-prefix nil)))))) ! (define-key-after (lookup-key menu-bar-options-menu [line-wrapping]) ! [adaptive-wrap] ! '(menu-item "Adaptive Wrap" adaptive-wrap-prefix-mode ! :enable t ! :visible (menu-bar-menu-frame-live-and-visible-p) ! :help "Show wrapped long lines with an adjustable prefix" ! :button (:toggle . (bound-and-true-p adaptive-wrap-prefix-mode))) ! word-wrap) (provide 'adaptive-wrap) ;;; adaptive-wrap.el ends here From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 30 10:14:23 2013 Received: (at 14974) by debbugs.gnu.org; 30 Jul 2013 14:14:23 +0000 Received: from localhost ([127.0.0.1]:58410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4Ago-0002LX-4s for submit@debbugs.gnu.org; Tue, 30 Jul 2013 10:14:22 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:65016) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V4Agl-0002LF-EC for 14974@debbugs.gnu.org; Tue, 30 Jul 2013 10:14:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFsoXy2/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSQBiB0GsR+QDpEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFsoXy2/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSQBiB0GsR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="20159659" Received: from 108-161-124-182.dsl.teksavvy.com (HELO pastel.home) ([108.161.124.182]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Jul 2013 10:13:59 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1074662E1A; Tue, 30 Jul 2013 10:14:05 -0400 (EDT) From: Stefan Monnier To: Stephen Berman , eliz@gnu.org, cyd@gnu.org Subject: Re: bug#14974: 24.3.50; adaptive-wrap 0.3 calls potentially void function easy-menu-add-item Message-ID: References: <87bo5ly3ty.fsf@rosalinde.fritz.box> <87y58pvyls.fsf@rosalinde.fritz.box> <87txjdvt8w.fsf@rosalinde.fritz.box> <87r4egh1hq.fsf@rosalinde.fritz.box> Date: Tue, 30 Jul 2013 10:14:05 -0400 In-Reply-To: <87r4egh1hq.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Tue, 30 Jul 2013 10:54:09 +0200") 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.3 (/) X-Debbugs-Envelope-To: 14974 Cc: Sebastian Wiesner , 14974@debbugs.gnu.org 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.3 (/) > I honestly don't see having the feature check as a waste of code, but no > matter. KISS. > I assume, then, that adaptive-wrap-unload-function is also dispensable; Yes. > so is the following patch ok to check in? Fine, with one comment: > ! (define-key-after (lookup-key menu-bar-options-menu [line-wrapping]) > ! [adaptive-wrap] > ! '(menu-item "Adaptive Wrap" adaptive-wrap-prefix-mode > ! :enable t > ! :visible (menu-bar-menu-frame-live-and-visible-p) > ! :help "Show wrapped long lines with an adjustable prefix" > ! :button (:toggle . (bound-and-true-p adaptive-wrap-prefix-mode))) > ! word-wrap) The ":enable t" is redundant, remove it. As for the ":visible" entry, I'm wondering what it's there for: I see it's also used for the line-wrap entry, but I don't know what it's used for there either. I see that menu-bar-menu-frame-live-and-visible-p was added in 2005 by Eli (used for :enable rather than :visible, by the way) and it was moved to :visible later on when Yidong added the word-wrap entry. Could someone add a comment explaining what it's for? Usually the menu's frame can't be invisible if the menu is visible, so I guess it has to do with either the `ns' build or with the Gtk feature that lets on `pin' a menu? But why is it used on these entries and not on others? Why use it for `:visible' rather than `:enable' or for something yet entirely different? Stefan From unknown Wed Aug 20 05:17:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 28 Aug 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator