unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13431: 24.2; UTF-8 causes bad reference position under Emacs Info
@ 2013-01-13 23:12 Joseph Oswald
  2019-06-27 11:44 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Oswald @ 2013-01-13 23:12 UTC (permalink / raw)
  To: 13431

[-- Attachment #1: Type: text/plain, Size: 6496 bytes --]

Info files with UTF-8 characters cause bad cursor positioning when
following references.

In the attached utf8-test info file, following the reference "English"
positions the point "p" in "speaking", several characters past where
the reference is located.

utf8-test was generated using makeinfo from texinfo 4.13

I did a bit of investigation: makeinfo apparently generates tag tables
using bytes, not characters; it seems Emacs Info is using goto-char
without the bytes-to-position conversion.

However, when I tried a simple fix, the position was still off-by-one.
Standalone info seems to be off-by-one position as well.

In GNU Emacs 24.2.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36)
 of 2012-11-29 on joseph-oswalds-ibook-g4.local
Windowing system distributor `Apple', version 10.3.1038
Configured using:
 `configure '--prefix=/opt/local' '--with-ns' '--without-x'
 '--without-dbus' 'CC=/usr/bin/gcc-4.2' 'CFLAGS=-pipe -O2 -arch x86_64'
 'LDFLAGS=-L/opt/local/lib -arch x86_64'
 'CPPFLAGS=-I/opt/local/include''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <up> <up>
<up> <up> <up> <up> <up> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> C-x C-x k
C-x k <return> y e s <return> q q q q C-u C-h i ~ /
D o c <tab> D e v <tab> F <tab> S <tab> t e <tab> <tab>
<tab> <return> n f E n g <tab> <return> <escape> x
<up> <return> <up> <up> <return> C-x ` <down> <up>
<up> C-v <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <up> C-x k <return> y e
s <return> q U H i C-u C-h i ~ / D o c u m e n t s
/ D e v e l o p m e n t / F S F / t e x t i n f o /
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> i n f o / u t f - <backspace> 8 - t e s
t <return> n f E n g l i s h <return> <escape> x <up>
<return>

Recent messages:
Checking 48 files in
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/emulation...
Checking 148 files in
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/emacs-lisp...
Checking 24 files in
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/cedet...
Checking 57 files in
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/calendar...
Checking 87 files in
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/calc...
Checking 65 files in
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/obsolete...
Checking 1 files in /Applications/MacPorts/Emacs.app/Contents/Resources/leim...
Checking for load-path shadows...done
byte-code: No more matches
Auto-saving...done

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message idna rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums eldoc network-stream
auth-source eieio assoc password-cache starttls tls doc-view image-mode
cl-specs edebug trace debug texnfo-upd goto-addr tabify vc-rcs color
cus-edit descr-text nroff-mode scheme sgml-mode conf-mode newcomment
nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc
rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
ruby-mode skeleton sh-script executable dired-aux mule-util cal-move
parse-time org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc
org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks find-func
org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb org
ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src
ob-comint ob-keys ob ob-eval org-pcomplete pcomplete org-list org-faces
org-compat org-entities org-macs noutline outline format-spec cal-menu
calendar cal-loaddefs ediff-merg ediff-diff ediff-wind ediff-help
ediff-util ediff-mult ediff-init ediff ind-util tar-mode jka-compr dired
misearch multi-isearch info vc-git texinfo help-mode view gnus gnus-ems
nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit cus-start
cus-load slime-asdf warnings slime-fancy slime-fontifying-fu
slime-package-fu slime-references slime-scratch slime-presentations
slime-fuzzy slime-fancy-inspector slime-c-p-c slime-editing-commands
slime-autodoc advice advice-preload slime-parse slime-repl slime
byte-opt bytecomp byte-compile cconv macroexp derived apropos help-fns
edmacro kmacro easy-mmode hideshow easymenu pp comint regexp-opt
ansi-color ring hyperspec thingatpt browse-url cl time-date tooltip
ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)

[-- Attachment #2: utf8-test --]
[-- Type: application/octet-stream, Size: 1007 bytes --]

[-- Attachment #3: utf8-test.texi --]
[-- Type: application/x-texinfo, Size: 1536 bytes --]

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

* bug#13431: 24.2; UTF-8 causes bad reference position under Emacs Info
  2013-01-13 23:12 bug#13431: 24.2; UTF-8 causes bad reference position under Emacs Info Joseph Oswald
@ 2019-06-27 11:44 ` Lars Ingebrigtsen
  2019-06-27 13:33   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-27 11:44 UTC (permalink / raw)
  To: Joseph Oswald; +Cc: 13431

Joseph Oswald <josephoswald@gmail.com> writes:

> Info files with UTF-8 characters cause bad cursor positioning when
> following references.
>
> In the attached utf8-test info file, following the reference "English"
> positions the point "p" in "speaking", several characters past where
> the reference is located.
>
> utf8-test was generated using makeinfo from texinfo 4.13
>
> I did a bit of investigation: makeinfo apparently generates tag tables
> using bytes, not characters; it seems Emacs Info is using goto-char
> without the bytes-to-position conversion.

I tested this now, and it seemed like it jumped to the right position,
so somebody fixed this during the past four years?

Closing this bug report; please reopen if this is still a problem.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#13431: 24.2; UTF-8 causes bad reference position under Emacs Info
  2019-06-27 11:44 ` Lars Ingebrigtsen
@ 2019-06-27 13:33   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2019-06-27 13:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: josephoswald, 13431

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 27 Jun 2019 13:44:06 +0200
> Cc: 13431@debbugs.gnu.org
> 
> Joseph Oswald <josephoswald@gmail.com> writes:
> 
> > I did a bit of investigation: makeinfo apparently generates tag tables
> > using bytes, not characters; it seems Emacs Info is using goto-char
> > without the bytes-to-position conversion.
> 
> I tested this now, and it seemed like it jumped to the right position,
> so somebody fixed this during the past four years?

Yes, see bufferpos-to-filepos.





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

end of thread, other threads:[~2019-06-27 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-13 23:12 bug#13431: 24.2; UTF-8 causes bad reference position under Emacs Info Joseph Oswald
2019-06-27 11:44 ` Lars Ingebrigtsen
2019-06-27 13:33   ` Eli Zaretskii

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).