all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Christopher M. Miles" <numbchild@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Add make target to ease creating reproducers and testing them
Date: Sun, 01 May 2022 22:03:18 +0800	[thread overview]
Message-ID: <m2czgxpcw1.fsf@numbchild@gmail.com> (raw)
In-Reply-To: <87ilqq6jjr.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 4687 bytes --]


I agree this idea, this could unify the reproduce steps and help some user save time and help
org-mode maintainer get information they want.

Ihor Radchenko <yantar92@gmail.com> writes:

> 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
>
> From 8d5f9f023af18828656df85a0ce4069e004dbf5d Mon Sep 17 00:00:00 2001
> Message-Id: <8d5f9f023af18828656df85a0ce4069e004dbf5d.1651373896.git.yantar92@gmail.com>
> From: Ihor Radchenko <yantar92@gmail.com>
> 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;)


-- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2022-05-01 14:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-01  3:03 [PATCH] Add make target to ease creating reproducers and testing them Ihor Radchenko
2022-05-01  3:47 ` Samuel Wales
2022-05-01  4:20   ` Ihor Radchenko
2022-05-01  4:53     ` Samuel Wales
2022-05-01  5:01       ` Samuel Wales
2022-05-01 11:36       ` Emacs launched from Firefox Max Nikulin
2022-05-02  2:03         ` Samuel Wales
2022-05-02  8:26           ` Max Nikulin
2022-05-26  0:25             ` Samuel Wales
2022-05-26  2:59               ` Ihor Radchenko
2022-06-01 12:26                 ` Max Nikulin
2022-05-01 14:03 ` Christopher M. Miles [this message]
2022-07-22 13:37 ` [PATCH] Add make target to ease creating reproducers and testing them Ihor Radchenko
2023-04-22  8:37   ` Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2czgxpcw1.fsf@numbchild@gmail.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.