Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It show me can't found emacs when i format verilog code #2186

Closed
5 tasks done
feilongfl opened this issue Jul 18, 2018 · 7 comments
Closed
5 tasks done

It show me can't found emacs when i format verilog code #2186

feilongfl opened this issue Jul 18, 2018 · 7 comments

Comments

@feilongfl
Copy link

feilongfl commented Jul 18, 2018

Description

The results of beautification are not what I expect.

It show me can't found emacs when i format verilog code,but I have installed Emacs.

i have seen the log,I found it can print emacs verison.

line 3676

2018-07-18T02:19:24.155Z - verbose: [] spawn result, returnCode 0
2018-07-18T02:19:24.155Z - verbose: [] spawn result, stdout GNU Emacs 26.1
Copyright (C) 2018 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

2018-07-18T02:19:24.155Z - verbose: [] spawn result, stderr 
2018-07-18T02:19:24.155Z - info: [] Version text: GNU Emacs 26.1
Copyright (C) 2018 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

2018-07-18T02:19:24.156Z - error: []  message=Cannot read property '1' of null, stack=TypeError: Cannot read property '1' of null
    at HybridExecutable.parse [as versionParse] (file:///C:/Users/fei_l/.atom/packages/atom-beautify/src/beautifiers/verilog-mode/index.coffee:20:62)
    at file:///C:/Users/fei_l/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:92:18
    at tryCatcher (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromiseCtx (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:606:10)
    at Async._drainQueue (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:138:12)
    at Async._drainQueues (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:143:10)
    at Async.drainQueues (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:17:14)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7), rawStack=[, , , , , , , , , , ]
2018-07-18T02:19:24.157Z - debug: [beautifiers\beautifier.coffee] Error loading executables message=Could not find 'Emacs'. The program may not be installed., stack=Error: Could not find 'Emacs'. The program may not be installed.

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Debug

Here is a link to the debug.md Gist: https://gist.github.com/feilongfl/7fd778ccb757a7e522cea0ba6c4dc752#logs

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
@ghost
Copy link

ghost commented Jul 18, 2018

Please follow the issue template provided. More specifically, update the original comment for this issue by adding a link to the required debug.md gist which includes debugging information that answers our most commonly asked questions. Thank you.

@feilongfl
Copy link
Author

feilongfl commented Jul 18, 2018

I think it's cause by emacs version,i have change the line 20 in packages\atom-beautify\src\beautifiers\verilog-mode\index.coffee to

parse: (text) -> text.match(/Emacs (\d+\.\d+(?:\.\d+)?)/)[1]

then i receive anothor error

2018-07-18T02:43:28.430Z - error: []  message=Version is not valid: 26.1, stack=Error: Version is not valid: 26.1
    at file:///C:/Users/fei_l/.atom/packages/atom-beautify/src/beautifiers/executable.coffee:96:17
    at tryCatcher (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:143:10)
    at Async.drainQueues (C:\Users\fei_l\.atom\packages\atom-beautify\node_modules\bluebird\js\release\async.js:17:14)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7), rawStack=[, , , , , , , , , , ]

@stevenzeck
Copy link
Contributor

@feilongfl Can you copy/paste the exact terminal output when you run a version check for Emacs?

@feilongfl
Copy link
Author

feilongfl commented Jul 18, 2018

PS D:\download\Compressed\emacs-26.1-i686\bin> ./emacs --version
GNU Emacs 26.1
Copyright (C) 2018 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

@szeck87
OK,it's the console output

@stevenzeck stevenzeck added the bug label Jul 18, 2018
@stevenzeck
Copy link
Contributor

Yep you're right. But 26.1 isn't a valid semver version, hence why you still receive an error when you change it.

@feilongfl
Copy link
Author

feilongfl commented Jul 21, 2018

@szeck87
I think this is a bug,if program's version like X.X ,atom-beautify will throw a version error.

@stale
Copy link

stale bot commented Sep 19, 2018

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 19, 2018
@stale stale bot closed this as completed Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants