bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55332: 29.0.50; Greek tutorial multiline [...] mishandled


From: Basil L. Contovounesios
Subject: bug#55332: 29.0.50; Greek tutorial multiline [...] mishandled
Date: Sun, 08 May 2022 23:14:12 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Severity: minor
Tags: patch

First off, thank you very much Protesilae for the new translation of the
tutorial!

While reading it I noticed a technical discrepancy with other tutorials:

0. emacs -Q
1. C-u C-h t Greek RET

If the Emacs frame is short enough, I see:

Attachment: short.png
Description: Short Emacs frame visiting Greek tutorial

And if it's tall enough, I see:

Attachment: tall.png
Description: Tall Emacs frame visiting Greek tutorial

IOW, the multiline Greek translation of:

  [Middle of page left blank for didactic purposes.   Text continues below]

is either half-erased in short frames, or divided by several blank lines
in tall frames.

One solution would be to limit the Greek translation to a single line as
in other translations, but why not instead teach tutorial.el to handle
multiline instances of this comment, as in the following patch?

>From d0eee019a6e7b228378074295ef60bf4b6b47af9 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Sun, 8 May 2022 22:51:36 +0300
Subject: [PATCH] Support multiline [...] comments in Emacs Tutorial

* lisp/tutorial.el (help-with-tutorial): Don't assume [...] comment
spans a single line; instead skip it as a sexp.
---
 lisp/tutorial.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 0f3a1506d6..8ae370944a 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -905,13 +905,14 @@ help-with-tutorial
                 (progn
                   ;; For a short gap, we don't need the [...] line,
                   ;; so delete it.
-                  (delete-region (point) (progn (end-of-line) (point)))
+                  (delete-region (point) (progn (forward-sexp) (point)))
                   (if (> n 0) (newline n)))
               ;; Some people get confused by the large gap.
               (newline (/ n 2))
 
               ;; Skip the [...] line (don't delete it).
-              (forward-line 1)
+              (forward-sexp)
+              (forward-line)
               (newline (- n (/ n 2)))))
           (goto-char (point-min)))
         (setq buffer-undo-list nil)
-- 
2.35.1

Thanks,

-- 
Basil

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 
1.16.0, Xaw3d scroll bars)
 of 2022-05-08 built on tia
Repository revision: 21ef29d4b1ea85c4b94232f028b3aa29a4a1a81b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure CC=gcc-12 'CFLAGS=-Og -ggdb3' --config-cache --prefix
 /home/blc/.local --enable-checking=structs --with-x-toolkit=lucid
 --with-file-notification=yes --with-x'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_IE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date seq gv
subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tutorial
help-mode cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice simple cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo x-toolkit xinput2 x multi-tty make-network-process emacs)

Memory information:
((conses 16 45197 8027)
 (symbols 48 5860 1)
 (strings 32 16891 1337)
 (string-bytes 1 532340)
 (vectors 16 11507)
 (vector-slots 8 165888 7813)
 (floats 8 23 38)
 (intervals 56 383 0)
 (buffers 992 12))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]