From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OK6zEIb4bWLrPgAAbAwnHQ (envelope-from ) for ; Sun, 01 May 2022 05:03:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iC7UEIb4bWKAYgAA9RJhRA (envelope-from ) for ; Sun, 01 May 2022 05:03:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A5FB8E2FB for ; Sun, 1 May 2022 05:03:33 +0200 (CEST) Received: from localhost ([::1]:36802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkzrw-0001So-Tl for larch@yhetil.org; Sat, 30 Apr 2022 23:03:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkzrH-0001Sd-0H for emacs-orgmode@gnu.org; Sat, 30 Apr 2022 23:02:51 -0400 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:42663) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkzrF-0005U5-42 for emacs-orgmode@gnu.org; Sat, 30 Apr 2022 23:02:50 -0400 Received: by mail-oi1-x235.google.com with SMTP id a10so12369728oif.9 for ; Sat, 30 Apr 2022 20:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=pvX68lQcrVNGxdaswzIoKtqG1oWR5DlfgJPN0nJYTFk=; b=kLHvYGHSoPr6/CTyhVe/xuWngqVqI247sAsGv3/FR0/07niT7k+UISlBKZk4K1uyTJ eZhnAsbZVXUb6lVjKjDavHlSpekMXIY4Em2TS7vJHoQdkbU1bTHtopLDWQSLw41R+kVm ODS2IflBQ9MpJNSiFyw5f8sQfh1pY+qWSbmPVKBptU6ECe5QDOImNM27U3aWQ/w4/J8E G5J6iHulwXjD38T50CN4niVQRm6AkjlR6SDjo1LTm6bfOqx52FO1hFICT+WWRCu7rR1c KXsaQMMZBXpJAVfhQ3xvpi1QjJj5Y+jTefYyNzYkP2UkJ/ED4T437ti+6NK6+f3VFhzj LCiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=pvX68lQcrVNGxdaswzIoKtqG1oWR5DlfgJPN0nJYTFk=; b=7X/uVC9MmNA8qzA5Gsum7by8r6oXZCZa4G3fbRXfugns7ymQz2ZxO+O3MiQoVPXJ3E Miw19MhmwxEOn9hes1KwqLFNPxGF7K6RW1IMFmMqqPrMqn8YXY59Si6ZNIUH79f/VBlB 9VQwvaqjAtRhF4ijpTg6Y7TyB9PuBuaLSB0IDkk436sPMRjYFrPgFINYRiqNsfQ09qfg 9sMLph8c26bx+6WeQ2dRQ05TZGQryT6MnNmDtilhqI4hb2/5bTn3UcJdgucCYQEYHBrD 6ZFs7xH2kBXb95GI2DJjOfmEVaB7S4danPVaeiU+mXeyW15EZUzqUvBq4rHH/qKPPspu yPow== X-Gm-Message-State: AOAM5316lYs5JNPsJ2rcFo8dYB6ZXPLJSQkSzea3jO3lno9JvBQbTbCp VDvosHFLXCAcorQhuXV1nw6ZBnWOyo3otO6n X-Google-Smtp-Source: ABdhPJxzwZzv7ZsbN80Jopb3mazj4V8JkwzLocZazGbYuyp4QfhNoLTtXi0kPNp8uuVWZQniU/Bj1w== X-Received: by 2002:a05:6808:1644:b0:2ef:b05:1cdc with SMTP id az4-20020a056808164400b002ef0b051cdcmr2902379oib.66.1651374167627; Sat, 30 Apr 2022 20:02:47 -0700 (PDT) Received: from localhost ([103.125.234.210]) by smtp.gmail.com with ESMTPSA id r23-20020a4aea97000000b0035eb4e5a6b1sm2548555ooh.7.2022.04.30.20.02.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 20:02:47 -0700 (PDT) From: Ihor Radchenko To: emacs-org list Subject: [PATCH] Add make target to ease creating reproducers and testing them Date: Sun, 01 May 2022 11:03:36 +0800 Message-ID: <87ilqq6jjr.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::235; envelope-from=yantar92@gmail.com; helo=mail-oi1-x235.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, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651374213; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pvX68lQcrVNGxdaswzIoKtqG1oWR5DlfgJPN0nJYTFk=; b=ZHyh9p8l30Z+X8v02y3+WZzSiMX+oxIWxPzUnY9rFVLTxi0WO433hZOIyl9GRS4HK7SmBa fpsTRP8IDmw3tVzOxOQS6AzjIB7pt48xL5nEQevJlTuVUEdEgcnA0n9FN7hP3Mg1F9RJRN zvhTRNoT+Ney5KgHlUIhCmm0q6i0B/gh5ZO7VtGIJqSo3oDle5vZaWzI9B/Jf47hlYBP3e YKK5kicVLc5ndTII8Vdz0Kti0DAcRYQzWbT6vcZabc2NFOjkiGJwQDgr7xeL2d4R5+btai no27epVComvAQOPQrEYcJMhl8X6GjdG/WY0SBfKEHzJ+kl0hLGLXznfxOR66RQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651374213; a=rsa-sha256; cv=none; b=tuCuOf9sz2laTqS1hh8JGOupoOoxKCXoWr7ClPAl8LPfwGufBSJuHZp2NW6t9pR11wvsWQ b74Tg/dRPM3eop0Jf0+xgH1y7xHaz1gw1yuR0zxyovibwklWwO76oZOV0WY8f12qB+rJNh tSohkiXq1gH7nShE4WvQH5STVBumsuKtN/8ug+czxghwf0NHUJ9ENoTTO4NDBC9sSUuTPf 4KCXQ4WsZB1GzTppx219wJPGFMwttnU0jAfhB20bTgwQBUFFHrf74gUbvSJZ6h4etvsEzs cOck0nbTejeKMmP1JqEBV1HqM9qTuexQHUPOffTtXvLFHK7h7Hd4FqrRvWJpQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=kLHvYGHS; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.99 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=kLHvYGHS; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A5FB8E2FB X-Spam-Score: -1.99 X-Migadu-Scanner: scn1.migadu.com X-TUID: bTLdgZOMHcaT --=-=-= Content-Type: text/plain Hi, In the Feedback section of the manual, we provide instructions on how to create reproducers: https://orgmode.org/manual/Feedback.html The instructions are nice, but I was thinking to simplify things for the users further. I propose a new make target: make repro It will run the commands we already suggest, but without a need to create minimal file, pass all that arguments to emacs, etc WDYT? Best, Ihor --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-mk-Add-make-target-repro-for-easy-bug-testing.patch >From 8d5f9f023af18828656df85a0ce4069e004dbf5d Mon Sep 17 00:00:00 2001 Message-Id: <8d5f9f023af18828656df85a0ce4069e004dbf5d.1651373896.git.yantar92@gmail.com> From: Ihor Radchenko Date: Sun, 1 May 2022 10:44:10 +0800 Subject: [PATCH] mk: Add make target "repro" for easy bug testing * mk/default.mk (REPRO_DEBUG): New custom variable enabling extra debugging facilities in Emacs instance open by make repro. (REPRO_ARGS): Extra arguments passed to Emacs by make repro. (REPRO_INIT): (REPRO): Define Emacs cmd for testing. * mk/targets.mk (.PHONY): (repro): Add new target. * doc/org-manual.org (Feedback): Describe the new make target. --- doc/org-manual.org | 8 ++++++++ mk/default.mk | 21 +++++++++++++++++++++ mk/targets.mk | 5 ++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index c0bd853ca..6a574977e 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -269,6 +269,14 @@ ** Feedback (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) #+end_src +If you are using Org mode version from Git repository, you can start +minimal session using make. + +: # Bare Emacs +: make repro +: # or pass extra arguments +: make repro REPRO_ARGS="-l /path/to/minimal/config.el /tmp/bug.org" + If an error occurs, a "backtrace" can be very useful---see below on how to create one. Often a small example file helps, along with clear information about: diff --git a/mk/default.mk b/mk/default.mk index 804089280..33e737da3 100644 --- a/mk/default.mk +++ b/mk/default.mk @@ -59,6 +59,11 @@ BTEST_OB_LANGUAGES = awk C fortran maxima lilypond octave perl python # extra packages to require for testing BTEST_EXTRA = # ess-site # load ESS for R tests +# Whether to activate extra debugging facilities for make repro. +REPRO_DEBUG ?= yes +# Extra arguments passed to Emacs for make repro. +# e.g. -l config.el /tmp/bug.org +REPRO_ARGS ?= ##->8------------------------------------------------------------------- ## YOU MAY NEED TO ADAPT THESE DEFINITIONS ##---------------------------------------------------------------------- @@ -93,6 +98,22 @@ BTEST = $(BATCH) $(BTEST_INIT) \ # should be useful for manual testing and verification of problems. NOBATCH = $(EMACSQ) $(BTEST_INIT) -l org -f org-version +ifeq ($(REPRO_DEBUG), yes) +REPRO_INIT = --eval "(setq \ + debug-on-error t\ + debug-on-signal nil\ + debug-on-quit nil\ + org-element--cache-self-verify 'backtrace\ + org-element--cache-self-verify-frequency 1.0\ + org-element--cache-map-statistics t)" +else +REPRO_INIT = +endif + +# Running a plain emacs with no config, this Org mode loaded, and +# debugging facilities activated. +REPRO = $(NOBATCH) $(REPRO_INIT) $(REPRO_ARGS) + # start Emacs with no user and site configuration # EMACSQ = -vanilla # XEmacs EMACSQ = $(EMACS) -Q diff --git a/mk/targets.mk b/mk/targets.mk index 6de77b1e6..5cba63e21 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -41,7 +41,7 @@ endif cleanlisp cleandoc cleandocs cleantest \ compile compile-dirty uncompiled \ config config-test config-exe config-all config-eol config-version \ - vanilla + vanilla repro CONF_BASE = EMACS DESTDIR ORGCM ORG_MAKE_DOC CONF_DEST = lispdir infodir datadir testdir @@ -132,6 +132,9 @@ $(INSTSUB): autoloads: lisp $(MAKE) -C $< $@ +repro: cleanall autoloads + -@$(REPRO) & + cleandirs: $(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) cleanall;) -- 2.35.1 --=-=-=--