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

colors not copied on Cygwin (fiddle.rb::dlopen fails) #4

Open
VladimirAlexiev opened this issue Mar 15, 2019 · 0 comments
Open

colors not copied on Cygwin (fiddle.rb::dlopen fails) #4

VladimirAlexiev opened this issue Mar 15, 2019 · 0 comments

Comments

@VladimirAlexiev
Copy link

When I use highlight2clipboard-copy-region-to-clipboard, the text is copied but without colors.

Here's my environment:

>ruby -v
ruby 2.3.6p384 (2017-12-14 revision 9808) [x86_64-cygwin]
last_commit=ruby 2.3.3

>uname
CYGWIN_NT-10.0

ELISP> emacs-version
"26.1"
ELISP> (concat highlight2clipboard--directory "bin/highlight2clipboard-w32.rb")
"c:/my/.emacs.d/elpa/highlight2clipboard-20151020.1840/bin/highlight2clipboard-w32.rb"

The HTML file is created correctly, so I tried to run the ruby script from the command line:

>ruby c:/my/.emacs.d/elpa/highlight2clipboard-20151020.1840/bin/highlight2clipboard-w32.rb c:/tmp/h2c-cb6uYe.html
/usr/share/ruby/2.3.0/fiddle.rb:47:in `initialize': No such file or directory (LoadError)
        from /usr/share/ruby/2.3.0/fiddle.rb:47:in `new'
        from /usr/share/ruby/2.3.0/fiddle.rb:47:in `dlopen'
        from /usr/share/ruby/2.3.0/Win32API.rb:15:in `initialize'
        from c:/my/.emacs.d/elpa/highlight2clipboard-20151020.1840/bin/highlight2clipboard-w32.rb:68:in `new'
        from c:/my/.emacs.d/elpa/highlight2clipboard-20151020.1840/bin/highlight2clipboard-w32.rb:68:in `add'
        from c:/my/.emacs.d/elpa/highlight2clipboard-20151020.1840/bin/highlight2clipboard-w32.rb:36:in `init_functions'

        from c:/my/.emacs.d/elpa/highlight2clipboard-20151020.1840/bin/highlight2clipboard-w32.rb:77:in `<class:W32>'
        from c:/my/.emacs.d/elpa/highlight2clipboard-20151020.1840/bin/highlight2clipboard-w32.rb:34:in `<main>'

I looked into fiddle.rb and the error is in this line:

>less +47 /usr/share/ruby/2.3.0/fiddle.rb
  def dlopen library
    Fiddle::Handle.new library
  end

Looks like I need some extra module?

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

1 participant