unofficial mirror of emacs-orgmode@gnu.org
 help / color / mirror / Atom feed
* encryption problems using org-mode
@ 2021-02-15 13:38 Colin Baxter
  2021-02-15 14:01 ` Robert Pluim
  2021-02-15 14:08 ` Ihor Radchenko
  0 siblings, 2 replies; 6+ messages in thread
From: Colin Baxter @ 2021-02-15 13:38 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I have an encryption problem that has materialised only today. I
think it's an org-mode issue since that package is the only one I have
refreshed with a new 'pull' today

I have a symmetrically encrypted file data.org.gpg for which I have the
line:

# Local Variables:
# eval: (sensitive-mode t)
# End:

The sensitive-mode is defined as

#+begin_src elisp
(define-minor-mode sensitive-mode
  "For sensitive files like password lists and gpg file. It disables backup creation and auto saving. With no argument, this command toggles the mode. Non-null prefix argument turns on the mode. Null prefix argument turns off the mode."
  ;; the initial value
  nil
  ;; the indicator for the mode line
  " Sensitive"
  ;; the minor mode bindings
  nil
  (if (symbol-value sensitive-mode)
      (progn
        ;; disable backups
        (set (make-local-variable 'backup-inhibited) t)
        ;; disable auto-save
        (if auto-save-default
            (auto-save-mode -1)))
    ;; resort to default value of backup-inhibited
    (kill-local-variable 'backup-inhibited)
    ;; resort to default auto save setting
    (if auto-save-default
        (auto-save-mode 1))))
#+end_src

This has worked until today. Now if data.org.gpg is opened I get an
error.

Debugger entered--Lisp error: (void-variable minor-modes)
  (sensitive-mode t)
  (eval (sensitive-mode t))
  (hack-one-local-variable eval (sensitive-mode t))
  (hack-local-variables-apply)
  (#f(compiled-function (&optional handle-mode) "Parse and put into effect this buffer's local variables spec.\nFor buffers visiting files, also puts into effect directory-local\nvariables.\nUses `hack-local-variables-apply' to apply the variables.\n\nIf HANDLE-MODE is nil, we apply all the specified local\nvariables.  If HANDLE-MODE is neither nil nor t, we do the same,\nexcept that any settings of `mode' are ignored.\n\nIf HANDLE-MODE is t, all we do is check whether a \"mode:\"\nis specified, and return the corresponding mode symbol, or nil.\nIn this case, we try to ignore minor-modes, and return only a\nmajor-mode.\n\nIf `enable-local-variables' or `local-enable-local-variables' is nil,\nthis function does nothing.  If `inhibit-local-variables-regexps'\napplies to the file in question, the file is not scanned for\nlocal variables, but directory-local variables may still be applied." #<bytecode -0x1335cba3>) no-mode)
  (funcall #f(compiled-function (&optional handle-mode) "Parse and put into effect this buffer's local variables spec.\nFor buffers visiting files, also puts into effect directory-local\nvariables.\nUses `hack-local-variables-apply' to apply the variables.\n\nIf HANDLE-MODE is nil, we apply all the specified local\nvariables.  If HANDLE-MODE is neither nil nor t, we do the same,\nexcept that any settings of `mode' are ignored.\n\nIf HANDLE-MODE is t, all we do is check whether a \"mode:\"\nis specified, and return the corresponding mode symbol, or nil.\nIn this case, we try to ignore minor-modes, and return only a\nmajor-mode.\n\nIf `enable-local-variables' or `local-enable-local-variables' is nil,\nthis function does nothing.  If `inhibit-local-variables-regexps'\napplies to the file in question, the file is not scanned for\nlocal variables, but directory-local variables may still be applied." #<bytecode -0x1335cba3>) no-mode)
  (with-no-warnings (funcall ad--addoit-function handle-mode))
  (setq ad-return-value (with-no-warnings (funcall ad--addoit-function handle-mode)))
  (let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function handle-mode))) (when handle-mode (setq so-long-mode--inhibited ad-return-value)) ad-return-value)
  (ad-Advice-hack-local-variables #f(compiled-function (&optional handle-mode) "Parse and put into effect this buffer's local variables spec.\nFor buffers visiting files, also puts into effect directory-local\nvariables.\nUses `hack-local-variables-apply' to apply the variables.\n\nIf HANDLE-MODE is nil, we apply all the specified local\nvariables.  If HANDLE-MODE is neither nil nor t, we do the same,\nexcept that any settings of `mode' are ignored.\n\nIf HANDLE-MODE is t, all we do is check whether a \"mode:\"\nis specified, and return the corresponding mode symbol, or nil.\nIn this case, we try to ignore minor-modes, and return only a\nmajor-mode.\n\nIf `enable-local-variables' or `local-enable-local-variables' is nil,\nthis function does nothing.  If `inhibit-local-variables-regexps'\napplies to the file in question, the file is not scanned for\nlocal variables, but directory-local variables may still be applied." #<bytecode -0x1335cba3>) no-mode)
  (apply ad-Advice-hack-local-variables #f(compiled-function (&optional handle-mode) "Parse and put into effect this buffer's local variables spec.\nFor buffers visiting files, also puts into effect directory-local\nvariables.\nUses `hack-local-variables-apply' to apply the variables.\n\nIf HANDLE-MODE is nil, we apply all the specified local\nvariables.  If HANDLE-MODE is neither nil nor t, we do the same,\nexcept that any settings of `mode' are ignored.\n\nIf HANDLE-MODE is t, all we do is check whether a \"mode:\"\nis specified, and return the corresponding mode symbol, or nil.\nIn this case, we try to ignore minor-modes, and return only a\nmajor-mode.\n\nIf `enable-local-variables' or `local-enable-local-variables' is nil,\nthis function does nothing.  If `inhibit-local-variables-regexps'\napplies to the file in question, the file is not scanned for\nlocal variables, but directory-local variables may still be applied." #<bytecode -0x1335cba3>) no-mode)
  (hack-local-variables no-mode)
  (run-mode-hooks org-mode-hook)
  (org-mode)
  (set-auto-mode-0 org-mode nil)
  (#f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -*- mode tag\nchecks for a `mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed in `interpreter-mode-alist',\nmatches the buffer beginning against `magic-mode-alist',\ncompares the filename against the entries in `auto-mode-alist',\nthen matches the buffer beginning against `magic-fallback-mode-alist'.\n\nIf `enable-local-variables' is nil, or if the file name matches\n`inhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file.  If `local-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -*- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it.  In other words\nwe don't actually set it to the same mode the buffer already has." #<bytecode -0x133408cd>) nil)
  (funcall #f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -*- mode tag\nchecks for a `mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed in `interpreter-mode-alist',\nmatches the buffer beginning against `magic-mode-alist',\ncompares the filename against the entries in `auto-mode-alist',\nthen matches the buffer beginning against `magic-fallback-mode-alist'.\n\nIf `enable-local-variables' is nil, or if the file name matches\n`inhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file.  If `local-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -*- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it.  In other words\nwe don't actually set it to the same mode the buffer already has." #<bytecode -0x133408cd>) nil)
  (with-no-warnings (funcall ad--addoit-function keep-mode-if-same))
  (setq ad-return-value (with-no-warnings (funcall ad--addoit-function keep-mode-if-same)))
  (progn (setq so-long-mode--inhibited nil) (when so-long-mode-enabled (so-long-check-header-modes)) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function keep-mode-if-same))) (when so-long-mode-enabled (unless so-long-mode--inhibited (when (and (apply 'derived-mode-p so-long-target-modes) (so-long-line-detected-p)) (setq so-long-original-mode major-mode) (so-long-mode)))))
  (let (ad-return-value) (progn (setq so-long-mode--inhibited nil) (when so-long-mode-enabled (so-long-check-header-modes)) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function keep-mode-if-same))) (when so-long-mode-enabled (unless so-long-mode--inhibited (when (and (apply 'derived-mode-p so-long-target-modes) (so-long-line-detected-p)) (setq so-long-original-mode major-mode) (so-long-mode))))) ad-return-value)
  (ad-Advice-set-auto-mode #f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -*- mode tag\nchecks for a `mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed in `interpreter-mode-alist',\nmatches the buffer beginning against `magic-mode-alist',\ncompares the filename against the entries in `auto-mode-alist',\nthen matches the buffer beginning against `magic-fallback-mode-alist'.\n\nIf `enable-local-variables' is nil, or if the file name matches\n`inhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file.  If `local-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -*- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it.  In other words\nwe don't actually set it to the same mode the buffer already has." #<bytecode -0x133408cd>))
  (apply ad-Advice-set-auto-mode #f(compiled-function (&optional keep-mode-if-same) "Select major mode appropriate for current buffer.\n\nTo find the right major mode, this function checks for a -*- mode tag\nchecks for a `mode:' entry in the Local Variables section of the file,\nchecks if it uses an interpreter listed in `interpreter-mode-alist',\nmatches the buffer beginning against `magic-mode-alist',\ncompares the filename against the entries in `auto-mode-alist',\nthen matches the buffer beginning against `magic-fallback-mode-alist'.\n\nIf `enable-local-variables' is nil, or if the file name matches\n`inhibit-local-variables-regexps', this function does not check\nfor any mode: tag anywhere in the file.  If `local-enable-local-variables'\nis nil, then the only mode: tag that can be relevant is a -*- one.\n\nIf the optional argument KEEP-MODE-IF-SAME is non-nil, then we\nset the major mode only if that would change it.  In other words\nwe don't actually set it to the same mode the buffer already has." #<bytecode -0x133408cd>) nil)
  (set-auto-mode)
  (normal-mode t)
  (after-find-file nil t)
  (find-file-noselect-1 #<buffer data.org.gpg> "~/.emacs-files/secure/data.org.gpg" nil nil "~/.emacs-files/secure/data.org.gpg" (655687 2049))
  (find-file-noselect "~/.emacs-files/secure/data.org.gpg")
  (bookmark-default-handler ("data.org.gpg" (filename . "~/.emacs-files/secure/data.org.gpg") (front-context-string . "#+TITLE:     Dat") (rear-context-string) (position . 1) (annotation . "Author: Colin Baxter <redknight@bluestar>\nDate:   ...")))
  (bookmark-handle-bookmark "data.org.gpg")
  (bookmark--jump-via "data.org.gpg" pop-to-buffer-same-window)
  (bookmark-jump "data.org.gpg")
  (bookmark-bmenu-this-window)
  (funcall-interactively bookmark-bmenu-this-window)
  (call-interactively bookmark-bmenu-this-window nil nil)
  (command-execute bookmark-bmenu-this-window)


Best wishes,



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encryption problems using org-mode
  2021-02-15 13:38 encryption problems using org-mode Colin Baxter
@ 2021-02-15 14:01 ` Robert Pluim
  2021-02-15 14:52   ` Colin Baxter
  2021-02-15 14:08 ` Ihor Radchenko
  1 sibling, 1 reply; 6+ messages in thread
From: Robert Pluim @ 2021-02-15 14:01 UTC (permalink / raw)
  To: Colin Baxter; +Cc: emacs-orgmode

>>>>> On Mon, 15 Feb 2021 13:38:42 +0000, Colin Baxter <m43cap@yandex.com> said:

    Colin> This has worked until today. Now if data.org.gpg is opened I get an
    Colin> error.

    Colin> Debugger entered--Lisp error: (void-variable minor-modes)
    Colin>   (sensitive-mode t)

My crystal ball says youʼre tracking emacs-master, and you've been
bitten by the renaming of minor-modes to local-minor-modes. A
bootstrap will fix that.

Robert


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encryption problems using org-mode
  2021-02-15 13:38 encryption problems using org-mode Colin Baxter
  2021-02-15 14:01 ` Robert Pluim
@ 2021-02-15 14:08 ` Ihor Radchenko
  1 sibling, 0 replies; 6+ messages in thread
From: Ihor Radchenko @ 2021-02-15 14:08 UTC (permalink / raw)
  To: Colin Baxter, emacs-orgmode

Colin Baxter <m43cap@yandex.com> writes:

> Debugger entered--Lisp error: (void-variable minor-modes)

This looks like master Emacs issue. Did you happen to update Emacs to
master as well? There was a recent commit related to minor-modes
variable. You can search for "0bd846c 1/2: Rename minor-modes to
local-minor-modes" in emacs-devel. I suspect that you may need to
re-compile local and built-in Emacs packages.

Best,
Ihor



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encryption problems using org-mode
  2021-02-15 14:01 ` Robert Pluim
@ 2021-02-15 14:52   ` Colin Baxter
  2021-02-15 15:07     ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Baxter @ 2021-02-15 14:52 UTC (permalink / raw)
  To: Robert Pluim; +Cc: , emacs-orgmode

>>>>> Robert Pluim <rpluim@gmail.com> writes:

>>>>> On Mon, 15 Feb 2021 13:38:42 +0000, Colin Baxter <m43cap@yandex.com> said:
    Colin> This has worked until today. Now if data.org.gpg is opened I
    Colin> get an error.

    Colin> Debugger entered--Lisp error: (void-variable minor-modes)
    Colin> (sensitive-mode t)

    > My crystal ball says youʼre tracking emacs-master, and you've been
    > bitten by the renaming of minor-modes to local-minor-modes. A
    > bootstrap will fix that.

Odd. The problem has gone away and all is now well. I am tracking the
master branch of emacs-28; however, I thought I had checked and got the
same error using emacs-27.1. Now I'm not sure what I did. I've
recompiled a fresh emacs-28 and the error has gone. Thanks Robert and
Ihor for your advice.

Best wishes,


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encryption problems using org-mode
  2021-02-15 14:52   ` Colin Baxter
@ 2021-02-15 15:07     ` Ihor Radchenko
  2021-02-15 18:11       ` Colin Baxter
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2021-02-15 15:07 UTC (permalink / raw)
  To: Colin Baxter, Robert Pluim; +Cc: emacs-orgmode

Colin Baxter <m43cap@yandex.com> writes:

> Odd. The problem has gone away and all is now well. I am tracking the
> master branch of emacs-28; however, I thought I had checked and got the
> same error using emacs-27.1.

This is because .elc files are in .gitignore. Checking out other branch
would leave all the compiled .elc files in place and they have a loading
priority, thus you effectively did nothing when checked out to other
branch without running make bootstrap or make clean.

Best,
Ihor


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encryption problems using org-mode
  2021-02-15 15:07     ` Ihor Radchenko
@ 2021-02-15 18:11       ` Colin Baxter
  0 siblings, 0 replies; 6+ messages in thread
From: Colin Baxter @ 2021-02-15 18:11 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: , Robert Pluim, emacs-orgmode

>>>>> Ihor Radchenko <yantar92@gmail.com> writes:

    > Colin Baxter <m43cap@yandex.com> writes:
    >> Odd. The problem has gone away and all is now well. I am tracking
    >> the master branch of emacs-28; however, I thought I had checked
    >> and got the same error using emacs-27.1.

    > This is because .elc files are in .gitignore. Checking out other
    > branch would leave all the compiled .elc files in place and they
    > have a loading priority, thus you effectively did nothing when
    > checked out to other branch without running make bootstrap or make
    > clean.

That makes sense. Thank you for the information.

Best wishes,


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-15 18:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 13:38 encryption problems using org-mode Colin Baxter
2021-02-15 14:01 ` Robert Pluim
2021-02-15 14:52   ` Colin Baxter
2021-02-15 15:07     ` Ihor Radchenko
2021-02-15 18:11       ` Colin Baxter
2021-02-15 14:08 ` Ihor Radchenko

unofficial mirror of emacs-orgmode@gnu.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/orgmode/0 orgmode/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 orgmode orgmode/ https://yhetil.org/orgmode \
		emacs-orgmode@gnu.org
	public-inbox-index orgmode

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git