GNU bug report logs - #8108
24.0.50; debugging pre-write-conversion in define-coding-system

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Werner LEMBERG <wl@HIDDEN>; dated Thu, 24 Feb 2011 07:42:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 8108 <at> debbugs.gnu.org:


Received: (at 8108) by debbugs.gnu.org; 10 Dec 2016 17:44:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 10 12:44:50 2016
Received: from localhost ([127.0.0.1]:37186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cFlha-0004d1-8u
	for submit <at> debbugs.gnu.org; Sat, 10 Dec 2016 12:44:50 -0500
Received: from mout.gmx.net ([212.227.15.15]:59034)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <werner.lemberg@HIDDEN>) id 1cFlhY-0004cl-JT
 for 8108 <at> debbugs.gnu.org; Sat, 10 Dec 2016 12:44:49 -0500
Received: from gnu.org ([77.119.131.203]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0McDl1-1bxxQh3dBP-00Jcbi; Sat, 10
 Dec 2016 18:44:29 +0100
Date: Sat, 10 Dec 2016 18:44:24 +0100 (CET)
Message-Id: <20161210.184424.1121190829133161176.wl@HIDDEN>
To: npostavs@HIDDEN
Subject: Re: bug#8108: 24.0.50; debugging pre-write-conversion in
 define-coding-system
From: Werner LEMBERG <wl@HIDDEN>
In-Reply-To: <87k2b7es3i.fsf@HIDDEN>
References: <20110224.084058.453347781.wl@HIDDEN>
 <87k2b7es3i.fsf@HIDDEN>
X-Mailer: Mew version 6.7 on Emacs 26.0.50.1 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:feK8wZW/stG7EDgzJEcies2UxvbAa2VujUQfcVyseEHLo6po7jf
 tZx5QG0aqxQykRNc7iLLR9sMfnmWBfH/AIX8SHiFTLvILJQaNE68/1t+wN8MZJgK6Oaz9jK
 A1+s1y9wEPeA2dObMRHrB7wTG2zYu0uRYV+nUiVDZ2kshPW7Dwrljs/iR/a3WOiWp5hQv5L
 g55UCNHU9i9kBCZnY1TNA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:BYkJe4Eboys=:8CW38EmI5haau/DNekbQbe
 uNMsHWbsWq8+lk39CB0hs4l3oj1sY0Vyaao2U0pQsUK4rHWSetLAaT7BJ5vS33MnytxkbLZBM
 fNE8yG+vsHR2mK4Bq9/4Gdl0h1eHbkrdZFY0EhuNv6amirOlC+Ed7f+x+ry6e0uJDc9Jf9bPO
 HYhDjPc/yidK3YZej29N5xVYQURrqMzZvSowz5S1SyeBCu4AlUSZK2DgPHIzTm8oSJ+MLX1eB
 /uyNJw5df1rEcSksRX49/rEAiqo7MbOG5fthtT5u+rgyXrj9b9rWdCIjpfk36oh4nWEMo3Xve
 L2emtk8Gmqbh8y7BVFkJsg0OrjvAQ5GYVlv4BdkaqgisNi6FIx+vCiZ7hN6fqG8Ozrhax+0V4
 PML848RlpNk5gt8S8+HUzdpUjjq9WaNuAyvhIKjpbWSV6UUPTqd/i9zRuI8d6OR1oS1hjoVtP
 5ijlSivPJBJ9uVg45oQOUTCneg0Nxe2EQn7aJPqORelgkIepw0XhD007mPSezGBnF2J2Rlf58
 jVmRMv8LYIB/T4MOVIUwD9c5z0bDm5ynNqvHXl9qqzMiSyACac1iFIJB+WOIa+e9MxhEVuavJ
 Maq4fGr+opsY3drJytb/udZa7LhU+MFLHVuQ0KjF+W1SMhI8QseMK8dbZPjxFtXxibmqagtw9
 lKsRwaHovdvGbfTCKPEqAtav5Kdq/blE7xy0AEZ3FDtwOzILolwT8vkNStJxP+rRvk8STKdGO
 5N8Wzwh2ACKR6dSRo8UhCjsCoJeqJan7iKk/uXc3nn1KxaUHDwmO2ncqx5ssntk1egF/e51+Z
 LdWw+/z
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 8108
Cc: 8108 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)


>> I'm updating my cjk-enc.el package (part of the CJK bundle for
>> LaTeX) to replace make-coding-system with define-coding-system.
>> However, I can't debug it.
> 
> Not sure which version this corresponds to, but in [1]
> encode_coding_object started using safe_call instead of a plain call
> to run the pre-write-conversion function.  safe_call intentionally
> disables the debugger while running the function:
> 
>       /* Use Qt to ensure debugger does not run,
>          so there is no possibility of wanting to redisplay.  */
>       val = internal_condition_case_n (Ffuncall, nargs, args, Qt,
>                                        safe_eval_handler);
> 
> [1]: Tue Mar 29 00:34:38 2005
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d4850d674381d9493c94d30f8944a765e79537eb
> (decode_coding_object): Use safe_call1 instead of call1.
> (encode_coding_object): Use safe_call instead of call2.

Thanks for checking.  Ken'ichi, can you shed some light why you
changed this?  How shall I proceed?


    Werner




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#8108; Package emacs. Full text available.

Message received at 8108 <at> debbugs.gnu.org:


Received: (at 8108) by debbugs.gnu.org; 10 Dec 2016 15:11:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 10 10:11:06 2016
Received: from localhost ([127.0.0.1]:37090 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cFjIo-0007Ni-2z
	for submit <at> debbugs.gnu.org; Sat, 10 Dec 2016 10:11:06 -0500
Received: from mail-io0-f170.google.com ([209.85.223.170]:35591)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1cFjIm-0007ND-Ba
 for 8108 <at> debbugs.gnu.org; Sat, 10 Dec 2016 10:11:04 -0500
Received: by mail-io0-f170.google.com with SMTP id h30so105138383iod.2
 for <8108 <at> debbugs.gnu.org>; Sat, 10 Dec 2016 07:11:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=qdU/h/g8ak7HWeKT7TWrzAEy3T0PRzLrgTlED5Avf/g=;
 b=OnQLoOB09iOs+vWEIDx4uSbLh8z5DgO4UXoK/8wEfcKupD2xtMyoxE2fzLfK8q0FRu
 lcaEIAL/G712dq3WGh4lH0CgtlwkZHdQsC2wXt1PdQTjxzwsrTIO11g385hm+xVJx9NP
 j9ydYKdFci4SSqCKj0XsCSzh3+2GFeKtw7DNskcZw6BhDlqc06F0UoBjaHpNOmKcAwQC
 DLOiV8YZuqZmZrPhFHjx51J1xMRLNhTz8WfdrhMWz+5gygD9EaDMHjsOHHrAG6qwRxs0
 0CyIB8vu0/MhwLD3SYK8Cd+DQxlfqumv8gTu2+y0i1rBCoCLx61EIH5Hxf0GQmDirB1E
 b0VQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=qdU/h/g8ak7HWeKT7TWrzAEy3T0PRzLrgTlED5Avf/g=;
 b=YGCAuMG3jWS0HwBc6ATGmXBLow63JdQ2f34xnwGLjmmbqCgAHhj9zkf69vv3K+1r10
 N54XqPTShxtiL74wxuSA/vaJCU8d7kwldP36UUtJOYOghw9wk17/tqYiOZ3uWT46nucD
 Em+EmnNsH1faFjcodf8EMRofeBP/0ccvAN06deyrKaKzkosgR2QqNSmnMp4KfLc2wiDk
 1Q8GzSaREuFadrMzd1bvjaHv4lsSAkuVr+HtwspzhU4YYhKWBXubo2m0FqRRhoRp3r7D
 Dkx4ppiYdWpQpU0dJ8KzvuKtMHnw5uh+R/B9hkSHeolQDX/L967yuKqtXWRsJOEBzdwV
 0Nxw==
X-Gm-Message-State: AKaTC00jjjrhat8lMJZFvRxJVhZoIsbmwXhvmX5xWBY/EPRLXqluBX4ZTiYrvsugKOd/PQ==
X-Received: by 10.36.192.84 with SMTP id u81mr11460664itf.51.1481382658816;
 Sat, 10 Dec 2016 07:10:58 -0800 (PST)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id g185sm8909130ith.14.2016.12.10.07.10.58
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 10 Dec 2016 07:10:58 -0800 (PST)
From: npostavs@HIDDEN
To: Werner LEMBERG <wl@HIDDEN>
Subject: Re: bug#8108: 24.0.50;
 debugging pre-write-conversion in define-coding-system
References: <20110224.084058.453347781.wl@HIDDEN>
Date: Sat, 10 Dec 2016 10:12:01 -0500
In-Reply-To: <20110224.084058.453347781.wl@HIDDEN> (Werner LEMBERG's message
 of "Thu, 24 Feb 2011 08:40:58 +0100 (CET)")
Message-ID: <87k2b7es3i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 8108
Cc: 8108 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

Werner LEMBERG <wl@HIDDEN> writes:

> ----------------------------------------------------------------------
>
>
> I'm updating my cjk-enc.el package (part of the CJK bundle for LaTeX)
> to replace make-coding-system with define-coding-system.  However, I
> can't debug it.
>
> In previous Emacs versions, I've instrumented the function used for
> the pre-write-conversion hook, and the debugger correctly stops there.
> However, with a recent Emacs (bzr version 103411 from today) this no
> longer works.  Is this a bug?  Am I missing something?

Not sure which version this corresponds to, but in [1]
encode_coding_object started using safe_call instead of a plain call to
run the pre-write-conversion function.  safe_call intentionally disables
the debugger while running the function:

      /* Use Qt to ensure debugger does not run,
         so there is no possibility of wanting to redisplay.  */
      val = internal_condition_case_n (Ffuncall, nargs, args, Qt,
                                       safe_eval_handler);


[1]: Tue Mar 29 00:34:38 2005
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d4850d674381d9493c94d30f8944a765e79537eb
(decode_coding_object): Use safe_call1 instead of call1.
(encode_coding_object): Use safe_call instead of call2.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#8108; Package emacs. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug unarchived. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 8108-done <at> debbugs.gnu.org:


Received: (at 8108-done) by debbugs.gnu.org; 27 Dec 2011 03:55:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 26 22:55:16 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RfO8B-0005po-V9
	for submit <at> debbugs.gnu.org; Mon, 26 Dec 2011 22:55:16 -0500
Received: from mtaout21.012.net.il ([80.179.55.169])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1RfO88-0005pf-Ns
	for 8108-done <at> debbugs.gnu.org; Mon, 26 Dec 2011 22:55:14 -0500
Received: from conversion-daemon.a-mtaout21.012.net.il by
	a-mtaout21.012.net.il (HyperSendmail v2007.08) id
	<0LWU00G00G0GJP00@HIDDEN> for
	8108-done <at> debbugs.gnu.org; Tue, 27 Dec 2011 05:52:35 +0200 (IST)
Received: from HOME-C4E4A596F7 ([77.126.18.76]) by a-mtaout21.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0LWU00GO6G3MCGA0@HIDDEN>;
	Tue, 27 Dec 2011 05:52:35 +0200 (IST)
Date: Tue, 27 Dec 2011 05:52:39 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#8108: 24.0.50;
	debugging pre-write-conversion in define-coding-system
In-reply-to: <20111226.210344.227603265.wl@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Werner LEMBERG <wl@HIDDEN>
Message-id: <83fwg6wu0o.fsf@HIDDEN>
References: <20110224.084058.453347781.wl@HIDDEN>
	<20110421.074819.360562129.wl@HIDDEN> <83ipu82ctb.fsf@HIDDEN>
	<20111226.210344.227603265.wl@HIDDEN>
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 8108-done
Cc: 8108-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.1 (--)

> Date: Mon, 26 Dec 2011 21:03:44 +0100 (CET)
> Cc: 8108 <at> debbugs.gnu.org
> From: Werner LEMBERG <wl@HIDDEN>
> 
> 
> The problem has been solved meanwhile, thanks to Hin-Tak Leung who
> kindly revised `cjk-enc.el'.  It is not a bug in Emacs, but
> `char-charset' and `split-char' work differently in Emacs 23 and
> newer, and I missed this change.
> 
> Please close this bug report as invalid.

Done.




Notification sent to Werner LEMBERG <wl@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Eli Zaretskii <eliz@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 8108 <at> debbugs.gnu.org:


Received: (at 8108) by debbugs.gnu.org; 26 Dec 2011 20:06:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 26 15:06:24 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RfGoR-0000j5-LU
	for submit <at> debbugs.gnu.org; Mon, 26 Dec 2011 15:06:23 -0500
Received: from mailout-de.gmx.net ([213.165.64.22])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <werner.lemberg@HIDDEN>) id 1RfGoP-0000iy-Ew
	for 8108 <at> debbugs.gnu.org; Mon, 26 Dec 2011 15:06:22 -0500
Received: (qmail invoked by alias); 26 Dec 2011 20:03:46 -0000
Received: from 188-23-95-219.adsl.highway.telekom.at (EHLO localhost)
	[188.23.95.219]
	by mail.gmx.net (mp028) with SMTP; 26 Dec 2011 21:03:46 +0100
X-Authenticated: #54312696
X-Provags-ID: V01U2FsdGVkX1+Yxylp6WaYT4wfac7CVOjqzKuLvAawZA43Sh1fKY
	GNBAwTAEm3XXC/
Date: Mon, 26 Dec 2011 21:03:44 +0100 (CET)
Message-Id: <20111226.210344.227603265.wl@HIDDEN>
To: eliz@HIDDEN
Subject: Re: bug#8108: 24.0.50; debugging pre-write-conversion in
	define-coding-system
From: Werner LEMBERG <wl@HIDDEN>
In-Reply-To: <83ipu82ctb.fsf@HIDDEN>
References: <20110224.084058.453347781.wl@HIDDEN>
	<20110421.074819.360562129.wl@HIDDEN> <83ipu82ctb.fsf@HIDDEN>
X-Mailer: Mew version 6.4rc1 on Emacs 24.0.92.1 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 8108
Cc: 8108 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)


> I don't know enough about Edebug to help you understand why it
> doesn't get activated.

The problem has been solved meanwhile, thanks to Hin-Tak Leung who
kindly revised `cjk-enc.el'.  It is not a bug in Emacs, but
`char-charset' and `split-char' work differently in Emacs 23 and
newer, and I missed this change.

Please close this bug report as invalid.


    Werner




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#8108; Package emacs. Full text available.

Message received at 8108 <at> debbugs.gnu.org:


Received: (at 8108) by debbugs.gnu.org; 21 Apr 2011 09:06:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 21 05:06:54 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QCpqg-0003Gr-Eg
	for submit <at> debbugs.gnu.org; Thu, 21 Apr 2011 05:06:54 -0400
Received: from mtaout23.012.net.il ([80.179.55.175])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1QCpqe-0003Gf-AO
	for 8108 <at> debbugs.gnu.org; Thu, 21 Apr 2011 05:06:53 -0400
Received: from conversion-daemon.a-mtaout23.012.net.il by
	a-mtaout23.012.net.il (HyperSendmail v2007.08) id
	<0LJZ00500VU8R800@HIDDEN> for
	8108 <at> debbugs.gnu.org; Thu, 21 Apr 2011 12:06:13 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.124.129.240]) by a-mtaout23.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0LJZ005LVVYBRE00@HIDDEN>;
	Thu, 21 Apr 2011 12:06:13 +0300 (IDT)
Date: Thu, 21 Apr 2011 12:06:40 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#8108: 24.0.50;
	debugging pre-write-conversion in define-coding-system
In-reply-to: <20110421.074819.360562129.wl@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Werner LEMBERG <wl@HIDDEN>
Message-id: <83ipu82ctb.fsf@HIDDEN>
References: <20110224.084058.453347781.wl@HIDDEN>
	<20110421.074819.360562129.wl@HIDDEN>
X-Spam-Score: -1.8 (-)
X-Debbugs-Envelope-To: 8108
Cc: 8108 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.8 (-)

> Date: Thu, 21 Apr 2011 07:48:19 +0200 (CEST)
> From: Werner LEMBERG <wl@HIDDEN>
> 
> 
> Any takers?

I don't know enough about Edebug to help you understand why it doesn't
get activated.  However, if you can tell which version of Emacs was
last that did invoke the debugger, I could try looking for the changes
that could have caused that.  E.g., does that work in Emacs 23.x?

> The very problem is that cjk-enc.el, after being adapted
> to define-coding-system, completely fails: I no longer get any
> reasonable output, and all CJK characters disappear in the output.
> But without being able to debug I can't tell what and where exactly it
> is failing...

Are you comfortable with debugging on the C level, or does the
solution have to be on the Lisp level?

If the former, it looks like the pre-write-conversion function is
invoked in this fragment from encode_coding_object:

	args[0] = CODING_ATTR_PRE_WRITE (attrs);
	args[1] = make_number (BEG);
	args[2] = make_number (Z);
	safe_call (3, args);

By stepping into the safe_call function, then into Funcall that it
calls, you should be able to see how the Lisp interpreter runs the
code of you pre-write-conversion function and where it fails.  It is
less convenient than debugging in Lisp, but you still should be able
to display all the forms that are being evaluated, show the Lisp
backtrace with "xbacktrace", and even step into C-level primitives you
invoke from your pre-write-conversion function, something you cannot
do from Lisp.

Alternatively, maybe post here the code of your pre-write-conversion
function, perhaps someone will be able to find the problem just by
looking at the code.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#8108; Package emacs. Full text available.

Message received at 8108 <at> debbugs.gnu.org:


Received: (at 8108) by debbugs.gnu.org; 21 Apr 2011 05:48:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 21 01:48:32 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QCmki-0007FL-5X
	for submit <at> debbugs.gnu.org; Thu, 21 Apr 2011 01:48:32 -0400
Received: from mailout-de.gmx.net ([213.165.64.22])
	by debbugs.gnu.org with smtp (Exim 4.69)
	(envelope-from <werner.lemberg@HIDDEN>) id 1QCmkf-0007F8-LE
	for 8108 <at> debbugs.gnu.org; Thu, 21 Apr 2011 01:48:30 -0400
Received: (qmail invoked by alias); 21 Apr 2011 05:48:22 -0000
Received: from 188-23-91-62.adsl.highway.telekom.at (EHLO localhost)
	[188.23.91.62]
	by mail.gmx.net (mp072) with SMTP; 21 Apr 2011 07:48:22 +0200
X-Authenticated: #54312696
X-Provags-ID: V01U2FsdGVkX1+gYM40vXOg7A31yzJ5h9/cUgKrxOBl0ngJ9TLqJ6
	kspopaM1FsNjuZ
Date: Thu, 21 Apr 2011 07:48:19 +0200 (CEST)
Message-Id: <20110421.074819.360562129.wl@HIDDEN>
To: 8108 <at> debbugs.gnu.org
Subject: Re: bug#8108: 24.0.50; debugging pre-write-conversion in
	define-coding-system
From: Werner LEMBERG <wl@HIDDEN>
In-Reply-To: <20110224.084058.453347781.wl@HIDDEN>
References: <20110224.084058.453347781.wl@HIDDEN>
X-Mailer: Mew version 6.3.50 on Emacs 24.0.50.1 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 8108
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)


Any takers?  The very problem is that cjk-enc.el, after being adapted
to define-coding-system, completely fails: I no longer get any
reasonable output, and all CJK characters disappear in the output.
But without being able to debug I can't tell what and where exactly it
is failing...

Maybe there is a simple workaround?


    Werner




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#8108; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Feb 2011 07:41:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 24 02:41:17 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1PsVp6-0004fb-JY
	for submit <at> debbugs.gnu.org; Thu, 24 Feb 2011 02:41:16 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <werner.lemberg@HIDDEN>) id 1PsVp4-0004fO-1P
	for submit <at> debbugs.gnu.org; Thu, 24 Feb 2011 02:41:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <werner.lemberg@HIDDEN>) id 1PsVoy-00040A-2e
	for submit <at> debbugs.gnu.org; Thu, 24 Feb 2011 02:41:09 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([199.232.76.165]:34259)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <werner.lemberg@HIDDEN>) id 1PsVoy-000405-04
	for submit <at> debbugs.gnu.org; Thu, 24 Feb 2011 02:41:08 -0500
Received: from [140.186.70.92] (port=46416 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1PsVow-0006LT-Ku
	for bug-gnu-emacs@HIDDEN; Thu, 24 Feb 2011 02:41:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <werner.lemberg@HIDDEN>) id 1PsVov-0003zf-3H
	for bug-gnu-emacs@HIDDEN; Thu, 24 Feb 2011 02:41:06 -0500
Received: from mailout-de.gmx.net ([213.165.64.22]:40493)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <werner.lemberg@HIDDEN>) id 1PsVou-0003zO-L4
	for bug-gnu-emacs@HIDDEN; Thu, 24 Feb 2011 02:41:05 -0500
Received: (qmail invoked by alias); 24 Feb 2011 07:41:02 -0000
Received: from 178-191-190-73.adsl.highway.telekom.at (EHLO localhost)
	[178.191.190.73]
	by mail.gmx.net (mp050) with SMTP; 24 Feb 2011 08:41:02 +0100
X-Authenticated: #54312696
X-Provags-ID: V01U2FsdGVkX1/8GMYcRZv89JMoOFFyH1/NedQW+MNsVslBID0eWZ
	YLrX9K1ZzN/OKv
Date: Thu, 24 Feb 2011 08:40:58 +0100 (CET)
Message-Id: <20110224.084058.453347781.wl@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.0.50; debugging pre-write-conversion in define-coding-system
From: Werner LEMBERG <wl@HIDDEN>
X-Mailer: Mew version 6.3.50 on Emacs 24.0.50.1 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 199.232.76.165
X-Spam-Score: -5.9 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.9 (-----)

----------------------------------------------------------------------


I'm updating my cjk-enc.el package (part of the CJK bundle for LaTeX)
to replace make-coding-system with define-coding-system.  However, I
can't debug it.

In previous Emacs versions, I've instrumented the function used for
the pre-write-conversion hook, and the debugger correctly stops there.
However, with a recent Emacs (bzr version 103411 from today) this no
longer works.  Is this a bug?  Am I missing something?

Here's an example, defining an encoding called `foo-coding'.  Trying
to instrument `foo-encode', then saving an arbitrary test file with
`foo-coding', the debugger doesn't get invoked.


(define-coding-system
  'foo-coding
  "Coding-system foo"
  :mnemonic ?c
  :coding-type 'emacs-mule
  :charset-list '(ascii)
  :pre-write-conversion 'foo-encode)

(defun foo-encode (from to)
  (insert "foo"))


----------------------------------------------------------------------


In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.22.1)
 of 2011-02-24 on linux-nvf0.site
Windowing system distributor `The X.Org Foundation', version 11.0.10903000
configured using `configure  'MAKEINFO=/usr/bin/makeinfo''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Summary

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  transient-mark-mode: t

Recent input:
M-x m e w <return> <return> d d SPC d d x i <return> 
d x M-x e m a c s - v e <tab> <tab> <return> g B a 
<tab> <return> C-r e m a c s C-r C-a <return> M-x e 
m a c s - b <tab> C-g b u f <backspace> <backspace> 
b u g <tab> <tab> C-g M-x e m a c s - <tab> C-g M-x 
b u g <tab> <tab> C-g M-x r e p o <tab> r t <tab> 
<return>

Recent messages:
Refiling and deleting...done
GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.22.1) of 2011-02-24 on linux-nvf0.site
Scanning +Backup...done
Mark saved where search started
Quit [2 times]
Making completion list...
Quit
Making completion list...
Quit
Making completion list...

Load-path shadows:
None found.

Features:
(shadow emacsbug url-util url-parse auth-source eieio byte-opt
bytecomp byte-compile assoc gnus-util time-date password-cache
url-vars mm-util mail-prsvr multi-isearch pp mew-varsx mew-unix
cal-menu calendar cal-loaddefs mew-auth mew-config mew-imap2 mew-imap
mew-nntp2 mew-nntp mew-pop mew-smtp mew-ssl mew-ssh mew-net
mew-highlight mew-sort mew-fib mew-ext mew-refile mew-demo mew-attach
mew-draft mew-message mew-thread mew-virtual mew-summary4 mew-summary3
mew-summary2 mew-summary mew-search mew-pick mew-passwd mew-scan
mew-syntax mew-bq mew-smime mew-pgp mew-header mew-exec mew-mark
mew-mime mew-edit mew-decode mew-encode mew-cache mew-minibuf
mew-complete mew-addrbook mew-local mew-vars3 mew-vars2 mew-vars
mew-env mew-mule3 mew-mule mew-gemacs mew-key mew-func mew-blvs
mew-const mew tex regexp-opt advice help-fns advice-preload tex-site
auto-loads quail help-mode easymenu view cjktilde disp-table tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
cus-face files text-properties overlay md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)




Acknowledgement sent to Werner LEMBERG <wl@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#8108; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.