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

Wrong type argument #40

Closed
fhaun opened this issue Jan 4, 2016 · 6 comments
Closed

Wrong type argument #40

fhaun opened this issue Jan 4, 2016 · 6 comments

Comments

@fhaun
Copy link

fhaun commented Jan 4, 2016

With GNU Emacs 25.1.50.1 (armv7l-unknown-linux-gnueabihf, X toolkit, Xaw3d scroll bars) of 2015-12-26, I get:
Wrong type argument: integer-or-marker-p, 4294967295.0

Here is the backtrace. I hope this helps, Frank

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p 4294967295.0)
logand(413504475 4294967295.0)
google-translate--gen-rl(403419 "+-a^+6")
#[(a e) "\303� \n"\207" [a e vb google-translate--gen-rl] 3](403318 101)
cl-reduce(#[(a e) "\303� \n"\207" [a e vb google-translate--gen-rl] 3] "enter" :initial-value 403318)
google-translate--gen-tk("enter")
google-translate--request("en" "de" "enter")
google-translate-request("en" "de" "enter")
google-translate-translate("en" "de" "enter")
%google-translate-at-point(nil nil)
google-translate-at-point(nil)
funcall-interactively(google-translate-at-point nil)
call-interactively(google-translate-at-point record nil)
command-execute(google-translate-at-point record)
execute-extended-command(nil "google-translate-at-point" nil)
funcall-interactively(execute-extended-command nil "google-translate-at-point" nil)
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)

@momomo5717
Copy link
Contributor

Hello, @fhaun

It seems 4294967295 was evaluated as a floating-point number.
https://github.com/atykhonov/google-translate/blob/master/google-translate-core.el#L179

Here is a quick fix for this issue:
https://gist.github.com/momomo5717/16df9af4ce044367487c
It would be helpful if you could try it.

I didn't realize that the minimum range of integer is 30 bits.
http://www.gnu.org/software/emacs/manual/html_node/elisp/Integer-Basics.html#Integer-Basics

Thank you.

@fhaun
Copy link
Author

fhaun commented Jan 6, 2016

Hi momomo5717,

very nice, works fine now.

Thanks and regards, Frank

@atykhonov
Copy link
Owner

Hi all!

I've committed changes which I had found in the gist. The newest v0.11.4 contains these changes.

@momomo5717 thank you very much for contribution!

@momomo5717 could you please provide your name, surname and email? I would like to add you to the list of contributors.

Thank you!

@momomo5717
Copy link
Contributor

@fhaun Thank you for the feedback! I'm glad it works for you.

@atykhonov Thank you for merging it!

@momomo5717 could you please provide your name, surname and email? I would like to add you to the list of contributors.

If possible, could you add momomo5717([at]google[dot]com) ?

I'm happy I could contribute.

Thank you.

@atykhonov
Copy link
Owner

Hi @momomo5717 !

I'm very sorry for such long delay! I've added you to the list of Contributors (README and to the each .el file).

Thank you very much for the contribution!

@momomo5717
Copy link
Contributor

Hi @atykhonov,

My pleasure 😄
This is the first time I've been listed as a contributor.
Many thanks!

PS: I'm so sorry I made a typo at the previous post. I'm very embarrassed.
I use gmail.com.

I will send a PR.
I'm sorry for the trouble.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants