From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs as a word processor Date: Wed, 23 Dec 2020 18:09:25 +0100 Message-ID: <87ft3w30vu.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36872"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:fICm6Aiza1lHoSJxQyEUmxVM70s= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 23 18:36:11 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 1ks83X-0009TM-ND for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Dec 2020 18:36:11 +0100 Original-Received: from localhost ([::1]:49704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ks83W-0007RX-PZ for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Dec 2020 12:36:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ks82X-0006qa-A0 for emacs-devel@gnu.org; Wed, 23 Dec 2020 12:35:09 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:39598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ks82S-0006Jv-3g for emacs-devel@gnu.org; Wed, 23 Dec 2020 12:35:09 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ks82P-0007wO-Pn for emacs-devel@gnu.org; Wed, 23 Dec 2020 18:35:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:261624 Archived-At: --=-=-= Content-Type: text/plain Stefan Kangas writes: >> One area that could benefit from some improvements is reference >> management. Org offers footnotes, which are not quite the same as >> proper first-class references or citations. > > Indeed, this is one of the worst parts of Org-mode now. But I have a > hard time even conceptually dreaming up what an ideal UI would look > like here. In terms of UI, I find RefTeX's selection buffers pretty ergonomic. For intra-document references: - C-c ) RET - s for subsections, t for tables, etc. - A pop-up buffer shows an outline of all matching labels in the document; the user can pick one with n/p and RET. For citations: - C-c [ - type in a regular expression - A pop-up buffer shows the list of all BibTeX entries where a field matches the regexp; the user can pick one with n/p and RET. Cf. [1] for a sample document and instructions to try out the UI. RefTeX's implementation is probably heavily tailored to BibTeX bibliographies; FWIW I think it'd make sense to reuse its "presentation layer", or at least take inspiration from it for a new UI. [1] Install AUCTeX from GNU ELPA, then evaluate the following: #+begin_src elisp (put 'TeX-auto-save 'safe-local-variable 'booleanp) (put 'TeX-parse-self 'safe-local-variable 'booleanp) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) (setq reftex-plug-into-AUCTeX t) #+end_src Save the attachments in $SOME_DIRECTORY; add this to $SOME_DIRECTORY/.dir-locals.el: #+begin_src elisp ((latex-mode . ((TeX-auto-save . t) (TeX-parse-self . t))) (bibtex-mode . ((TeX-auto-save . t) (TeX-parse-self . t)))) #+end_src Open the .tex attachment: C-c ) RET should allow you to pick any label defined inside the file; C-c [ should let you pick any citation defined in the .bib attachment. --=-=-= Content-Type: text/x-tex Content-Disposition: attachment; filename=example.tex \documentclass{article} \usepackage{float} \title{ Example document to showcase RefTeX UI } \begin{document} \maketitle \section{Introduction} \label{sec:intro} \section{Background} \label{sec:bg} See~\cite{rmsemacs}\cite{nativecomp}\cite{evolutionelisp}. \section{Methodology} \label{sec:method} \section{Results} \label{sec:results} \begin{table}[H] \centering \begin{tabular}{l|l|l} \textbf{Column 1} & \textbf{Column 2} & \textbf{Column 3} \\ \hline 1 & 2 & 3 \\ \end{tabular} \caption{Example table} \label{tab:results} \end{table} \section{Conclusion} \label{sec:conclusion} \bibliographystyle{alpha} \bibliography{biblio} \end{document} --=-=-= Content-Type: text/x-bibtex; charset=utf-8 Content-Disposition: attachment; filename=biblio.bib Content-Transfer-Encoding: quoted-printable @article{rmsemacs, author =3D {Stallman, Richard M.}, title =3D {{EMACS the Extensible, Customizable Self-Documenting Display= Editor}}, year =3D {1981}, issue_date =3D {June 1981}, publisher =3D {Association for Computing Machinery}, address =3D {New York, NY, USA}, volume =3D {16}, number =3D {6}, issn =3D {0362-1340}, url =3D {https://doi.org/10.1145/872730.806466}, doi =3D {10.1145/872730.806466}, abstract =3D {EMACS is a display editor which is implemented in an inte= rpreted high level language. This allows users to extend the editor by repl= acing parts of it, to experiment with alternative command languages, and to= share extensions which are generally useful. The ease of extension has con= tributed to the growth of a large set of useful features. This paper descri= bes the organization of the EMACS system, emphasizing the way in which exte= nsibility is achieved and used.This report describes work done at the Artif= icial Intelligence Laboratory of the Massachusetts Institute of Technology.= Support for the laboratory's research is provided in part by the Advanced = Research Projects Agency of the Department of Defense under Office of Naval= Research contract N00014-80-C-0505.}, journal =3D {SIGPLAN Not.}, month =3D apr, pages =3D {147=E2=80=93156}, numpages =3D {10} } @inproceedings{nativecomp, author =3D {Corallo, Andrea and Nassi, Luca and Manca, Nicola}, year =3D {2020}, month =3D {04}, pages =3D {}, title =3D {{Bringing GNU Emacs to Native Code}}, doi =3D {10.5281/zenodo.3736363} } @article{evolutionelisp, author =3D {Monnier, Stefan and Sperber, Michael}, title =3D {{Evolution of Emacs Lisp}}, year =3D {2020}, issue_date =3D {June 2020}, publisher =3D {Association for Computing Machinery}, address =3D {New York, NY, USA}, volume =3D {4}, number =3D {HOPL}, url =3D {https://doi.org/10.1145/3386324}, doi =3D {10.1145/3386324}, abstract =3D {While Emacs proponents largely agree that it is the world= =E2=80=99s greatest text editor, it is almost as much a Lisp machine disgui= sed as an editor. Indeed, one of its chief appeals is that it is programmab= le via its own programming language. Emacs Lisp is a Lisp in the classic tr= adition. In this article, we present the history of this language over its = more than 30 years of evolution. Its core has remained remarkably stable si= nce its inception in 1985, in large part to preserve compatibility with the= many third-party packages providing a multitude of extensions. Still, Emac= s Lisp has evolved and continues to do so. Important aspects of Emacs Lisp = have been shaped by concrete requirements of the editor it supports as well= as implementation constraints. These requirements led to the choice of a L= isp dialect as Emacs=E2=80=99s language in the first place, specifically it= s simplicity and dynamic nature: Loading additional Emacs packages or chang= ing the ones in place occurs frequently, and having to restart the editor i= n order to re-compile or re-link the code would be unacceptable. Fulfilling= this requirement in a more static language would have been difficult at be= st. One of Lisp=E2=80=99s chief characteristics is its malleability through= its uniform syntax and the use of macros. This has allowed the language to= evolve much more rapidly and substantively than the evolution of its core = would suggest, by letting Emacs packages provide new surface syntax alongsi= de new functions. In particular, Emacs Lisp can be customized to look much = like Common Lisp, and additional packages provide multiple-dispatch object = systems, legible regular expressions, programmable pattern-matching constru= cts, generalized variables, and more. Still, the core has also evolved, alb= eit slowly. Most notably, it acquired support for lexical scoping. The time= line of Emacs Lisp development is closely tied to the projects and people w= ho have shaped it over the years: We document Emacs Lisp history through it= s predecessors, Mocklisp and MacLisp, its early development up to the =E2= =80=9CEmacs schism=E2=80=9D and the fork of Lucid Emacs, the development of= XEmacs, and the subsequent rennaissance of Emacs development.}, journal =3D {Proc. ACM Program. Lang.}, month =3D jun, articleno =3D {74}, numpages =3D {55}, keywords =3D {History of programming languages, Lisp, Emacs Lisp} } --=-=-=--