From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: gnus should accept UTF8 even if UTF-8 is standard Date: Mon, 10 Nov 2008 10:01:29 -0500 Message-ID: References: <87iqruvs19.fsf@jidanni.org> <86od1mj3z2.fsf@lifelogs.com> <86od1lg3xq.fsf@lifelogs.com> <87d4i1iqpq.fsf@marauder.physik.uni-ulm.de> <86k5c9fzm9.fsf@lifelogs.com> <878wsph5xr.fsf@marauder.physik.uni-ulm.de> <87wsg345oo.fsf@marauder.physik.uni-ulm.de> <86wsg2546l.fsf@lifelogs.com> <86abct3o4s.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226329318 22799 80.91.229.12 (10 Nov 2008 15:01:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Nov 2008 15:01:58 +0000 (UTC) Cc: tzz@lifelogs.com, rms@gnu.org, ding@gnus.org, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 10 16:02:59 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 1KzYI1-00026x-QB for ged-emacs-devel@m.gmane.org; Mon, 10 Nov 2008 16:02:54 +0100 Original-Received: from localhost ([127.0.0.1]:47427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzYGu-0001GM-7n for ged-emacs-devel@m.gmane.org; Mon, 10 Nov 2008 10:01:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzYGp-0001Fn-1p for emacs-devel@gnu.org; Mon, 10 Nov 2008 10:01:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzYGo-0001FB-3S for emacs-devel@gnu.org; Mon, 10 Nov 2008 10:01:38 -0500 Original-Received: from [199.232.76.173] (port=56305 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzYGn-0001F4-Ut for emacs-devel@gnu.org; Mon, 10 Nov 2008 10:01:37 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:44182) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KzYGm-0007tW-OR; Mon, 10 Nov 2008 10:01:36 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAAPbF0lFxLQU/2dsb2JhbACBdshzg1iBEQ X-IronPort-AV: E=Sophos;i="4.33,575,1220241600"; d="scan'208";a="29617382" Original-Received: from 69-196-180-20.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.20]) by ironport2-out.teksavvy.com with ESMTP; 10 Nov 2008 10:01:32 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 611C589DE; Mon, 10 Nov 2008 10:01:29 -0500 (EST) In-Reply-To: (Kenichi Handa's message of "Mon, 10 Nov 2008 14:43:06 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: 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:105532 gmane.emacs.gnus.general:67782 Archived-At: >> === modified file 'lisp/international/mule.el' >> --- lisp/international/mule.el 2008-07-24 03:10:36 +0000 >> +++ lisp/international/mule.el 2008-10-31 21:08:00 +0000 >> @@ -1192,6 +1192,10 @@ >> (widen) >> (goto-char (point-min)) >> (set-auto-coding buffer-file-name (buffer-size)))))) >> + (completion-ignore-case t) >> + (completion-pcm--delim-wild-regex >> + (concat completion-pcm--delim-wild-regex >> + "\\|\\([[:alpha:]]\\)[[:digit:]]")) >> (cs (completing-read (format "Coding system for saving file (default %s): " auto-cs) >> (completion-table-in-turn >> bcss-table combined-table) > This hunk can't be applied to the current mule.el. In which function > should this change be applied? The above is from my own code, it's not in Emacs. If you want the complete code, it's the interactive spec I use for set-buffer-file-coding-system, so that completion is first done only on the applicable coding systems. But the intent of the patch was just to show what the code would look like: it would be placed inside a new `read-coding-system' function. Stefan ;; FIXME: provide a useful default (e.g. the one that ;; select-safe-coding-system would have chosen, or the next best one if ;; it's already the current coding system). (interactive (let* ((bcss (find-coding-systems-region (point-min) (point-max))) (bcss-table (append '("dos" "unix" "mac") (unless (equal bcss '(undecided)) (mapcar 'symbol-name (sanitize-coding-system-list bcss))))) (css-table (unless (equal bcss '(undecided)) (delq nil (mapcar (lambda (cs) (if (memq (coding-system-base cs) bcss) (symbol-name cs))) coding-system-list)))) (combined-table (completion-table-in-turn css-table coding-system-alist)) (auto-cs (unless find-file-literally (save-excursion (save-restriction (widen) (goto-char (point-min)) (set-auto-coding buffer-file-name (buffer-size)))))) (cs (completing-read (format "Coding system for saving file (default %s): " auto-cs) (completion-table-in-turn bcss-table combined-table) nil t nil 'coding-system-history (if auto-cs (symbol-name auto-cs))))) (list (unless (zerop (length cs)) (intern cs)) current-prefix-arg)))