GithubHelp home page GithubHelp logo

Comments (6)

rndusr avatar rndusr commented on May 28, 2024

from subed.

twlz0ne avatar twlz0ne commented on May 28, 2024

That prints "Debug on Error enabled globally" and exits with 0.

It's strange.

The error on my computer is caused by the following code in subed-autoloads.el:

(dolist (item subed--init-alist) (let ((file-ext-regex (car item))) (add-to-list 'auto-mode-alist (cons (concat "\\." file-ext-regex "\\'") 'subed-mode))))

When I moved the definition of subed--init-alist from subed-config.el to subed.el, then remake autoloads, the error dispear:

  • subed-config.el
- (defvar subed--init-alist '(("srt" . subed-srt--init)
-                             ("vtt" . subed-vtt--init))
-   "Alist that maps file extensions to format-specific init functions.")
  • subed.el
+ ;;;###autoload
+ (defvar subed--init-alist '(("srt" . subed-srt--init)
+                             ("vtt" . subed-vtt--init))
+   "Alist that maps file extensions to format-specific init functions.")
...

;;;###autoload
(dolist (item subed--init-alist)
  (let ((file-ext-regex (car item)))
    (add-to-list 'auto-mode-alist (cons (concat "\\." file-ext-regex "\\'")
                                        'subed-mode))))
  • subed-autoloads.el
+ (defvar subed--init-alist '(("srt" . subed-srt--init) ("vtt" . subed-vtt--init)) "\
+ Alist that maps file extensions to format-specific init functions.")
...
(dolist (item subed--init-alist) (let ((file-ext-regex (car item))) (add-to-list 'auto-mode-alist (cons (concat "\\." file-ext-regex "\\'") 'subed-mode))))

from subed.

rndusr avatar rndusr commented on May 28, 2024

from subed.

twlz0ne avatar twlz0ne commented on May 28, 2024

Where did you get subed-autoloads.el? It's not part of the repo.

Now I understand why there is no error occurs on your computer, because you used the source code directly, that makes autoload not take effect.

I installed subed via quelpa:

(quelpa '(subed :fetcher github "rndusr/subed" :files "subed/*.el"))

It compiles the source into an ELPA compatible package, the subed-autoloads.el is thus created.

The little change I made above will ensure that the definition of subed--init-alist will also be added to subed-autoloads.el before the dolist statement: twlz0ne@73ad0a5

from subed.

dalugm avatar dalugm commented on May 28, 2024

Same problem here, I'm using borg to install this package which will also generate an autoload file when building.

twlz0ne's patch resolves this issue.

from subed.

rndusr avatar rndusr commented on May 28, 2024

from subed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.