From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: Emacs as a word processor (ways to convert Word/RTF proprietary files) Date: Fri, 25 Dec 2020 12:58:23 +0300 Message-ID: References: <0E591E8B-FD55-4829-8421-6F2C02AFD20C@mit.edu> <83eejenvy2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39966"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 25 11:01:08 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ksjuF-000AHw-QZ for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Dec 2020 11:01:07 +0100 Original-Received: from localhost ([::1]:59810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksjuE-0007IF-Qx for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Dec 2020 05:01:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksjsw-0006rX-BD for emacs-devel@gnu.org; Fri, 25 Dec 2020 04:59:46 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:35075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksjst-0007WL-Me for emacs-devel@gnu.org; Fri, 25 Dec 2020 04:59:45 -0500 Original-Received: from localhost ([::ffff:41.210.146.133]) (AUTH: PLAIN securesender, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000002DFDF.000000005FE5B80C.00000536; Fri, 25 Dec 2020 02:59:40 -0700 Mail-Followup-To: emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <83eejenvy2.fsf@gnu.org> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261728 Archived-At: * Eli Zaretskii [2020-12-25 11:15]: > > Date: Fri, 25 Dec 2020 10:14:40 +0300 > > From: Jean Louis > > > > - there are Word importing capabilities by using other available free > > software. Emacs could advise users to install some external software > > to convert from Word. > I think you underestimate the amount of pressure applied on any > J.R. Hacker having a daytime job to use MS Office. You cannot be a > useful and appreciated part of an organization without having to use > those tools, because all the correspondence and all the > documentation is based on that. And there's no real Free Software > alternative, certainly not based on Emacs. Since 21 years I use free software. Before that I used proprietary Windows and various programs. Already back then I have found all the free software to replace anything that I otherwise used on Windows. I remember using LyX and writing books and HTML pages with it. That is why I cannot share that opinion. I did find what I needed many years ago, individually, so other users can also find it. > The alternative solutions you suggest are extremely impractical. They > require people who know nothing about DOCX, DocBook, XML, ODT, and > other formats to become proficient enough in these to figure out > whether every feature of MS Office can be supported. (Do _you_ know > if everything is supported?) Among priorities to have word processing or to have import/export with Word format, than first would first to have word processing that users may construct their pages in WYSIWYG fashion, and print it and get nice results. As you mentioned enriched mode, and I am using it for notes in the database, that could be good start (without knowing technical background). And I have not mentioned anything impractical. I was thinking it will be natural to understand that such features of Abiword or antiword can be used from Emacs functions. Recently we discussed using `curl' as outside tool, it is not FSF copyrighted and we discuss it. I can think that many other libraries are also used by Emacs that do not come from FSF necessarily. So you could bind/link or otherwise provide simple functions that invoke Abiword on command line to provide import/export for various documents. That is practical, not impractical. Otherwise as Abiword is from Gnome project, you could include parts of it in Emacs. I really did not look into those technicalities, the references I gave you are for consideration and research. Then visualize it: Menu -> File -> Import -> Word Document, open up document in Dired and run function with Abiword to convert it to format that Emacs will understand. Menu -> File -> Export -> Word Document, run function with Abiword to convert the file Emacs is editing to be exported as Word document. I hope you get better picture now. > You further ask them to be able to create for themselves a bunch of > scripts or programs to convert the Office files to something else, > edit it in Emacs, then convert back without losing important > features of the original document. As the main target is GNU/Linux we need not ask people to keep any compatibility with Word. Providing conversion functions as explained above is enough. Apropos asking, with Emacs we ask users ANYTHING POSSIBLE, including to know Emacs Lisp and in comparison with outside software Emacs configurations cannot be said to be user friendly. It is advanced text editor and rather for advanced users. Every user in Emacs and on mailing list is asked to create bunch of scripts and programs to convert this and that, do this and that, just look any mailing list and observe. I am always supporting integration, it means connecting functions together for users to have better accessible integrated environment. > This is why it would be useful to have this kind of capabilities in > Emacs: to enable users to visit MS Office documents with "C-x C-f", > edit them in some specialized WYSIWYG Emacs mode, and finally save > them with "C-x C-s". If under the hood this runs some converters, it > doesn't matter. We both agree, you just went away from the yellow brick road. I just pointed out that tools exist and they could be used to be integrated in Emacs without reinventing the wheel. Just use available libraries and programs. Also note that Libreoffice also has command line conversion. [--outdir output_dir] file... Batch converts files. If --outdir is not specified then the current working directory is used as the output directory for the converted files. It implies --headless. Examples: --convert-to pdf *.doc Converts all .doc files to PDFs. --convert-to pdf:writer_pdf_Export --outdir /home/user *.doc Converts all .doc files to PDFs using the settings in the Writer PDF export dialog and saving them in /home/user. And that reference is NOT meant for users to make it manually but to use it within Emacs to integrate it so that user can just open the file and Emacs can convert it on the fly. Customization options could say which converter to use: - antiword - abiword - libreoffice - openoffice - etc. > > - another good one is Abiword which has Word import/export > > capabilities on the command line. So a simple Emacs function of few > > lines could already use Abiword as external convertor and import file > > into Emacs word processing > > So you are saying that, from the Free Software philosophy POV, it is > not okay to have Emacs be able to access such files, but it _is_ > okay to use the likes of Abiword to do the same? Yes, I do. I would say the same to Abiword would I be back in time when they started with it. If option already exists, then I think that focusing on handling or putting priority on Word files in Emacs is total deviation from priorities. > I don't think I see the logic in that. If you are opposed to using > MS Office file formats, you should refuse to look at them, in any > form or shape, and instead request that the person who sends them > produces them in some free format instead. That would be a logical > position which I can understand and respect. I do refuse and never open such files. I send to people instructions how to convert them and will not read it until they do, and they do.