From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: set-process-filter-multibyte doesn't work well Date: Sat, 08 Mar 2008 15:57:10 -0500 Message-ID: References: <20080308.225158.1122121162433191858.matsuyama@ariel-networks.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1205009845 25131 80.91.229.12 (8 Mar 2008 20:57:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 20:57:25 +0000 (UTC) Cc: MATSUYAMA Tomohiro , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 08 21:57:52 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JY676-0003p4-0V for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 21:57:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY66Y-0006WE-4X for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 15:57:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JY66T-0006Uv-Az for emacs-devel@gnu.org; Sat, 08 Mar 2008 15:57:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JY66R-0006T0-Is for emacs-devel@gnu.org; Sat, 08 Mar 2008 15:57:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY66R-0006Sq-Cy for emacs-devel@gnu.org; Sat, 08 Mar 2008 15:57:11 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JY66R-0004fb-2g for emacs-devel@gnu.org; Sat, 08 Mar 2008 15:57:11 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcCAEeM0kfO+J2CdGdsb2JhbACQfQEwmRiBBw X-IronPort-AV: E=Sophos;i="4.25,468,1199682000"; d="scan'208";a="15746892" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 08 Mar 2008 15:57:10 -0500 Original-Received: from pastel.home ([206.248.157.130]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id OXN48710; Sat, 08 Mar 2008 15:57:10 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 16AD47F60; Sat, 8 Mar 2008 15:57:10 -0500 (EST) In-Reply-To: (Andreas Schwab's message of "Sat, 08 Mar 2008 16:45:08 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91776 Archived-At: >> (require 'comint) >> (make-comint "jdb" "jdb") >> (setq proc (get-process "jdb")) >> (set-process-filter-multibyte proc t) >> (process-filter-multibyte-p proc) ;; =3D> nil >>=20 >> I don't understand what happened in Fset_process_filter_multibyte :-( I'd like to phase out process-filter-multibyte, so could you try to write the code, without (set-)process-filter-multibyte, which (ideally) should do the right thing, and then make a bug-report if it doesn't do what it should? The "multibyteness of a process filter" should just depend on the coding system used and nothing more. > Does this patch help? Bitfields declared as int can be either signed or > unsigned, and signed one-bit fields are not particular useful. This is a good change, please install it, Stefan > --- process.h 09 Jan 2008 10:29:39 +0100 1.41 > +++ process.h 08 M=E4r 2008 16:41:00 +0100=09 > @@ -102,28 +102,28 @@ struct Lisp_Process > /* Should we delay reading output from this process. > Initialized from `Vprocess_adaptive_read_buffering'. > 0 =3D nil, 1 =3D t, 2 =3D other. */ > - int adaptive_read_buffering : 2; > + unsigned int adaptive_read_buffering : 2; > /* Skip reading this process on next read. */ > - int read_output_skip : 1; > + unsigned int read_output_skip : 1; > /* Non-nil means kill silently if Emacs is exited. > This is the inverse of the `query-on-exit' flag. */ > - int kill_without_query : 1; > + unsigned int kill_without_query : 1; > /* Non-nil if communicating through a pty. */ > - int pty_flag : 1; > + unsigned int pty_flag : 1; > /* Flag to set coding-system of the process buffer from the > coding_system used to decode process output. */ > - int inherit_coding_system_flag : 1; > + unsigned int inherit_coding_system_flag : 1; > /* Flag to decide the multibyteness of a string given to the > filter (if any). It is initialized to the value of > `default-enable-multibyte-characters' when the process is > generated, and can be changed by the function > `set-process-filter-multibyte'. */ > - int filter_multibyte : 1; > + unsigned int filter_multibyte : 1; > /* Record the process status in the raw form in which it comes from = `wait'. > This is to avoid consing in a signal handler. The `raw_status_ne= w' > flag indicates that `raw_status' contains a new status that still > needs to be synced to `status'. */ > - int raw_status_new : 1; > + unsigned int raw_status_new : 1; > int raw_status; > }; =20 > Andreas. > --=20 > Andreas Schwab, SuSE Labs, schwab@suse.de > SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany > PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different."