emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Building MWE DEBUG.org template file
@ 2020-02-23 18:48 Ken Mankoff
  0 siblings, 0 replies; only message in thread
From: Ken Mankoff @ 2020-02-23 18:48 UTC (permalink / raw)
  To: Org-mode

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


I'm trying to build a DEBUG.org that makes it easy to share MWEs of bugs I run across in Emacs packages. I'd like it to load the latest Org mode by default. Then for any given bug I load the needed packages, configure them, and demonstrate the bug.

Right now when I run the attached file, the first time I run it everything appears to work correctly. It installs Org from melpa into a temporary elpa folder, and the output of

#+BEGIN_SRC emacs-lisp :results value :noweb yes
(org-version nil t)


: Org mode version 9.3.6 (9.3.6-4-gdfa7a3-elpaplus @ /home/kdm/.emacs.d/DEBUG/elpa/org-plus-contrib-20200217/)

But when I load the file a second time in a clean emacs session (i.e. /usr/bin/emacs -Q ~/.emacs.d/DEBUG.org & ), then the Org version is incorrect, and I see:

: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /home/kdm/.emacs.d/DEBUG/elpa/org-plus-contrib-20200217/)

Can anyone explain what I'm doing incorrectly in the attached file?



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: DEBUG.org --]
[-- Type: text/x-org, Size: 1826 bytes --]

Run this debug Org file in a clean emacs session with:

/usr/bin/emacs -Q ~/.emacs.d/DEBUG.org & 

Initialize Emacs to reproduce this bug. Press `C-c C-c` in the Org Babel block below.

#+BEGIN_SRC emacs-lisp :results value :noweb yes
(org-version nil t)

: Org mode version 9.3.6 (9.3.6-4-gdfa7a3-elpaplus @ /home/kdm/.emacs.d/DEBUG/elpa/org-plus-contrib-20200217/)

* Bug
** COMMENT Example Bug

Put example code here for this bug.

#+BEGIN_SRC emacs-lisp :results value
(defmacro measure-time (&rest body)
  "Measure the time it takes to evaluate BODY."
  `(let ((time (current-time)))
     (message "%.06f" (float-time (time-since time)))))

(measure-time (message "hello, world"))

: 0.000134

* Init
** Emacs

#+NAME: init_emacs
#+BEGIN_SRC emacs-lisp :results none
(setq package-user-dir (expand-file-name "elpa" "~/.emacs.d/DEBUG"))

(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)

;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
  (package-install 'use-package))
(setq package-enable-at-startup nil)

(defvar use-package-verbose t)
(require 'use-package)
(setq use-package-always-ensure t)
;(setq use-package-always-defer t)
;; (require 'diminish)                ;; if you use :diminish
;; (require 'bind-key)   

** Org

#+NAME: init_org
#+BEGIN_SRC emacs-lisp :results none
(use-package org
  :ensure org-plus-contrib)
(setq org-confirm-babel-evaluate nil) ;; don't ask to eval code
 '((emacs-lisp . t)   
   (shell . t)))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-23 18:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-23 18:48 Building MWE DEBUG.org template file Ken Mankoff

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).