unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64212: 29.0.91; \Phi missing in TeX input method
@ 2023-06-21 23:24 Roland Winkler
  2023-06-22  5:01 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Roland Winkler @ 2023-06-21 23:24 UTC (permalink / raw)
  To: 64212


The TeX input method is missing \Phi that should give GREEK CAPITAL
LETTER PHI.  I am surprised I never stumbled upon this previously.  But
apparently that's what it is (with emacs -Q).

(There is a special treatment of variants of the greek letter phi in
latin-ltx.el that goes beyond my knowledge of how input methods are
implemented.)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#64212: 29.0.91; \Phi missing in TeX input method
  2023-06-21 23:24 bug#64212: 29.0.91; \Phi missing in TeX input method Roland Winkler
@ 2023-06-22  5:01 ` Eli Zaretskii
  2023-06-22 13:49   ` Roland Winkler
  2023-06-22 14:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2023-06-22  5:01 UTC (permalink / raw)
  To: Roland Winkler, Stefan Monnier; +Cc: 64212

> From: Roland Winkler <winkler@gnu.org>
> Date: Wed, 21 Jun 2023 18:24:20 -0500
> 
> 
> The TeX input method is missing \Phi that should give GREEK CAPITAL
> LETTER PHI.  I am surprised I never stumbled upon this previously.  But
> apparently that's what it is (with emacs -Q).

Why do you need that letter in a TeX context?  Greek has its own input
method, and GREEK CAPITAL LETTER PHI is there (type 'F').  AFAIU, the
TeX input method is more for typing scientific text in TeX and its
variants, and there they use a different codepoint for the symbol.

> (There is a special treatment of variants of the greek letter phi in
> latin-ltx.el that goes beyond my knowledge of how input methods are
> implemented.)

If all that's needs to be added to the input method is

   ("\\Phi" ?Φ)

then I can do that.  If something more complex is required, patches
are welcome, as I don't use this input method (nor TeX in general).

I added Stefan who I think knows more about this.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#64212: 29.0.91; \Phi missing in TeX input method
  2023-06-22  5:01 ` Eli Zaretskii
@ 2023-06-22 13:49   ` Roland Winkler
  2023-06-22 14:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 6+ messages in thread
From: Roland Winkler @ 2023-06-22 13:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, 64212

On Thu, Jun 22 2023, Eli Zaretskii wrote:
> Why do you need that letter in a TeX context?  

The TeX input method is ideal if you are familar with TeX syntax, but
you have unicode-aware plain text (not a TeX source file) that may be
sprinkled with math symbols including greek characters.  For me, this
includes, for example, diary files and the text and annotation layers of
djvu documents.

> If all that's needs to be added to the input method is
>
>    ("\\Phi" ?Φ)
>
> then I can do that.

I am confused that latin-ltx.el treats variants of phi and epsilon
special such that the code provides a definition of \Epsilon (where I do
not see where this is done), but the definition of \Phi is missing.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#64212: 29.0.91; \Phi missing in TeX input method
  2023-06-22  5:01 ` Eli Zaretskii
  2023-06-22 13:49   ` Roland Winkler
@ 2023-06-22 14:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-06-22 15:17     ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-22 14:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Roland Winkler, 64212

>> The TeX input method is missing \Phi that should give GREEK CAPITAL
>> LETTER PHI.  I am surprised I never stumbled upon this previously.  But
>> apparently that's what it is (with emacs -Q).
> Why do you need that letter in a TeX context?

FWIW, the TeX input method uses a lot of such Greek letters already.

> TeX input method is more for typing scientific text in TeX and its
> variants, and there they use a different codepoint for the symbol.

I don't see any better code point for capital phi.

>> (There is a special treatment of variants of the greek letter phi in
>> latin-ltx.el that goes beyond my knowledge of how input methods are
>> implemented.)
>
> If all that's needs to be added to the input method is
>
>    ("\\Phi" ?Φ)
>
> then I can do that.

That would work, but I think the problem was in the regexp and the patch
below should fix it The Right Way.  Should I push it to `master` or are
we still considering such fixes for `emacs-29`?


        Stefan


diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el
index 21a01c85737..9be3d722504 100644
--- a/lisp/leim/quail/latin-ltx.el
+++ b/lisp/leim/quail/latin-ltx.el
@@ -244,7 +244,8 @@
     ;; (which is \varphi) are reversed in `ucs-names', so we define
     ;; them manually.  Also ignore "GREEK SMALL LETTER EPSILON" and
     ;; add the correct value for \epsilon manually.
-    (unless (string-match-p "\\<\\(?:PHI\\|GREEK SMALL LETTER EPSILON\\)\\>" name)
+    (unless (string-match-p "\\<GREEK SMALL LETTER \\(?:EPSILON\\|PHI\\)\\>"
+                            name)
       (concat "\\" (funcall (if (match-end 1) #' capitalize #'downcase)
                             (match-string 2 name)))))
   "\\`GREEK \\(?:SMALL\\|CAPITA\\(L\\)\\) LETTER \\([^- ]+\\)\\'")






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#64212: 29.0.91; \Phi missing in TeX input method
  2023-06-22 14:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-06-22 15:17     ` Eli Zaretskii
  2023-06-22 17:11       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2023-06-22 15:17 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: winkler, 64212

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Roland Winkler <winkler@gnu.org>,  64212@debbugs.gnu.org
> Date: Thu, 22 Jun 2023 10:42:37 -0400
> 
> > If all that's needs to be added to the input method is
> >
> >    ("\\Phi" ?Φ)
> >
> > then I can do that.
> 
> That would work, but I think the problem was in the regexp and the patch
> below should fix it The Right Way.  Should I push it to `master` or are
> we still considering such fixes for `emacs-29`?

I'd prefer master.  Regular expressions, especially those which use
these constructs, are never without subtle aspects, and we have enough
issues on emacs-29 already, which keep me from releasing 29.1 for far
too long.  The problem, after all, is really minor at best.

Thanks.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#64212: 29.0.91; \Phi missing in TeX input method
  2023-06-22 15:17     ` Eli Zaretskii
@ 2023-06-22 17:11       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-22 17:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: winkler, 64212-done

> I'd prefer master.

Perfect, pushed!


        Stefan






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-22 17:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 23:24 bug#64212: 29.0.91; \Phi missing in TeX input method Roland Winkler
2023-06-22  5:01 ` Eli Zaretskii
2023-06-22 13:49   ` Roland Winkler
2023-06-22 14:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-22 15:17     ` Eli Zaretskii
2023-06-22 17:11       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).