From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ulrich =?UTF-8?Q?M=C3=BCller?= Newsgroups: gmane.emacs.bugs Subject: bug#75345: 29.4; 'insert' doc string still mentions 'string-as-multibyte' Date: Sat, 04 Jan 2025 10:50:04 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38005"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 75345@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 10:51:28 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tU0oa-0009ng-LU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 10:51:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU0oD-0003hI-6I; Sat, 04 Jan 2025 04:51:05 -0500 Original-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 1tU0oB-0003gt-GH for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 04:51:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tU0oB-0005bN-7T for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 04:51:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=FzfFboTlieGvCQQDgrPKxDb+d0lsfknEpO8r4G9MYOE=; b=GZlqBh0OX/NN3vmQe69Ubu2TJZxuiRO8OtVBik/4uK7+tjU59P9vv22W3KNh3zviFn6zJhCeTXO3ZU3T5rvSNxPQQtC6kMcMEsck5odb7+Xb8aj/o83XqmH/e2ro9+u37jRD5xMdZFTJMS/GfZmxeh/DZ+7hEMqCY31nZYT80m+uffnQqoa7C0iSBFdRASrubQ5XWGWjdHhHJJdLyYEPFuMklCaihIoX/RJGuAK2RJZaTcIFE9Z4GMli8UUFNuVzFlW4Xso4erYSQGRBf+bjtxnoYrOA6yL8mNS9HjcFEKb6AU53pjVIEXiVECpwTYxzs6J3cZxSI8Ni68z/LyOqJA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tU0oA-0006OK-Oh for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 04:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich =?UTF-8?Q?M=C3=BCller?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 09:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75345 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173598422524512 (code B ref -1); Sat, 04 Jan 2025 09:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jan 2025 09:50:25 +0000 Original-Received: from localhost ([127.0.0.1]:53404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU0nY-0006NF-Bh for submit@debbugs.gnu.org; Sat, 04 Jan 2025 04:50:24 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:60830) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tU0nU-0006KO-Tk for submit@debbugs.gnu.org; Sat, 04 Jan 2025 04:50:23 -0500 Original-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 1tU0nP-0003cS-Gj for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 04:50:15 -0500 Original-Received: from woodpecker.gentoo.org ([140.211.166.183] helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tU0nN-0005Z2-E2 for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 04:50:15 -0500 Received-SPF: pass client-ip=140.211.166.183; envelope-from=ulm@gentoo.org; helo=smtp.gentoo.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298348 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable C-h f insert RET insert is a built-in function in =E2=80=98src/editfns.c=E2=80=99. [...] When operating on binary data, it may be necessary to preserve the original bytes of a unibyte string when inserting it into a multibyte buffer; to accomplish this, apply =E2=80=98string-as-multibyte=E2=80=99 = to the string and insert the result. C-h f string-as-multibyte RET string-as-multibyte is a built-in function in =E2=80=98src/fns.c=E2=80= =99. This function is obsolete since 26.1; use `decode-coding-string'. [...] This looks inconsistent, presumably 'insert' shouldn't mention 'string-as-multibyte'. Attached patch updates the doc string. Also, the elisp manual still mentions functions string-as-unibyte and string-as-multibyte in section "(elisp) Top > Non-ASCII Characters > Selecting a Representation". Should these be removed from the manual, or at least be labelled as obsolete? --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=0001-Update-insert-doc-string.patch >From 858f94f942cb40481ac8bc83a36ae5555066c1bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Sat, 4 Jan 2025 10:37:59 +0100 Subject: [PATCH] Update 'insert' doc string * src/editfns.c (Finsert): Mention 'decode-coding-string' instead of the obsolete 'string-as-multibyte' in doc string. --- src/editfns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editfns.c b/src/editfns.c index 581bd03798e..8a5fb673fe7 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1363,8 +1363,8 @@ DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, When operating on binary data, it may be necessary to preserve the original bytes of a unibyte string when inserting it into a multibyte -buffer; to accomplish this, apply `string-as-multibyte' to the string -and insert the result. +buffer; to accomplish this, apply `decode-coding-string' with the +`no-conversion' coding system to the string and insert the result. usage: (insert &rest ARGS) */) (ptrdiff_t nargs, Lisp_Object *args) -- 2.47.1 --=-=-=--