jumper047 / fb2-reader

Emacs plugin to read .fb2 and .fb2.zip ebooks.
GNU General Public License v3.0
26 stars 2 forks source link

Line ending problem on windows #13

Closed artsi0m closed 1 year ago

artsi0m commented 1 year ago

Problem

It seems that i run into line ending problem with fb2-reader. On the attached screenshot there is fb2 file opened in emacs. This is not .zip.fb2, but extracted .fb2 file.

Failed attempt to solve

Attempted to execute C-x C-m r dos and C-x C-m r unix Also tried M-: (set-buffer-file-coding-system 'unix) and (set-buffer-file-coding-system 'dos) Had the same error message: Buffer does not seem to be associated with any file

emacs version

emacs from scoop package manager on windows 10.

$ scoop info emacs                                                                                      

Name        : emacs                                                                                     
Description : An extensible, customizable, free/libre text editor.                                      
Version     : 28.2                                                                                      
Bucket      : extras                                                                                    
Website     : https://www.gnu.org/software/emacs                                                        
License     : GPL-3.0-or-later                                                                          
Updated at  : 13.09.2022 23:29:17                                                                       
Updated by  : github-actions[bot]                                                                       
Installed   : 28.2                                                                                      
Binaries    : bin\runemacs.exe | bin\emacs.exe | bin\emacsclientw.exe | bin\etags.exe | bin\ctags.exe   
Shortcuts   : Emacs | Emacs Client                                                                      
Notes       : For 32-bit version, install 'versions/emacs27.2'                                          

Screenshot

image

File

http://flibusta.site/b/219915 http://flibusta.site/b/219915/fb2

jumper047 commented 1 year ago

Hi, thank you for reporting! Unluckily, right now I don't have windows machine to reproduce bug, but I'll try to do something in next week.

jumper047 commented 1 year ago

Tried to reproduce these symbols on Linux with no luck. Still trying to find windows machine for experiments. Just quick remark - you can execute (setq buffer-file-name fb2-reader-file-name) to re associate buffer with file and then execute (set-buffer-file-coding-system 'unix) (though I'm not sure it helps)

artsi0m commented 1 year ago

You may use virtual machine with windows. Windows images for virtual machines are free. https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

jumper047 commented 1 year ago

Sorry for long wait, I'm finally was able to take a proper look on this issue. It should be fixed now! Feel free to reopen it if not