From unknown Fri Aug 15 14:15:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#79136 <79136@debbugs.gnu.org> To: bug#79136 <79136@debbugs.gnu.org> Subject: Status: [PATCH] Inhibit warning for missing lexbind cookie in kkc init file Reply-To: bug#79136 <79136@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:15:26 +0000 retitle 79136 [PATCH] Inhibit warning for missing lexbind cookie in kkc ini= t file reassign 79136 emacs submitter 79136 Sean Devlin severity 79136 normal tag 79136 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 31 14:21:33 2025 Received: (at submit) by debbugs.gnu.org; 31 Jul 2025 18:21:33 +0000 Received: from localhost ([127.0.0.1]:49793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uhXuH-0002K1-8a for submit@debbugs.gnu.org; Thu, 31 Jul 2025 14:21:33 -0400 Received: from lists.gnu.org ([2001:470:142::17]:34446) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uhXuE-0002Je-RF for submit@debbugs.gnu.org; Thu, 31 Jul 2025 14:21:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uhXu7-0003zK-Ph for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2025 14:21:23 -0400 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uhXu5-00029W-Kn for bug-gnu-emacs@gnu.org; Thu, 31 Jul 2025 14:21:23 -0400 Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-7e169ac6009so9653485a.0 for ; Thu, 31 Jul 2025 11:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20230601.gappssmtp.com; s=20230601; t=1753986080; x=1754590880; darn=gnu.org; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=tpq2peQFEllV5Q47vIzJzEFJbChatNFgXV6rJxqo4D4=; b=UPf+/Sk3NKVV0togMBsyhY2g1z99jQ8QynSwtucWiVJc9o/4+PMeSrU/3wGSlpYQDZ 6gQfvvhaKev9nKzKtzixxQJ9h4rQxHC2pD9qlVns6KS9Us8rYoZWlUajjuM0FUVfSZic MnoTxlhuniMDtPlR7TvB0o77wG96RvQCUk2usyaM1gax/S29LJAU0hD+gbPRNhtmsRQT Ys8jJDaG89Teec2chaYW+mWV9xyJlsqy9HIezLBFhOzzEmFQsjpduetW8qUyOyMvMYip ++iX9kZWqtXc0YBUJr0XV9rJ+q3tWLogVya7Erncd66y4+Q9gS3DvKd2c4uHkwkSNAWw JnKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753986080; x=1754590880; h=to:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tpq2peQFEllV5Q47vIzJzEFJbChatNFgXV6rJxqo4D4=; b=V2mK35FUeCxqDwZEgpN2PSnS+c8SivDr4DhXrXfkIHFaze1Csj5GjrdkCO8vreFkCi wLQ0bfAYA4fLvqdkbMb/6u6XA7X/LoeNZB0AfzU8uOvVG/fL56ksfi44v+jkcgFKBRXG V+6243cxOahaRft5lTiI+aU4INZTjOe4c4KI1BS5m1E0bfGQtUmJp55F9BqGHdOWQ2/W /oYum9GSkXxzpTECMxNBIYT2s3KHYlRhw/xeoOS9PflwqYp/klAMlDyAfgjZbsObFjfM bo7mYidJtVobxCkx1iEbVVgkUaoldQqKJ9wB00nBgKeuPbacrEAn8kSs0RxqMga+5MUl 6c9A== X-Gm-Message-State: AOJu0Yx2KCwmYx3FuN84APDQqO/DwznvEsTSQ7BRwzWqHDcv1x9qF/DD H6zV7S22rW+W1/MUeQAWdnAywGkn0RMhzRZcy1b8gCp/ex5J+3Jxkr61pA+ppziNtJS7njeiN53 Sv2Z4 X-Gm-Gg: ASbGnculZ5kOAq5LLjuXcZMnrYiN210fMRgYZ5BskQGyIt87APDKWKDhT6m8VJCPBTO 0nSvCwp991MfT52fUzPZQkg0eYJvmkBm+Y/24p8Xp/SFhLmtTEWaZuW9Y2aIssmST2/KcXhOgak K87H7n6EBGpzZ7E7L6d+3inWkpME0tNz/MCKHlGdXIkfFe2KSwrfyHfUhkr2I7c7+iXs8gAl8qh 8TsRo9lbsGcR75eIGes/drwecF0d+BcvxKJUXYyHzT2acTnSYaMfzxXoGUYiJaPEBVKg6NOqH9f d13aaWrMp/6wweTrmYNoCY4IiQampisWSV9rdm3f+0l/saj915l/NltgXo9qn9cT45uJcyu75t/ Hz3Wr4Hwl8WHIjNxAeBGht/KQ1jjFeWt5fSw8keGdNb6K6A== X-Google-Smtp-Source: AGHT+IGgTM5IPohdaNb7svnHy+haRhuA2ukXyLL/TOwjal2MxBE7ugj6pC2GoHWPgQR0Dm8ZG+miNA== X-Received: by 2002:a05:620a:a10d:b0:7d4:4aa6:a509 with SMTP id af79cd13be357-7e66f39138amr1369243785a.48.1753986078881; Thu, 31 Jul 2025 11:21:18 -0700 (PDT) Received: from smtpclient.apple ([2601:241:8100:88a0:d8c3:7a91:1514:30e9]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7e67f59441asm118514885a.5.2025.07.31.11.21.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jul 2025 11:21:18 -0700 (PDT) From: Sean Devlin Content-Type: multipart/mixed; boundary="Apple-Mail=_E259546D-B777-4B6C-8441-BB35747A4B3E" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: [PATCH] Inhibit warning for missing lexbind cookie in kkc init file Message-Id: <3F9A7B66-FD7A-4A61-9DDB-B9AEA62A41B6@toadstyle.org> Date: Thu, 31 Jul 2025 13:21:07 -0500 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3826.700.81) Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=spd@toadstyle.org; helo=mail-qk1-x72f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (/) --Apple-Mail=_E259546D-B777-4B6C-8441-BB35747A4B3E Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Hi folks, This change is to suppress a warning for a missing lexical-binding cookie in the kkcrc file used by the Japanese input method. Emacs generates this file, and AFAICT it is not meant to be edited by users. To reproduce the warning: 1. mkdir /tmp/emacs-kkcrc 2. HOME=/tmp/emacs-kkcrc emacs 3. q > Dismiss the start screen 4. C-\ japanese RET 5. nihongo SPC RET > Enter some Japanese text 6. C-x C-c 7. Repeat steps 2-5 On the second iteration of step 5, you should seen a warning message when Emacs loads the kkcrc file. I looked at how this was handled elsewhere and made the attached patch. Please let me know if anything else is required. Thanks! In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.6.0, NS appkit-2575.70 Version 15.6 (Build 24G5065c)) of 2025-07-16 built on beatrix.local Repository revision: 087a11d1372d02bd45c1efbcf2fc7e5a98ddf1e5 Repository branch: spd-igc Windowing system distributor 'Apple', version 10.3.2575 System Description: macOS 15.6 Configured using: 'configure --with-ns --with-modules --with-native-compilation --with-libgmp --with-tree-sitter --with-sqlite3 --with-mps=yes --without-imagemagick --without-dbus CPPFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig ac_cv_func_posix_spawn_file_actions_addchdir=no' --Apple-Mail=_E259546D-B777-4B6C-8441-BB35747A4B3E Content-Disposition: attachment; filename=0001-Inhibit-warning-for-missing-lexbind-cookie-in-kkc-in.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Inhibit-warning-for-missing-lexbind-cookie-in-kkc-in.patch" Content-Transfer-Encoding: quoted-printable =46rom=2064b710b3819714999551fa96f5e21503f595f566=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Sean=20Devlin=20=0ADate:=20= Thu,=2031=20Jul=202025=2013:03:37=20-0500=0ASubject:=20[PATCH]=20Inhibit=20= warning=20for=20missing=20lexbind=20cookie=20in=20kkc=20init=20file=0A=0A= *=20lisp/international/kkc.el=20(kkc-lookup-key):=20Bind=0A= 'warning-inhibit-types'=20to=20suppress=20warning=20for=20missing=20= lexbind=20cookie=0Ain=20kkc=20init=20file.=0A---=0A=20= lisp/international/kkc.el=20|=203=20++-=0A=201=20file=20changed,=202=20= insertions(+),=201=20deletion(-)=0A=0Adiff=20--git=20= a/lisp/international/kkc.el=20b/lisp/international/kkc.el=0Aindex=20= 6d603cf831a..d818096cd80=20100644=0A---=20a/lisp/international/kkc.el=0A= +++=20b/lisp/international/kkc.el=0A@@=20-178,7=20+178,8=20@@=20= kkc-lookup-key=0A=20=20=20=20=20(add-hook=20'kill-emacs-hook=20= 'kkc-save-init-file)=0A=20=20=20=20=20(if=20(file-readable-p=20= kkc-init-file-name)=0A=20=09(condition-case=20nil=0A-=09=20=20=20=20= (load-file=20kkc-init-file-name)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= (let=20((warning-inhibit-types=20'((files=20missing-lexbind-cookie))))=0A= +=09=20=20=20=20=20=20(load-file=20kkc-init-file-name))=0A=20=09=20=20= (kkc-error=20"Invalid=20data=20in=20%s"=20kkc-init-file-name))))=0A=20=20= =20(or=20(and=20(nested-alist-p=20kkc-lookup-cache)=0A=20=09=20=20=20(eq=20= (car=20kkc-lookup-cache)=20kkc-lookup-cache-tag))=0A--=20=0A2.39.5=20= (Apple=20Git-154)=0A=0A= --Apple-Mail=_E259546D-B777-4B6C-8441-BB35747A4B3E-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 02 05:08:18 2025 Received: (at 79136) by debbugs.gnu.org; 2 Aug 2025 09:08:18 +0000 Received: from localhost ([127.0.0.1]:34194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ui8Dx-00034h-Tb for submit@debbugs.gnu.org; Sat, 02 Aug 2025 05:08:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36882) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ui8Ds-000349-TU for 79136@debbugs.gnu.org; Sat, 02 Aug 2025 05:08:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ui8Dm-0003EY-SI; Sat, 02 Aug 2025 05:08:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YGMCPHpn6A9eHt5Me9w88MgCi5ZXReDOlX62DSMOp2o=; b=UJpefCKhrIwX vQwSjS+4s5R2rPnbWBSzgf9CVe/Ik9cAi8jNLjqp7pILbXFIEuwgs9hvpa0z2g+veR0wA6wGhcXuj vDy4Hedlg5V4hg/UVX8uSKSffa5UC+hoYqoToowEp17V9U3QIWYqOMFg99Yj+n+HxHoxJrKIOfRXb nHtZrB3no4vQx7g8zih2rt3IzQ3qymKP/0t4G66S4Nq0/QJxxOFwfstENqJrZw8cwDoJbTyMiseNC a0z9TK3MgvpKcDQ3i0BFLMmn56CZIixc2lyyIr5rjjKxFNB55uRFrFW+Q5xzElfeIgfb6yS9xZqbb 75k2l1XI7ppnzW09G5BVKw==; Date: Sat, 02 Aug 2025 12:08:03 +0300 Message-Id: <86ikj6rszw.fsf@gnu.org> From: Eli Zaretskii To: Sean Devlin In-Reply-To: <3F9A7B66-FD7A-4A61-9DDB-B9AEA62A41B6@toadstyle.org> (message from Sean Devlin on Thu, 31 Jul 2025 13:21:07 -0500) Subject: Re: bug#79136: [PATCH] Inhibit warning for missing lexbind cookie in kkc init file References: <3F9A7B66-FD7A-4A61-9DDB-B9AEA62A41B6@toadstyle.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79136 Cc: 79136@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > From: Sean Devlin > Date: Thu, 31 Jul 2025 13:21:07 -0500 > > This change is to suppress a warning for a missing lexical-binding > cookie in the kkcrc file used by the Japanese input method. Emacs > generates this file, and AFAICT it is not meant to be edited by users. > > To reproduce the warning: > > 1. mkdir /tmp/emacs-kkcrc > 2. HOME=/tmp/emacs-kkcrc emacs > 3. q > Dismiss the start screen > 4. C-\ japanese RET > 5. nihongo SPC RET > Enter some Japanese text > 6. C-x C-c > 7. Repeat steps 2-5 > > On the second iteration of step 5, you should seen a warning message > when Emacs loads the kkcrc file. > > I looked at how this was handled elsewhere and made the attached patch. Thanks. The patch you send was almost okay, but we want in addition to make sure this file does have the cookie when written by Emacs 31 and later. So please see if the alternative patch below gives good results. diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el index 6d603cf..9abf35f 100644 --- a/lisp/international/kkc.el +++ b/lisp/international/kkc.el @@ -64,9 +64,12 @@ kkc-save-init-file (not (eq kkc-init-file-flag t))) (let ((coding-system-for-write 'iso-2022-7bit) (print-length nil)) - (write-region (format "(setq kkc-lookup-cache '%S)\n" kkc-lookup-cache) - nil - kkc-init-file-name)))) + (write-region + (format + "-*- lexical-binding: t; -*-\n\n(setq kkc-lookup-cache '%S)\n" + kkc-lookup-cache) + nil + kkc-init-file-name)))) ;; Sequence of characters to be used for indexes for shown list. The ;; Nth character is for the Nth conversion in the list currently shown. @@ -178,7 +181,8 @@ kkc-lookup-key (add-hook 'kill-emacs-hook 'kkc-save-init-file) (if (file-readable-p kkc-init-file-name) (condition-case nil - (load-file kkc-init-file-name) + (let ((warning-inhibit-types '((files missing-lexbind-cookie)))) + (load-file kkc-init-file-name)) (kkc-error "Invalid data in %s" kkc-init-file-name)))) (or (and (nested-alist-p kkc-lookup-cache) (eq (car kkc-lookup-cache) kkc-lookup-cache-tag)) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 02 10:04:14 2025 Received: (at 79136) by debbugs.gnu.org; 2 Aug 2025 14:04:14 +0000 Received: from localhost ([127.0.0.1]:36764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiCqM-0002bP-7z for submit@debbugs.gnu.org; Sat, 02 Aug 2025 10:04:14 -0400 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]:42273) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uiCqJ-0002b0-BT for 79136@debbugs.gnu.org; Sat, 02 Aug 2025 10:04:12 -0400 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3e3f6ae4d08so12227245ab.1 for <79136@debbugs.gnu.org>; Sat, 02 Aug 2025 07:04:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20230601.gappssmtp.com; s=20230601; t=1754143445; x=1754748245; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=+6B4iRVjXZTyFLlCP14zi6HshhSIa2/MF0f9jk9Qeg8=; b=TLt//Z2+ZRkjKnrmB6rgUPgxbnN6f7i2s9bG+crfsJynG333ZjMWYUAdl8i1Lm1Ira x1/2wFYCRymLgWBAxe6NJOuvYsDx1BRwZhhU/GXws6bufz4RZQiEbk2aL65T9RkzZsfH eS9LbwNC8V21dvMVYoEAGsMcOChp/1wIBLkRTkyRUtprdJDrT2y/2OpB/O4+IBzTClT3 jR5D6ETCPBbjrUgF3lAAOdLrbW0ZmlqAHfvwQEHNXoDbnkI0gpa293s3CcJaoFFyhuNY i1gY9PqNJ2TZbwqWrhBDQl1lYiAS3T37Xv2INoKKscViXgsFU2AxljC89caG10P8taK8 caAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754143445; x=1754748245; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+6B4iRVjXZTyFLlCP14zi6HshhSIa2/MF0f9jk9Qeg8=; b=UztMAK6ybmDKABapPV37gNKe4KxHo9vhKL+hPbyglVRc4koqlVeGuy+rROS+NmMvYN Q7WVAfWKkUKR0om/64kWLdI7wzNcnzlhmRCUJY/eDsa+szc1AKVr29LGPGASmOJpcQlB hrPydOHpuI5a9zoeE+bsg8bNTz2v7Ypfz8rjX6KW/qtKJE9thzxdEu33scKlE5olDy1r q0iRoaH5Qs3rXiN+xPNjVSKyqMADKL77Dqim1s/W+PrI1UeEa1fVTNXK4rCsRKCVVUvg qicFMuNwOl9OxMdGfk5Xwcgo9sRGqIsComAu1tuqFJXAyEMwZMobVSNKYf0hu5Qsq9ZN bB8A== X-Gm-Message-State: AOJu0YzjKbZREUi8+WNV179DSaJTzJseVHqTl53kwbjFVKrBTli6VmwU +mFxsK4BclhZaqM3qKe8Q2KS462mK+NwgApyGPXQKQTYRV0q4RbDPPUQs5r5IrvARkM= X-Gm-Gg: ASbGncugXv626J0F487rf5HCOCXnOsIAX3yE90nH/t4O1jxB85cMBiLX9vew8TmBAmc NHJkgh1nmLH6KXob+7/NouVFI2okCFv7wRVDCHjfOQMPMdlsxrYhNd8uz19Y2x5RY+0Vqi8jTaD of9aMNy7Q2dix44DNmoYNER10kCE4z04Wc6W1wZ2UAAvkDHUHm0sI8Vrz3nOZmpR/DzJJZ2/89E 1BsJ1aY4I8uZ2fQfJSYLJTnUNsHNclYZRYcl4og/zwL0jHhGvVofCxurEDHJMwgVT/Kr/tKnD8Q GtvUl3IHVo29FhW9i5tPM7s5ikb3VSesgQ3XvUaukNq1ncbupTUYVUHapMAhoZ5VVuW/T2E1S43 cIxi2ZPqvL9tIE0SP+HXjtWrf/3w5fpWZ8zIL5vQOVLkzxg9RLHOP4f2Z0wc/pH0T/Bf3ttQ= X-Google-Smtp-Source: AGHT+IFqeaErT+hRQ/q4Hk0ZtUov8wA1V7DYOjPNkuOq26w1r5HIdICbHgfO4bdyQp0sS4JW3SZBhw== X-Received: by 2002:a05:6e02:349c:b0:3e3:cbaa:e630 with SMTP id e9e14a558f8ab-3e415e3f11fmr62232755ab.8.1754143445071; Sat, 02 Aug 2025 07:04:05 -0700 (PDT) Received: from smtpclient.apple (c-67-167-5-111.hsd1.il.comcast.net. [67.167.5.111]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3e4029cd5desm25181905ab.23.2025.08.02.07.04.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Aug 2025 07:04:04 -0700 (PDT) From: Sean Devlin Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_B07FC5DC-4159-403B-BFBA-316DA8DE0F1E" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: bug#79136: [PATCH] Inhibit warning for missing lexbind cookie in kkc init file Date: Sat, 2 Aug 2025 09:03:53 -0500 In-Reply-To: <86ikj6rszw.fsf@gnu.org> To: Eli Zaretskii References: <3F9A7B66-FD7A-4A61-9DDB-B9AEA62A41B6@toadstyle.org> <86ikj6rszw.fsf@gnu.org> X-Mailer: Apple Mail (2.3826.700.81) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79136 Cc: 79136@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) --Apple-Mail=_B07FC5DC-4159-403B-BFBA-316DA8DE0F1E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 2, 2025, at 4:08=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Sean Devlin >> Date: Thu, 31 Jul 2025 13:21:07 -0500 >>=20 >> This change is to suppress a warning for a missing lexical-binding >> cookie in the kkcrc file used by the Japanese input method. Emacs >> generates this file, and AFAICT it is not meant to be edited by = users. >>=20 >> To reproduce the warning: >>=20 >> 1. mkdir /tmp/emacs-kkcrc >> 2. HOME=3D/tmp/emacs-kkcrc emacs >> 3. q > Dismiss the start screen >> 4. C-\ japanese RET >> 5. nihongo SPC RET > Enter some Japanese text >> 6. C-x C-c >> 7. Repeat steps 2-5 >>=20 >> On the second iteration of step 5, you should seen a warning message >> when Emacs loads the kkcrc file. >>=20 >> I looked at how this was handled elsewhere and made the attached = patch. >=20 > Thanks. The patch you send was almost okay, but we want in addition > to make sure this file does have the cookie when written by Emacs 31 > and later. So please see if the alternative patch below gives good > results. >=20 > diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el > index 6d603cf..9abf35f 100644 > --- a/lisp/international/kkc.el > +++ b/lisp/international/kkc.el > @@ -64,9 +64,12 @@ kkc-save-init-file > (not (eq kkc-init-file-flag t))) > (let ((coding-system-for-write 'iso-2022-7bit) > (print-length nil)) > - (write-region (format "(setq kkc-lookup-cache '%S)\n" = kkc-lookup-cache) > - nil > - kkc-init-file-name)))) > + (write-region > + (format > + "-*- lexical-binding: t; -*-\n\n(setq kkc-lookup-cache = '%S)\n" > + kkc-lookup-cache) > + nil > + kkc-init-file-name)))) >=20 > ;; Sequence of characters to be used for indexes for shown list. The > ;; Nth character is for the Nth conversion in the list currently = shown. > @@ -178,7 +181,8 @@ kkc-lookup-key > (add-hook 'kill-emacs-hook 'kkc-save-init-file) > (if (file-readable-p kkc-init-file-name) > (condition-case nil > - (load-file kkc-init-file-name) > + (let ((warning-inhibit-types '((files = missing-lexbind-cookie)))) > + (load-file kkc-init-file-name)) > (kkc-error "Invalid data in %s" kkc-init-file-name)))) > (or (and (nested-alist-p kkc-lookup-cache) > (eq (car kkc-lookup-cache) kkc-lookup-cache-tag)) Thanks Eli. I tried this patch, but there was an error reading the kkcrc file. The = file-local property line is missing a comment at the beginning. See if the attached = patch works. (I also split up the string formatting to make it more readable = to me, but feel free to change it back if you prefer a single function call.) Cheers. --Apple-Mail=_B07FC5DC-4159-403B-BFBA-316DA8DE0F1E Content-Disposition: attachment; filename=0001-Inhibit-warning-for-missing-lexbind-cookie-in-kkc-in.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Inhibit-warning-for-missing-lexbind-cookie-in-kkc-in.patch" Content-Transfer-Encoding: quoted-printable =46rom=20804759778ddff004773ba1372307b2ac593e3540=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Sean=20Devlin=20=0ADate:=20= Thu,=2031=20Jul=202025=2013:03:37=20-0500=0ASubject:=20[PATCH]=20Inhibit=20= warning=20for=20missing=20lexbind=20cookie=20in=20kkc=20init=20file=0A=0A= *=20lisp/international/kkc.el=20(kkc-lookup-key):=20Bind=0A= 'warning-inhibit-types'=20to=20suppress=20warning=20for=20missing=20= lexbind=20cookie=0Ain=20kkc=20init=20file.=0A---=0A=20= lisp/international/kkc.el=20|=2014=20++++++++++----=0A=201=20file=20= changed,=2010=20insertions(+),=204=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/international/kkc.el=20b/lisp/international/kkc.el=0Aindex=20= 6d603cf831a..69490806774=20100644=0A---=20a/lisp/international/kkc.el=0A= +++=20b/lisp/international/kkc.el=0A@@=20-64,10=20+64,15=20@@=20= kkc-save-init-file=0A=20=09=20=20=20(not=20(eq=20kkc-init-file-flag=20= t)))=0A=20=20=20=20=20=20=20(let=20((coding-system-for-write=20= 'iso-2022-7bit)=0A=20=09=20=20=20=20(print-length=20nil))=0A-=09= (write-region=20(format=20"(setq=20kkc-lookup-cache=20'%S)\n"=20= kkc-lookup-cache)=0A-=09=09=20=20=20=20=20=20nil=0A-=09=09=20=20=20=20=20= =20kkc-init-file-name))))=0A=20=0A+=09(write-region=0A+=20=20=20=20=20=20= =20=20=20(concat=0A+=20=20=20=20=20=20=20=20=20=20";;=20-*-=20= lexical-binding:=20t;=20-*-\n\n"=0A+=20=20=20=20=20=20=20=20=20=20= (format=0A+=20=20=20=20=20=20=20=20=20=20=20"(setq=20kkc-lookup-cache=20= '%S)\n"=0A+=20=20=20=20=20=20=20=20=20=20=20kkc-lookup-cache))=0A+=09=20= nil=0A+=09=20kkc-init-file-name))))=0A=20;;=20Sequence=20of=20characters=20= to=20be=20used=20for=20indexes=20for=20shown=20list.=20=20The=0A=20;;=20= Nth=20character=20is=20for=20the=20Nth=20conversion=20in=20the=20list=20= currently=20shown.=0A=20(defvar=20kkc-show-conversion-list-index-chars=0A= @@=20-178,7=20+183,8=20@@=20kkc-lookup-key=0A=20=20=20=20=20(add-hook=20= 'kill-emacs-hook=20'kkc-save-init-file)=0A=20=20=20=20=20(if=20= (file-readable-p=20kkc-init-file-name)=0A=20=09(condition-case=20nil=0A-=09= =20=20=20=20(load-file=20kkc-init-file-name)=0A+=20=20=20=20=20=20=20=20=20= =20=20=20(let=20((warning-inhibit-types=20'((files=20= missing-lexbind-cookie))))=0A+=09=20=20=20=20=20=20(load-file=20= kkc-init-file-name))=0A=20=09=20=20(kkc-error=20"Invalid=20data=20in=20= %s"=20kkc-init-file-name))))=0A=20=20=20(or=20(and=20(nested-alist-p=20= kkc-lookup-cache)=0A=20=09=20=20=20(eq=20(car=20kkc-lookup-cache)=20= kkc-lookup-cache-tag))=0A--=20=0A2.39.5=20(Apple=20Git-154)=0A=0A= --Apple-Mail=_B07FC5DC-4159-403B-BFBA-316DA8DE0F1E-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 02 11:01:34 2025 Received: (at 79136-done) by debbugs.gnu.org; 2 Aug 2025 15:01:35 +0000 Received: from localhost ([127.0.0.1]:37043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiDjq-0006I1-Ku for submit@debbugs.gnu.org; Sat, 02 Aug 2025 11:01:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44922) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiDjp-0006Hj-Fr for 79136-done@debbugs.gnu.org; Sat, 02 Aug 2025 11:01:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uiDjj-0006VF-TP; Sat, 02 Aug 2025 11:01:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9bpnlLHp1327KOj1dxpNNppPlqL+oFD1gQ0caqlUzR0=; b=qtltwPGGPPlP /xTb1vcfCbY+NW3bQ+ABGtYCGY+arugh2UTxJ/2seWn2Mc3eETgHyx0Dz56UQpsxvz9bpuEY6oxkk PFWTZLBrXTN8dp5y4QO7NlT3p1+lC/0gTh7VINUmsICyqdDLarrMI6Og7c6X8dHzpOlVJ63Mbl7xB G8C5ZudXkg35XIlk169K2MFXNfx58FoZDj0MFU/pkO7VTDoMqsoQi9aultx5vQnfOoYeKlQeVMzg6 4cu1PlvLTwPPWkoD8YU6craDZkG13/Ywfzb8ALKuq/GGz7i/A+UZQigntYRTvvjG6LHcheRE+bfxe u+M1cfmJJg6L8zhcR3X5cA==; Date: Sat, 02 Aug 2025 18:01:26 +0300 Message-Id: <868qk1rcmx.fsf@gnu.org> From: Eli Zaretskii To: Sean Devlin In-Reply-To: (message from Sean Devlin on Sat, 2 Aug 2025 09:03:53 -0500) Subject: Re: bug#79136: [PATCH] Inhibit warning for missing lexbind cookie in kkc init file References: <3F9A7B66-FD7A-4A61-9DDB-B9AEA62A41B6@toadstyle.org> <86ikj6rszw.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79136-done Cc: 79136-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > From: Sean Devlin > Date: Sat, 2 Aug 2025 09:03:53 -0500 > Cc: 79136@debbugs.gnu.org > > I tried this patch, but there was an error reading the kkcrc file. The file-local > property line is missing a comment at the beginning. See if the attached patch > works. (I also split up the string formatting to make it more readable to me, but > feel free to change it back if you prefer a single function call.) Thanks, fixed the missing semicolons and installed the change on the master branch. I'm therefore closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 02 11:05:29 2025 Received: (at 79136-done) by debbugs.gnu.org; 2 Aug 2025 15:05:30 +0000 Received: from localhost ([127.0.0.1]:37061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiDnd-0006Yc-HO for submit@debbugs.gnu.org; Sat, 02 Aug 2025 11:05:29 -0400 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]:58839) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uiDnb-0006To-98 for 79136-done@debbugs.gnu.org; Sat, 02 Aug 2025 11:05:27 -0400 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-880f2623a6dso140366239f.1 for <79136-done@debbugs.gnu.org>; Sat, 02 Aug 2025 08:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20230601.gappssmtp.com; s=20230601; t=1754147121; x=1754751921; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kCoBFG2Ujsap8u5qyHq1QsVH6o/rSmAgYaOJs+zp2Q4=; b=rte8RwWBol2mnzIccrYTS9i+T6asdQlWcXo4bdBa4htW4gFIBFEvt4zjN6PkG1YEtI naHhOOxIgSd53Mo2uYi4K/kytFa+Egq66+BHDePEFvsIP1hFZP0WKLli0a4WNyZHTwVo dqn/WpaKQ1bYORhPB0wTSn3P/2v8RiG6Le4oTRPq4ix0QAH2n22ujE6JnzUy5XQ2szu7 iqiD0/9KIIfsWXa2MXZ5m/Sb/inTogUUFb7vRi4WcHYnfBTVcKLPV1d2swoLxwnSvERG xsxrNNxK8NXG+LPuUGjQZRS0D39I7aySgkozXgkqR6YIZ0J3uFCGByNfc1B1jMoZ21J8 hvBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754147121; x=1754751921; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kCoBFG2Ujsap8u5qyHq1QsVH6o/rSmAgYaOJs+zp2Q4=; b=NZS8yMKToF9d66t7TmryuIQ1yHrrb/cAZDfB57WeLmRYoLPVUvnCnCLDLeOcZx1mHa z/ayGlPBY59KlhGNuYLMhWMOqRYqLUvppn1ZcX7pfclK+23braz7c1w9+flS2/16ez1L unrxZYTE9L0LEr8EAx6P13DqxCttcLSEcebsPXlX+nC5KHmnBjoKnP2pz9c5gAefo2yH cukpuEG7przuYEuPfvv0D1FCnA/HcZQtwCfJ56U90VHqiRPYBUMMD3DPqoVN70NE+RSj Xz9PMxOhTd1PeC7JE1GUj0ZyD9wDquUyd5YB3PW8yTskLMVBChjomm21iA1rHfClbtMi JDtw== X-Gm-Message-State: AOJu0Yy3OkMd+Zey2o4UDpeh7cB5rsi+Ku0OC0wBPBwdSnqbIlm3nAbq y8h6vX2vqf7uW7q84ZJ12vGCp4vR6eR/kLPvACamqjTQvErgJcGMTgYOXF8ueXD5beBAPU7MPqA Zd1+pp5s= X-Gm-Gg: ASbGncsQ+O+nxt80pVVoahcwWiB+F5+/dW+MnVevtjU56v6+8n7uqvV7wKRuugTfwG4 C2eYNGQCXgd7zLtby73Zyr6AmhRd9wCu+f3lM0IQNnIXgTNOCZqjdBGU+jPCPjbpCwXzY5LZWiL 6c5ias1qfYip/6YVFi3NUUiTil9BftY2L+W8QU8apfF7NLAYw39yBM2sMr0ySQKJCQlQ/y4IT+A qgUCpzoESE+BTM/rPmy1cqQL0wwKf7pxaHm0k4FaRwz0zxf/Lo6aq1DNVFztPl8cICpUf8qZNoM D1jZ5QvA5yteMk2ze8d06QL9kb0WIBfpARfpHjwufhS91dCIAI3Xpdvoan3JWQIz1iiz4nfVHfP f6GFP0hPtONT/tbBNZon4gX46QnQkAhH4e4QrjdtQQO7/aTahHKMgMt27RBqbQVgB5gzR64E= X-Google-Smtp-Source: AGHT+IGyHzm/HBMaERkUulFe0VS9CIRXQWQ8c5wSKxZashAfJkzGnjtqiYFIlRwovsgbhn4uWtUdbg== X-Received: by 2002:a05:6e02:2706:b0:3e4:1082:a91 with SMTP id e9e14a558f8ab-3e4161099d7mr60811275ab.3.1754147121256; Sat, 02 Aug 2025 08:05:21 -0700 (PDT) Received: from smtpclient.apple (c-67-167-5-111.hsd1.il.comcast.net. [67.167.5.111]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-50a8ab88f71sm182379173.5.2025.08.02.08.05.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Aug 2025 08:05:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: bug#79136: [PATCH] Inhibit warning for missing lexbind cookie in kkc init file From: Sean Devlin In-Reply-To: <868qk1rcmx.fsf@gnu.org> Date: Sat, 2 Aug 2025 10:05:10 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <29FE2171-F354-4F08-B32D-C23AFAF2C443@toadstyle.org> References: <3F9A7B66-FD7A-4A61-9DDB-B9AEA62A41B6@toadstyle.org> <86ikj6rszw.fsf@gnu.org> <868qk1rcmx.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3826.700.81) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79136-done Cc: 79136-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) > On Aug 2, 2025, at 10:01=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: Sean Devlin >> Date: Sat, 2 Aug 2025 09:03:53 -0500 >> Cc: 79136@debbugs.gnu.org >>=20 >> I tried this patch, but there was an error reading the kkcrc file. = The file-local >> property line is missing a comment at the beginning. See if the = attached patch >> works. (I also split up the string formatting to make it more = readable to me, but >> feel free to change it back if you prefer a single function call.) >=20 > Thanks, fixed the missing semicolons and installed the change on the > master branch. >=20 > I'm therefore closing the bug. Sounds good, thank you!=