From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: juntaka via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#47718: Fix epa-file-insert-file-contents substring error Date: Mon, 12 Apr 2021 12:57:28 +0000 Message-ID: References: <8735vv2a39.fsf@gnus.org> <83o8ej3ebk.fsf@gnu.org> Reply-To: juntaka Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27312"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , "47718@debbugs.gnu.org" <47718@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 12 16:17:25 2021 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 1lVxNV-0006we-1o for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Apr 2021 16:17:25 +0200 Original-Received: from localhost ([::1]:58600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVxNU-0000Xu-3A for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Apr 2021 10:17:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVxN9-0000Wf-Oy for bug-gnu-emacs@gnu.org; Mon, 12 Apr 2021 10:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVxN9-0005va-Ds for bug-gnu-emacs@gnu.org; Mon, 12 Apr 2021 10:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lVxN9-0000F7-9Y for bug-gnu-emacs@gnu.org; Mon, 12 Apr 2021 10:17:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: juntaka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Apr 2021 14:17:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 47718-submit@debbugs.gnu.org id=B47718.1618236996872 (code B ref 47718); Mon, 12 Apr 2021 14:17:03 +0000 Original-Received: (at 47718) by debbugs.gnu.org; 12 Apr 2021 14:16:36 +0000 Original-Received: from localhost ([127.0.0.1]:57648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVxMi-0000Du-2V for submit@debbugs.gnu.org; Mon, 12 Apr 2021 10:16:36 -0400 Original-Received: from mail-40138.protonmail.ch ([185.70.40.138]:54802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVw8L-0006R0-PH for 47718@debbugs.gnu.org; Mon, 12 Apr 2021 08:57:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1618232255; bh=W5+ERo4Aq9vAViejI3p8jQdJhjz51YUT4j0kthFFwRs=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=tiPuK8JkpwRklYC5tXXDWvtprKV0SvZ9075XSASh++b5umod16xYnwdD7OegW6Z4L wdkiDCh5Q00+SyKfskAKJfYgyjZdfLQ+BkNw9yYFc5akGRYMSwhHshmrG3ZS5szPBm CaArICyW9eojtvjz8nqneZZI3rqZHmLAL0fTO1Tw= In-Reply-To: <83o8ej3ebk.fsf@gnu.org> X-Mailman-Approved-At: Mon, 12 Apr 2021 10:16:34 -0400 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" X-ACL-Warn: , juntaka Xref: news.gmane.io gmane.emacs.bugs:203903 Archived-At: Hi Eli, In my use case, I'm writing an elisp to show the first line of each file on= dired. It does not need to visit and read entire file. So I just try to limit by (= window-width). But if Emacs try to decrypt GPG files, then I got such error. Regards, =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Monday, April 12, 2021 8:57 PM, Eli Zaretskii wrote: > > From: Lars Ingebrigtsen larsi@gnus.org > > Date: Mon, 12 Apr 2021 10:14:34 +0200 > > Cc: 47718@debbugs.gnu.org > > juntaka juntaka@protonmail.com writes: > > > > > I think substring occurs error when TO is longer than its content. > > > This patch will fix the substring bug in epa-file-insert-file-content= s. > > > > Thanks; applied to Emacs 28. > > Actually, I wonder whether this is TRT: why should we silently accept > invalid inputs when substring itself doesn't? > > IOW, can we please have a real-life use case where this happens, and > where silently "fixing" this input is TRT? TIA.