From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Cassou Newsgroups: gmane.emacs.bugs Subject: bug#55571: [PATCH] Fix submit-emacs-patch Date: Sun, 22 May 2022 08:40:53 +0200 Message-ID: <87leuujci2.fsf@cassou.me> 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="39914"; mail-complaints-to="usenet@ciao.gmane.io" To: 55571@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 22 08:44:55 2022 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 1nsfKg-000A81-Jm for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 May 2022 08:44:54 +0200 Original-Received: from localhost ([::1]:60190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsfKe-0007tw-UU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 May 2022 02:44:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsfHu-0006nh-1a for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 02:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49670) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsfHt-0005Id-O2 for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 02:42:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nsfHt-00084J-Mt for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 02:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 May 2022 06:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55571 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165320166330940 (code B ref -1); Sun, 22 May 2022 06:42:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 May 2022 06:41:03 +0000 Original-Received: from localhost ([127.0.0.1]:43567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsfGw-00082x-Tt for submit@debbugs.gnu.org; Sun, 22 May 2022 02:41:03 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:58234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsfGu-00082S-RT for submit@debbugs.gnu.org; Sun, 22 May 2022 02:41:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsfGu-0006JM-7r for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 02:41:00 -0400 Original-Received: from mail.choca.pics ([80.67.172.235]:56176) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsfGs-00051j-CP for bug-gnu-emacs@gnu.org; Sun, 22 May 2022 02:40:59 -0400 Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 8D42E18197CC7 for ; Sun, 22 May 2022 08:40:55 +0200 (CEST) Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id OtbB8Do4jFkj for ; Sun, 22 May 2022 08:40:54 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id DAB041817C2C1 for ; Sun, 22 May 2022 08:40:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at choca.pics Original-Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id aPRVwM6Wy1Ua for ; Sun, 22 May 2022 08:40:54 +0200 (CEST) Original-Received: from localhost (153.226.95.79.rev.sfr.net [79.95.226.153]) by mail.choca.pics (Postfix) with ESMTPSA id 712CA18193F60 for ; Sun, 22 May 2022 08:40:54 +0200 (CEST) Received-SPF: pass client-ip=80.67.172.235; envelope-from=damien@cassou.me; helo=mail.choca.pics 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.bugs:232872 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Hi, submit-emacs-patch creates a new message and immediately inserts new lines without first moving the point to the message body. This doesn't work with notmuch (and its notmuch-user-agent symbol) because the point starts in the headers and nothing in Emacs specifies that the mua should move point to the body automatically. * lisp/mail/emacsbug.el (submit-emacs-patch): Make sure point is in the body before inserting new lines. Best -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-submit-emacs-patch.patch >From ad98101fce092b8f0f02c2a3eabdea41d833441d Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Sun, 22 May 2022 08:32:38 +0200 Subject: [PATCH] Fix submit-emacs-patch submit-emacs-patch creates a new message and immediately inserts new lines without first moving the point to the message body. This doesn't work with notmuch (and its notmuch-user-agent symbol) because the point starts in the headers and nothing in Emacs specifies that the mua should move point to the body automatically. * lisp/mail/emacsbug.el (submit-emacs-patch): Make sure point is in the body before inserting new lines. --- lisp/mail/emacsbug.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 8cb4a00009..df2b7a7453 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -516,6 +516,7 @@ submit-emacs-patch (view-mode 1) (button-mode 1)) (message-mail-other-window report-emacs-bug-address subject) + (message-goto-body) (insert "\n\n\n") (emacs-bug--system-description) (mml-attach-file file "text/patch" nil "attachment") -- 2.36.0 --=-=-=--