emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Barthel <bch@online.de>
To: emacs-orgmode@gnu.org
Subject: org-ref / Edit notes problem
Date: Fri, 19 Mar 2021 14:58:45 +0100	[thread overview]
Message-ID: <87o8fftfca.fsf@t480.onfire.org> (raw)

Hi,

I am using Emacs 27.1 on OpenBSD 6.8 and org-ref
(20210315.1730).  When I am trying to Edit notes on an existing
org-ref entry ([f9] Edit Notes), emacs stops working and hangs. 

By some observation, I saw that emacs is consuming a lot of
memory and the garbage collector seems to run quite frequently
(see the trace above).  This happens after pressing [f9].

Output top(1)
--8<---------------cut here---------------start------------->8---
$ top
  PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
45199 bch       43   -5  273M  307M onproc/1  -         0:13 36.33% emacs-27.1

...

PID USERNAME PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
45199 bch       47   -5  409M  444M onproc/1  -         0:25 49.27% emacs-27.1
--8<---------------cut here---------------end--------------->8---

The profile-report was generated by pressing [f9] and pressing
C-g a few seconds afterwards.   (emacs will become unresponsive
when waiting longer)

Profile:
--8<---------------cut here---------------start------------->8---
- command-execute                                                  52  51%
 - call-interactively                                              52  51%
  - funcall-interactively                                          52  51%
   - org-ref-helm-insert-cite-link                                 51  50%
    - helm-bibtex                                                  48  47%
     - bibtex-completion-candidates                                30  29%
      - bibtex-completion-parse-bibliography                       18  17%
       - parsebib-read-entry                                       11  10%
        - parsebib--find-bibtex-field                               9   8%
         - parsebib--parse-value                                    9   8%
          - parsebib--expand-strings                                7   6%
           - mapcar                                                 7   6%
            - #<compiled 0xe4803b2339>                              7   6%
               replace-regexp-in-string                             6   5%
          parsebib--looking-at-goto-end                             1   0%
        - parsebib--match-paren-forward                             1   0%
         - parsebib--match-brace-forward                            1   0%
            forward-sexp                                            1   0%
       - bibtex-completion-prepare-entry                            7   6%
        - mapcar                                                    3   2%
         - #<compiled 0xe48c386fc9>                                 3   2%
          - bibtex-completion-find-note-multiple-files              2   1%
             f-directory?                                           2   1%
          - bibtex-completion-find-note-one-file                    1   0%
             f-file?                                                1   0%
        - bibtex-completion-find-pdf                                2   1%
         - bibtex-completion-find-pdf-in-library                    2   1%
          - -first                                                  1   0%
             f-file?                                                1   0%
          - f-join                                                  1   0%
           - -map                                                   1   0%
            - mapcar                                                1   0%
             - #<compiled 0xe49feddbc5>                             1   0%
                f-expand                                            1   0%
          member-ignore-case                                        1   0%
        - bibtex-completion-remove-duplicated-fields                1   0%
         - cl-remove-duplicates                                     1   0%
          - cl--delete-duplicates                                   1   0%
             cl--position                                           1   0%
      - secure-hash                                                 8   7%
       - select-safe-coding-system                                  8   7%
          find-coding-systems-region                                8   7%
      - message                                                     1   0%
       - redisplay_internal (C function)                            1   0%
        - funcall                                                   1   0%
         - #<compiled 0xe4acccdd6f>                                 1   0%
          - gui-backend-selection-exists-p                          1   0%
           - apply                                                  1   0%
              #<compiled 0xe4acc95353>                              1   0%
      - bibtex-completion-resolve-crossrefs                         1   0%
       - bibtex-completion-make-entry-hash                          1   0%
        - bibtex-completion-get-value                               1   0%
           replace-regexp-in-string                                 1   0%
     - helm                                                        18  17%
      - apply                                                      18  17%
       - helm                                                      18  17%
        - apply                                                    18  17%
         - helm-internal                                           18  17%
          - helm-read-from-minibuffer                              17  16%
           - helm-update                                           12  11%
            - helm--collect-matches                                12  11%
             - helm-compute-matches                                 8   7%
              - helm-process-filtered-candidate-transformer         8   7%
               - helm-apply-functions-from-source                   8   7%
                - apply                                             8   7%
                 - helm-bibtex-candidates-formatter                 8   7%
                  - bibtex-completion-format-entry                  8   7%
                   - s-format                                       8   7%
                    - replace-regexp-in-string                      7   6%
                     - #<compiled 0xe4976d474d>                     5   4%
                      - #<compiled 0xe48c3873e9>                    5   4%
                       - bibtex-completion-shorten-authors          2   1%
                        - s-split                                   2   1%
                           split-string                             2   1%
                       - bibtex-completion-clean-string             1   0%
                          replace-regexp-in-string                  1   0%
             - require                                              2   1%
              - byte-code                                           2   1%
               - require                                            1   0%
                - byte-code                                         1   0%
                 - require                                          1   0%
                    byte-code                                       1   0%
             read-from-minibuffer                                   3   2%
          - helm-execute-selection-action                           1   0%
           - helm-execute-selection-action-1                        1   0%
            - helm-bibtex-edit-notes                                1   0%
             - bibtex-completion-edit-notes                         1   0%
              - bibtex-completion-edit-notes-default                1   0%
               - bibtex-completion-get-entry                        1   0%
                  bibtex-completion-get-entry1                      1   0%
    - org-ref-find-bibliography                                     3   2%
     - reftex-locate-bibliography-files                             3   2%
        reftex-using-biblatex-p                                     1   0%
   - execute-extended-command                                       1   0%
    - sit-for                                                       1   0%
       redisplay                                                    1   0%
- ...                                                              49  48%
   Automatic GC                                                    44  43%
 - after-find-file                                                  4   3%
  - run-hooks                                                       4   3%
   - vc-refresh-state                                               4   3%
    - vc-backend                                                    4   3%
     - vc-registered                                                4   3%
      - mapc                                                        4   3%
       - #<compiled 0xe48ec19ff1>                                   4   3%
        - vc-call-backend                                           4   3%
         - apply                                                    4   3%
          - vc-git-registered                                       4   3%
           - vc-git--out-ok                                         4   3%
            - apply                                                 4   3%
             - vc-git--call                                         4   3%
              - apply                                               4   3%
               - process-file                                       4   3%
                  apply                                             4   3%
 - minibuffer-complete                                              1   0%
  - completion-in-region                                            1   0%
   - completion--in-region                                          1   0%
    - #<compiled 0xe49fad1be5>                                      1   0%
     - apply                                                        1   0%
      - #<compiled 0xe4acc98035>                                    1   0%
       - completion--in-region-1                                    1   0%
        - completion--do-completion                                 1   0%
         - completion-try-completion                                1   0%
          - completion--nth-completion                              1   0%
           - completion--some                                       1   0%
            - #<compiled 0xe4a8d497dd>                              1   0%
             - completion-basic-try-completion                      1   0%
              - try-completion                                      1   0%
               - #<compiled 0xe4accb70af>                           1   0%
                  complete-with-action                              1   0%
--8<---------------cut here---------------end--------------->8---

I tried to reduce my init.el as much as possible: I started with
-Q and executed this and were able to reproduce it with this:

--8<---------------cut here---------------start------------->8---
(require 'package)
(package-initialize)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)
(when (not (package-installed-p 'use-package))
  (package-refresh-contents)
  (package-install 'use-package))

(require 'org)
(setq org-agenda-files
   orgfile list... )


(require 'org-ref)
(setq reftex-default-bibliography
      '("bib"))
(setq
 bibtex-completion-bibliography
 "bib"
 bibtex-completion-library-path
 "literature"
 bibtex-completion-notes-path
 "notes"
 )
(setq
 org-ref-bibliography-notes "notes.org"
 org-ref-default-bibliography
 '("bib")
 org-ref-pdf-directory
 "bib")
--8<---------------cut here---------------end--------------->8---
   
Other observation: when I am starting emacs with "-nw" (no GUI),
"Edit Notes" seems to work as expected and opens a new file as
expected. 

I have re-installed all packages with MELPA.

Has anyone seen a similar problem?

How can I further debug and analyze this to present a better
error report?

Thanks a lot,
  Christian


             reply	other threads:[~2021-03-19 13:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 13:58 Christian Barthel [this message]
2021-03-19 21:11 ` org-ref / Edit notes problem Christian Barthel
2021-03-20 12:51   ` yank freeze (org-ref / Edit notes problem) Maxim 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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87o8fftfca.fsf@t480.onfire.org \
    --to=bch@online.de \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

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

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).