all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
@ 2019-07-10 10:52 Rupert Swarbrick
  2019-07-10 14:52 ` Eli Zaretskii
  2019-07-12 15:14 ` Rupert Swarbrick
  0 siblings, 2 replies; 9+ messages in thread
From: Rupert Swarbrick @ 2019-07-10 10:52 UTC (permalink / raw)
  To: 36573

Hi there,

The bufferpos-to-filepos function assumes that the return value fo
coding-system-eol-type is an integer, testing it with

  (let* ((eol (coding-system-eol-type coding-system))
         (lineno (if (= eol 1) (1- (line-number-at-pos position)) 
         0))
         ...)
    ...)

However, coding-system-eol-type may return a list if the given 
coding
system doesn't specify eol conversion explicitly.

This crops up for me when trying to browse info files:

  Debugger entered--Lisp error: (wrong-type-argument 
  number-or-marker-p [undecided-unix undecided-dos undecided-mac])
    =([undecided-unix undecided-dos undecided-mac] 1)
    (if (= eol 1) (1- (line-number-at-pos position)) 0)
    (let* /* SNIP contents of bufferpos-to-filepos */)
    bufferpos-to-filepos(1202 exact)
    Info-read-subfile(1200)
    Info-find-node-2("/usr/share/info/gawk" "Top" nil nil)
    Info-find-node("gawk" "Top" nil nil)
    Info-goto-node("(gawk)" nil)
    Info-menu("Gawk" nil)
    funcall-interactively(Info-menu "Gawk" nil)
    call-interactively(Info-menu nil nil)
    command-execute(Info-menu)

(I've snipped out the contents of bufferpos-to-filepos from the
backtrace). It seems that the coding system for the info file is
'undecided at this point.

I'm not sure where the bug lies. If bufferpos-to-filepos (and
filepos-to-bufferpos) are supposed to work with an undecided 
coding
system, they need fixing. Manually replacing "(= eol ...)" with 
"(eql
eol ...)" locally in both functions means that I can read the info 
file
again (yippee!) but I'm not sure whether that's a full solution.

Alternatively, I guess the documentation for these functions needs 
to
say that they should only be called when the coding system 
specifies eol
conversion. In this case, the info code also needs fixing (and
presumably various other places).

Auto-collected info below. This is a Debian system with reasonably
standard packages, plus some org-related stuff from elpa.


Rupert


Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --build
 x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man 
 --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --with-x=yes
 --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs-26.1+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS 
NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LC_MONETARY: en_GB.utf8
  value of $LC_NUMERIC: en_GB.utf8
  value of $LC_TIME: en_GB.utf8
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8

Major mode: Info

Minor modes in effect:
  show-paren-mode: t
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  global-ede-mode: t
  savehist-mode: t
  recentf-mode: t
  rcirc-track-minor-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  eyebrowse-mode: t
  pdf-occur-global-minor-mode: t
  pyvenv-mode: t
  global-magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t

Load-path shadows:
/home/rupert/.emacs.d/other-libraries/other-libraries/small/gas-mode 
hides 
/home/rupert/.emacs.d/other-libraries/other-libraries/gas-mode/gas-mode
/home/rupert/.emacs.d/other-libraries/other-libraries/small/smooth-scrolling 
hides 
/home/rupert/.emacs.d/elpa/smooth-scrolling-20161002.1949/smooth-scrolling
/home/rupert/.emacs.d/elpa/color-theme-solarized-20171024.1525/solarized-theme 
hides 
/home/rupert/.emacs.d/elpa/solarized-theme-20190625.1632/solarized-theme
/home/rupert/.emacs.d/other-libraries/spice-mode/spice-mode hides 
/home/rupert/.emacs.d/elpa/spice-mode-20190608.1033/spice-mode
/usr/share/emacs/site-lisp/llvm-6.0/tablegen-mode hides 
/usr/share/emacs/site-lisp/llvm-7/tablegen-mode
/usr/share/emacs/site-lisp/llvm-6.0/llvm-mode hides 
/usr/share/emacs/site-lisp/llvm-7/llvm-mode
/usr/share/emacs/site-lisp/llvm-6.0/emacs hides 
/usr/share/emacs/site-lisp/llvm-7/emacs
/usr/share/emacs/site-lisp/flim/md4 hides 
/usr/share/emacs/26.1/lisp/md4
/usr/share/emacs/site-lisp/flim/hex-util hides 
/usr/share/emacs/26.1/lisp/hex-util
/home/rupert/.emacs.d/other-libraries/libfunctions/underline hides 
/usr/share/emacs/26.1/lisp/textmodes/underline
/src/not-mine/verilog-mode/e/verilog-mode hides 
/usr/share/emacs/26.1/lisp/progmodes/verilog-mode
/home/rupert/.emacs.d/elpa/org-20171009/ox hides 
/usr/share/emacs/26.1/lisp/org/ox
/home/rupert/.emacs.d/elpa/org-20171009/ox-texinfo hides 
/usr/share/emacs/26.1/lisp/org/ox-texinfo
/home/rupert/.emacs.d/elpa/org-20171009/ox-publish hides 
/usr/share/emacs/26.1/lisp/org/ox-publish
/home/rupert/.emacs.d/elpa/org-20171009/ox-org hides 
/usr/share/emacs/26.1/lisp/org/ox-org
/home/rupert/.emacs.d/elpa/org-20171009/ox-odt hides 
/usr/share/emacs/26.1/lisp/org/ox-odt
/home/rupert/.emacs.d/elpa/org-20171009/ox-md hides 
/usr/share/emacs/26.1/lisp/org/ox-md
/home/rupert/.emacs.d/elpa/org-20171009/ox-man hides 
/usr/share/emacs/26.1/lisp/org/ox-man
/home/rupert/.emacs.d/elpa/org-20171009/ox-latex hides 
/usr/share/emacs/26.1/lisp/org/ox-latex
/home/rupert/.emacs.d/elpa/org-20171009/ox-icalendar hides 
/usr/share/emacs/26.1/lisp/org/ox-icalendar
/home/rupert/.emacs.d/elpa/org-20171009/ox-html hides 
/usr/share/emacs/26.1/lisp/org/ox-html
/home/rupert/.emacs.d/elpa/org-20171009/ox-beamer hides 
/usr/share/emacs/26.1/lisp/org/ox-beamer
/home/rupert/.emacs.d/elpa/org-20171009/ox-ascii hides 
/usr/share/emacs/26.1/lisp/org/ox-ascii
/home/rupert/.emacs.d/elpa/org-20171009/org hides 
/usr/share/emacs/26.1/lisp/org/org
/home/rupert/.emacs.d/elpa/org-20171009/org-w3m hides 
/usr/share/emacs/26.1/lisp/org/org-w3m
/home/rupert/.emacs.d/elpa/org-20171009/org-version hides 
/usr/share/emacs/26.1/lisp/org/org-version
/home/rupert/.emacs.d/elpa/org-20171009/org-timer hides 
/usr/share/emacs/26.1/lisp/org/org-timer
/home/rupert/.emacs.d/elpa/org-20171009/org-table hides 
/usr/share/emacs/26.1/lisp/org/org-table
/home/rupert/.emacs.d/elpa/org-20171009/org-src hides 
/usr/share/emacs/26.1/lisp/org/org-src
/home/rupert/.emacs.d/elpa/org-20171009/org-rmail hides 
/usr/share/emacs/26.1/lisp/org/org-rmail
/home/rupert/.emacs.d/elpa/org-20171009/org-protocol hides 
/usr/share/emacs/26.1/lisp/org/org-protocol
/home/rupert/.emacs.d/elpa/org-20171009/org-plot hides 
/usr/share/emacs/26.1/lisp/org/org-plot
/home/rupert/.emacs.d/elpa/org-20171009/org-pcomplete hides 
/usr/share/emacs/26.1/lisp/org/org-pcomplete
/home/rupert/.emacs.d/elpa/org-20171009/org-mouse hides 
/usr/share/emacs/26.1/lisp/org/org-mouse
/home/rupert/.emacs.d/elpa/org-20171009/org-mobile hides 
/usr/share/emacs/26.1/lisp/org/org-mobile
/home/rupert/.emacs.d/elpa/org-20171009/org-mhe hides 
/usr/share/emacs/26.1/lisp/org/org-mhe
/home/rupert/.emacs.d/elpa/org-20171009/org-macs hides 
/usr/share/emacs/26.1/lisp/org/org-macs
/home/rupert/.emacs.d/elpa/org-20171009/org-macro hides 
/usr/share/emacs/26.1/lisp/org/org-macro
/home/rupert/.emacs.d/elpa/org-20171009/org-loaddefs hides 
/usr/share/emacs/26.1/lisp/org/org-loaddefs
/home/rupert/.emacs.d/elpa/org-20171009/org-list hides 
/usr/share/emacs/26.1/lisp/org/org-list
/home/rupert/.emacs.d/elpa/org-20171009/org-lint hides 
/usr/share/emacs/26.1/lisp/org/org-lint
/home/rupert/.emacs.d/elpa/org-20171009/org-irc hides 
/usr/share/emacs/26.1/lisp/org/org-irc
/home/rupert/.emacs.d/elpa/org-20171009/org-install hides 
/usr/share/emacs/26.1/lisp/org/org-install
/home/rupert/.emacs.d/elpa/org-20171009/org-inlinetask hides 
/usr/share/emacs/26.1/lisp/org/org-inlinetask
/home/rupert/.emacs.d/elpa/org-20171009/org-info hides 
/usr/share/emacs/26.1/lisp/org/org-info
/home/rupert/.emacs.d/elpa/org-20171009/org-indent hides 
/usr/share/emacs/26.1/lisp/org/org-indent
/home/rupert/.emacs.d/elpa/org-20171009/org-id hides 
/usr/share/emacs/26.1/lisp/org/org-id
/home/rupert/.emacs.d/elpa/org-20171009/org-habit hides 
/usr/share/emacs/26.1/lisp/org/org-habit
/home/rupert/.emacs.d/elpa/org-20171009/org-gnus hides 
/usr/share/emacs/26.1/lisp/org/org-gnus
/home/rupert/.emacs.d/elpa/org-20171009/org-footnote hides 
/usr/share/emacs/26.1/lisp/org/org-footnote
/home/rupert/.emacs.d/elpa/org-20171009/org-feed hides 
/usr/share/emacs/26.1/lisp/org/org-feed
/home/rupert/.emacs.d/elpa/org-20171009/org-faces hides 
/usr/share/emacs/26.1/lisp/org/org-faces
/home/rupert/.emacs.d/elpa/org-20171009/org-eww hides 
/usr/share/emacs/26.1/lisp/org/org-eww
/home/rupert/.emacs.d/elpa/org-20171009/org-eshell hides 
/usr/share/emacs/26.1/lisp/org/org-eshell
/home/rupert/.emacs.d/elpa/org-20171009/org-entities hides 
/usr/share/emacs/26.1/lisp/org/org-entities
/home/rupert/.emacs.d/elpa/org-20171009/org-element hides 
/usr/share/emacs/26.1/lisp/org/org-element
/home/rupert/.emacs.d/elpa/org-20171009/org-duration hides 
/usr/share/emacs/26.1/lisp/org/org-duration
/home/rupert/.emacs.d/elpa/org-20171009/org-docview hides 
/usr/share/emacs/26.1/lisp/org/org-docview
/home/rupert/.emacs.d/elpa/org-20171009/org-datetree hides 
/usr/share/emacs/26.1/lisp/org/org-datetree
/home/rupert/.emacs.d/elpa/org-20171009/org-ctags hides 
/usr/share/emacs/26.1/lisp/org/org-ctags
/home/rupert/.emacs.d/elpa/org-20171009/org-crypt hides 
/usr/share/emacs/26.1/lisp/org/org-crypt
/home/rupert/.emacs.d/elpa/org-20171009/org-compat hides 
/usr/share/emacs/26.1/lisp/org/org-compat
/home/rupert/.emacs.d/elpa/org-20171009/org-colview hides 
/usr/share/emacs/26.1/lisp/org/org-colview
/home/rupert/.emacs.d/elpa/org-20171009/org-clock hides 
/usr/share/emacs/26.1/lisp/org/org-clock
/home/rupert/.emacs.d/elpa/org-20171009/org-capture hides 
/usr/share/emacs/26.1/lisp/org/org-capture
/home/rupert/.emacs.d/elpa/org-20171009/org-bibtex hides 
/usr/share/emacs/26.1/lisp/org/org-bibtex
/home/rupert/.emacs.d/elpa/org-20171009/org-bbdb hides 
/usr/share/emacs/26.1/lisp/org/org-bbdb
/home/rupert/.emacs.d/elpa/org-20171009/org-attach hides 
/usr/share/emacs/26.1/lisp/org/org-attach
/home/rupert/.emacs.d/elpa/org-20171009/org-archive hides 
/usr/share/emacs/26.1/lisp/org/org-archive
/home/rupert/.emacs.d/elpa/org-20171009/org-agenda hides 
/usr/share/emacs/26.1/lisp/org/org-agenda
/home/rupert/.emacs.d/elpa/org-20171009/ob hides 
/usr/share/emacs/26.1/lisp/org/ob
/home/rupert/.emacs.d/elpa/org-20171009/ob-vala hides 
/usr/share/emacs/26.1/lisp/org/ob-vala
/home/rupert/.emacs.d/elpa/org-20171009/ob-tangle hides 
/usr/share/emacs/26.1/lisp/org/ob-tangle
/home/rupert/.emacs.d/elpa/org-20171009/ob-table hides 
/usr/share/emacs/26.1/lisp/org/ob-table
/home/rupert/.emacs.d/elpa/org-20171009/ob-stan hides 
/usr/share/emacs/26.1/lisp/org/ob-stan
/home/rupert/.emacs.d/elpa/org-20171009/ob-sqlite hides 
/usr/share/emacs/26.1/lisp/org/ob-sqlite
/home/rupert/.emacs.d/elpa/org-20171009/ob-sql hides 
/usr/share/emacs/26.1/lisp/org/ob-sql
/home/rupert/.emacs.d/elpa/org-20171009/ob-shen hides 
/usr/share/emacs/26.1/lisp/org/ob-shen
/home/rupert/.emacs.d/elpa/org-20171009/ob-shell hides 
/usr/share/emacs/26.1/lisp/org/ob-shell
/home/rupert/.emacs.d/elpa/org-20171009/ob-sed hides 
/usr/share/emacs/26.1/lisp/org/ob-sed
/home/rupert/.emacs.d/elpa/org-20171009/ob-screen hides 
/usr/share/emacs/26.1/lisp/org/ob-screen
/home/rupert/.emacs.d/elpa/org-20171009/ob-scheme hides 
/usr/share/emacs/26.1/lisp/org/ob-scheme
/home/rupert/.emacs.d/elpa/org-20171009/ob-sass hides 
/usr/share/emacs/26.1/lisp/org/ob-sass
/home/rupert/.emacs.d/elpa/org-20171009/ob-ruby hides 
/usr/share/emacs/26.1/lisp/org/ob-ruby
/home/rupert/.emacs.d/elpa/org-20171009/ob-ref hides 
/usr/share/emacs/26.1/lisp/org/ob-ref
/home/rupert/.emacs.d/elpa/org-20171009/ob-python hides 
/usr/share/emacs/26.1/lisp/org/ob-python
/home/rupert/.emacs.d/elpa/org-20171009/ob-processing hides 
/usr/share/emacs/26.1/lisp/org/ob-processing
/home/rupert/.emacs.d/elpa/org-20171009/ob-plantuml hides 
/usr/share/emacs/26.1/lisp/org/ob-plantuml
/home/rupert/.emacs.d/elpa/org-20171009/ob-picolisp hides 
/usr/share/emacs/26.1/lisp/org/ob-picolisp
/home/rupert/.emacs.d/elpa/org-20171009/ob-perl hides 
/usr/share/emacs/26.1/lisp/org/ob-perl
/home/rupert/.emacs.d/elpa/org-20171009/ob-org hides 
/usr/share/emacs/26.1/lisp/org/ob-org
/home/rupert/.emacs.d/elpa/org-20171009/ob-octave hides 
/usr/share/emacs/26.1/lisp/org/ob-octave
/home/rupert/.emacs.d/elpa/org-20171009/ob-ocaml hides 
/usr/share/emacs/26.1/lisp/org/ob-ocaml
/home/rupert/.emacs.d/elpa/org-20171009/ob-mscgen hides 
/usr/share/emacs/26.1/lisp/org/ob-mscgen
/home/rupert/.emacs.d/elpa/org-20171009/ob-maxima hides 
/usr/share/emacs/26.1/lisp/org/ob-maxima
/home/rupert/.emacs.d/elpa/org-20171009/ob-matlab hides 
/usr/share/emacs/26.1/lisp/org/ob-matlab
/home/rupert/.emacs.d/elpa/org-20171009/ob-makefile hides 
/usr/share/emacs/26.1/lisp/org/ob-makefile
/home/rupert/.emacs.d/elpa/org-20171009/ob-lua hides 
/usr/share/emacs/26.1/lisp/org/ob-lua
/home/rupert/.emacs.d/elpa/org-20171009/ob-lob hides 
/usr/share/emacs/26.1/lisp/org/ob-lob
/home/rupert/.emacs.d/elpa/org-20171009/ob-lisp hides 
/usr/share/emacs/26.1/lisp/org/ob-lisp
/home/rupert/.emacs.d/elpa/org-20171009/ob-lilypond hides 
/usr/share/emacs/26.1/lisp/org/ob-lilypond
/home/rupert/.emacs.d/elpa/org-20171009/ob-ledger hides 
/usr/share/emacs/26.1/lisp/org/ob-ledger
/home/rupert/.emacs.d/elpa/org-20171009/ob-latex hides 
/usr/share/emacs/26.1/lisp/org/ob-latex
/home/rupert/.emacs.d/elpa/org-20171009/ob-keys hides 
/usr/share/emacs/26.1/lisp/org/ob-keys
/home/rupert/.emacs.d/elpa/org-20171009/ob-js hides 
/usr/share/emacs/26.1/lisp/org/ob-js
/home/rupert/.emacs.d/elpa/org-20171009/ob-java hides 
/usr/share/emacs/26.1/lisp/org/ob-java
/home/rupert/.emacs.d/elpa/org-20171009/ob-io hides 
/usr/share/emacs/26.1/lisp/org/ob-io
/home/rupert/.emacs.d/elpa/org-20171009/ob-hledger hides 
/usr/share/emacs/26.1/lisp/org/ob-hledger
/home/rupert/.emacs.d/elpa/org-20171009/ob-haskell hides 
/usr/share/emacs/26.1/lisp/org/ob-haskell
/home/rupert/.emacs.d/elpa/org-20171009/ob-groovy hides 
/usr/share/emacs/26.1/lisp/org/ob-groovy
/home/rupert/.emacs.d/elpa/org-20171009/ob-gnuplot hides 
/usr/share/emacs/26.1/lisp/org/ob-gnuplot
/home/rupert/.emacs.d/elpa/org-20171009/ob-fortran hides 
/usr/share/emacs/26.1/lisp/org/ob-fortran
/home/rupert/.emacs.d/elpa/org-20171009/ob-forth hides 
/usr/share/emacs/26.1/lisp/org/ob-forth
/home/rupert/.emacs.d/elpa/org-20171009/ob-exp hides 
/usr/share/emacs/26.1/lisp/org/ob-exp
/home/rupert/.emacs.d/elpa/org-20171009/ob-eval hides 
/usr/share/emacs/26.1/lisp/org/ob-eval
/home/rupert/.emacs.d/elpa/org-20171009/ob-emacs-lisp hides 
/usr/share/emacs/26.1/lisp/org/ob-emacs-lisp
/home/rupert/.emacs.d/elpa/org-20171009/ob-ebnf hides 
/usr/share/emacs/26.1/lisp/org/ob-ebnf
/home/rupert/.emacs.d/elpa/org-20171009/ob-dot hides 
/usr/share/emacs/26.1/lisp/org/ob-dot
/home/rupert/.emacs.d/elpa/org-20171009/ob-ditaa hides 
/usr/share/emacs/26.1/lisp/org/ob-ditaa
/home/rupert/.emacs.d/elpa/org-20171009/ob-css hides 
/usr/share/emacs/26.1/lisp/org/ob-css
/home/rupert/.emacs.d/elpa/org-20171009/ob-core hides 
/usr/share/emacs/26.1/lisp/org/ob-core
/home/rupert/.emacs.d/elpa/org-20171009/ob-coq hides 
/usr/share/emacs/26.1/lisp/org/ob-coq
/home/rupert/.emacs.d/elpa/org-20171009/ob-comint hides 
/usr/share/emacs/26.1/lisp/org/ob-comint
/home/rupert/.emacs.d/elpa/org-20171009/ob-clojure hides 
/usr/share/emacs/26.1/lisp/org/ob-clojure
/home/rupert/.emacs.d/elpa/org-20171009/ob-calc hides 
/usr/share/emacs/26.1/lisp/org/ob-calc
/home/rupert/.emacs.d/elpa/org-20171009/ob-awk hides 
/usr/share/emacs/26.1/lisp/org/ob-awk
/home/rupert/.emacs.d/elpa/org-20171009/ob-asymptote hides 
/usr/share/emacs/26.1/lisp/org/ob-asymptote
/home/rupert/.emacs.d/elpa/org-20171009/ob-abc hides 
/usr/share/emacs/26.1/lisp/org/ob-abc
/home/rupert/.emacs.d/elpa/org-20171009/ob-R hides 
/usr/share/emacs/26.1/lisp/org/ob-R
/home/rupert/.emacs.d/elpa/org-20171009/ob-J hides 
/usr/share/emacs/26.1/lisp/org/ob-J
/home/rupert/.emacs.d/elpa/org-20171009/ob-C hides 
/usr/share/emacs/26.1/lisp/org/ob-C
/usr/share/emacs/site-lisp/flim/sasl hides 
/usr/share/emacs/26.1/lisp/net/sasl
/usr/share/emacs/site-lisp/flim/sasl-ntlm hides 
/usr/share/emacs/26.1/lisp/net/sasl-ntlm
/usr/share/emacs/site-lisp/flim/sasl-digest hides 
/usr/share/emacs/26.1/lisp/net/sasl-digest
/usr/share/emacs/site-lisp/flim/sasl-cram hides 
/usr/share/emacs/26.1/lisp/net/sasl-cram
/usr/share/emacs/site-lisp/flim/ntlm hides 
/usr/share/emacs/26.1/lisp/net/ntlm
/usr/share/emacs/site-lisp/flim/hmac-md5 hides 
/usr/share/emacs/26.1/lisp/net/hmac-md5
/usr/share/emacs/site-lisp/flim/hmac-def hides 
/usr/share/emacs/26.1/lisp/net/hmac-def

Features:
(shadow sort mail-extr emacsbug helm-external helm-net xml url 
url-proxy
url-privacy url-expand url-methods url-history url-cookie 
url-domsuf
url-util mailcap cl-print debug winner helm-command helm-elisp 
helm-eval
edebug helm-info helm-mode helm-files helm-buffers helm-occur 
helm-tags
helm-locate helm-grep helm-regexp helm-utils helm-types helm-help 
helm
helm-source eieio-compat helm-multi-match helm-lib misearch
multi-isearch highlight-parentheses redshank skeleton paren
elisp-slime-nav mu4e desktop frameset mu4e-speedbar mu4e-main 
mu4e-view
mu4e-headers mu4e-compose mu4e-context mu4e-draft mu4e-actions
org-capture rfc2368 smtpmail sendmail mu4e-mark mu4e-message 
flow-fill
html2text mu4e-proc mu4e-utils doc-view mu4e-lists mu4e-vars 
org-element
avl-tree generator ob-dot ob-maxima org org-macro org-footnote
org-pcomplete org-list org-faces org-entities org-version 
ob-emacs-lisp
ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp 
ob-comint
ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar
cal-loaddefs hl-line mu4e-meta keyfreq shebang smooth-scrolling 
pg-vars
ede/speedbar ede/files ede ede/detect ede/base ede/auto ede/source
eieio-base eieio-speedbar speedbar sb-image ezimage dframe 
eieio-custom
cc-styles cc-align cc-engine cc-vars cc-defs slime-fancy
slime-trace-dialog slime-fontifying-fu slime-package-fu 
slime-references
slime-compiler-notes-tree slime-scratch slime-presentations bridge
slime-macrostep macrostep slime-mdot-fu slime-enclosing-context
slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-repl slime-parse slime
arc-mode archive-mode hyperspec browse-url dired-x info-look
solarized-light-theme solarized savehist recentf tree-widget rcirc
undo-tree diff cl company-irony company-template irony-completion
irony-snippet irony irony-iotask proof-general eyebrowse 
haskell-mode
haskell-cabal haskell-utils haskell-font-lock haskell-indentation
haskell-string haskell-sort-imports haskell-lexeme rx
haskell-align-imports haskell-compat haskell-complete-module
haskell-ghc-support noutline outline dabbrev haskell-customize 
pdf-occur
ibuf-ext ibuffer ibuffer-loaddefs tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag 
semantic/lex
semantic/fw mode-local find-func cedet pdf-isearch let-alist 
pdf-misc
pdf-tools pdf-view magit-bookmark bookmark pp jka-compr pdf-cache
pdf-info tq pdf-util image-mode yasnippet elec-pair
highlight-indentation flymake-proc flymake warnings company-capf 
company
pcase help-fns radix-tree elpy find-file-in-project ivy flx delsel 
colir
color ivy-overlay ffap thingatpt windmove elpy-shell pyvenv 
esh-var
esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell
esh-module esh-mode esh-util elpy-profile elpy-django s 
elpy-refactor
python tramp-sh tramp tramp-compat tramp-loaddefs trampver 
ucs-normalize
parse-time json map ido grep compile files-x etags xref project 
cus-edit
cus-start cus-load wid-edit paredit edmacro kmacro magit-submodule
magit-obsolete magit-popup magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone 
magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs 
magit-status
magit magit-repos magit-apply magit-wip magit-log which-func imenu
magit-diff smerge-mode diff-mode magit-core magit-autorevert 
autorevert
filenotify magit-margin magit-transient magit-process magit-mode
transient git-commit magit-git magit-section magit-utils crm 
log-edit
message rmc puny dired dired-loaddefs format-spec rfc822 mml 
mml-sec epa
epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr
mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log 
with-editor
async-bytecomp advice async shell pcomplete comint ansi-color ring
server dash cl-extra help-mode use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key 
bind-key
easy-mmode use-package-core derived subr-x finder-inf tex-site
highline-autoloads proof-site proof-autoloads slime-autoloads info
package easymenu epg-config url-handlers url-parse auth-source 
cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars 
seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib 
w3m-load
devhelp time-date mule-util tooltip eldoc electric uniquify 
ediff-hook
vc-hooks lisp-float-type 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 elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse 
jit-lock
font-lock syntax facemenu font-core term/tty-colors frame 
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 charscript 
charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray 
minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify 
lcms2
dynamic-setting system-font-setting font-render-setting 
move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 748565 52312)
 (symbols 48 62892 7)
 (miscs 40 270 398)
 (strings 32 192397 6437)
 (string-bytes 1 5948028)
 (vectors 16 92954)
 (vector-slots 8 1758995 68914)
 (floats 8 521 411)
 (intervals 56 3844 3512)
 (buffers 992 21))





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

* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
  2019-07-10 10:52 bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer Rupert Swarbrick
@ 2019-07-10 14:52 ` Eli Zaretskii
  2019-07-12 15:14 ` Rupert Swarbrick
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2019-07-10 14:52 UTC (permalink / raw)
  To: Rupert Swarbrick; +Cc: 36573

> From: Rupert Swarbrick <rswarbrick@gmail.com>
> Date: Wed, 10 Jul 2019 11:52:24 +0100
> 
> The bufferpos-to-filepos function assumes that the return value fo
> coding-system-eol-type is an integer, testing it with
> 
>   (let* ((eol (coding-system-eol-type coding-system))
>          (lineno (if (= eol 1) (1- (line-number-at-pos position)) 
>          0))
>          ...)
>     ...)
> 
> However, coding-system-eol-type may return a list if the given 
> coding system doesn't specify eol conversion explicitly.

That shouldn't happen for a buffer that visits a file, in general.

> This crops up for me when trying to browse info files:
> 
>   Debugger entered--Lisp error: (wrong-type-argument 
>   number-or-marker-p [undecided-unix undecided-dos undecided-mac])
>     =([undecided-unix undecided-dos undecided-mac] 1)
>     (if (= eol 1) (1- (line-number-at-pos position)) 0)
>     (let* /* SNIP contents of bufferpos-to-filepos */)
>     bufferpos-to-filepos(1202 exact)
>     Info-read-subfile(1200)
>     Info-find-node-2("/usr/share/info/gawk" "Top" nil nil)
>     Info-find-node("gawk" "Top" nil nil)
>     Info-goto-node("(gawk)" nil)
>     Info-menu("Gawk" nil)
>     funcall-interactively(Info-menu "Gawk" nil)
>     call-interactively(Info-menu nil nil)
>     command-execute(Info-menu)

Please show the entire recipe for reproducing this, starting from
"emacs -Q".  Info files should generally have the -unix EOL type;
that's what I see here.  So I wonder how did we get into this
situation.

> (I've snipped out the contents of bufferpos-to-filepos from the
> backtrace). It seems that the coding system for the info file is
> 'undecided at this point.

On my system, "C-u C-h i /path/to/gawk.info RET" yields a buffer whose
buffer-file-coding-system is undecided-unix, as I'd expect.  This
happens both on GNU/Linux and on MS-Windows.  So I wonder how you get
something different.  One can get undecided with empty buffers, or
buffers that don't have a single newline, but this is not that case.

> I'm not sure where the bug lies. If bufferpos-to-filepos (and
> filepos-to-bufferpos) are supposed to work with an undecided 
> coding system, they need fixing.

This function cannot possibly work with an encoding that has no
definite EOL type, because obviously the conversion of buffer
positions to file offsets depends on that.

> Manually replacing "(= eol ...)" with "(eql eol ...)" locally in
> both functions means that I can read the info file again (yippee!)
> but I'm not sure whether that's a full solution.

It could be, but we should first understand how did that happen,
because there might be deeper problems hiding here.

> Alternatively, I guess the documentation for these functions needs
> to say that they should only be called when the coding system
> specifies eol conversion.

That should be done regardless, I think.  But since this function was
written specifically for Info files, it must work there (and did,
AFAIK, since the day it was written till now).





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

* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
  2019-07-10 10:52 bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer Rupert Swarbrick
  2019-07-10 14:52 ` Eli Zaretskii
@ 2019-07-12 15:14 ` Rupert Swarbrick
  2019-07-12 18:17   ` Eli Zaretskii
  2021-08-11 18:42   ` Lars Ingebrigtsen
  1 sibling, 2 replies; 9+ messages in thread
From: Rupert Swarbrick @ 2019-07-12 15:14 UTC (permalink / raw)
  To: 36573

Thank you for the reply. I've now found the "culprit" (bisecting 
my init.el starting with emacs -Q). The dubious setting was:

  '(file-coding-system-alist
     (quote
      (("\\.dz\\'" no-conversion . no-conversion)
       ("\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
       no-conversion)
       ("\\.tgz\\'" no-conversion . no-conversion)
       ("\\.tbz\\'" no-conversion . no-conversion)
       ("\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
       no-conversion)
       ("\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
       no-conversion)
       ("\\.elc\\'" emacs-mule . emacs-mule)
       ("\\.utf\\(-8\\)?\\'" . utf-8)
       ("\\(\\`\\|/\\)loaddefs.el\\'" raw-text . raw-text-unix)
       ("\\.tar\\'" no-conversion . no-conversion)
       ("\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system)
       ("\\.lisp\\'" . utf-8-unix))))

I can't remember why I had this setting, rather than the default 
value, but clearing it out means I can read the info manual again.

I think it probably still makes sense to add a note to the manual 
for bufferpos-to-filepos and filepos-to-bufferpos to point out 
that they don't work if the line ending convention is unknown.

For bonus points, maybe it makes sense to add something to fail 
earlier (and more understandably!) in the info reading code. I'm 
not sure exactly where that would be, though.


Rupert





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

* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
  2019-07-12 15:14 ` Rupert Swarbrick
@ 2019-07-12 18:17   ` Eli Zaretskii
  2021-08-11 18:42   ` Lars Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2019-07-12 18:17 UTC (permalink / raw)
  To: Rupert Swarbrick; +Cc: 36573

> From: Rupert Swarbrick <rswarbrick@gmail.com>
> Date: Fri, 12 Jul 2019 16:14:33 +0100
> 
> Thank you for the reply. I've now found the "culprit" (bisecting 
> my init.el starting with emacs -Q). The dubious setting was:
> 
>   '(file-coding-system-alist
>      (quote
>       (("\\.dz\\'" no-conversion . no-conversion)
>        ("\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
>        no-conversion)
>        ("\\.tgz\\'" no-conversion . no-conversion)
>        ("\\.tbz\\'" no-conversion . no-conversion)
>        ("\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
>        no-conversion)
>        ("\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" no-conversion . 
>        no-conversion)
>        ("\\.elc\\'" emacs-mule . emacs-mule)
>        ("\\.utf\\(-8\\)?\\'" . utf-8)
>        ("\\(\\`\\|/\\)loaddefs.el\\'" raw-text . raw-text-unix)
>        ("\\.tar\\'" no-conversion . no-conversion)
>        ("\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system)
>        ("\\.lisp\\'" . utf-8-unix))))

Was the Info file compressed, i.e. did it have one of extensions that
caused no-conversion to be used?

> I think it probably still makes sense to add a note to the manual 
> for bufferpos-to-filepos and filepos-to-bufferpos to point out 
> that they don't work if the line ending convention is unknown.
> 
> For bonus points, maybe it makes sense to add something to fail 
> earlier (and more understandably!) in the info reading code. I'm 
> not sure exactly where that would be, though.

Yes, something should be done there, thanks.





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

* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
  2019-07-12 15:14 ` Rupert Swarbrick
  2019-07-12 18:17   ` Eli Zaretskii
@ 2021-08-11 18:42   ` Lars Ingebrigtsen
  2021-08-12  8:21     ` Eli Zaretskii
  1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-11 18:42 UTC (permalink / raw)
  To: Rupert Swarbrick; +Cc: 36573

Rupert Swarbrick <rswarbrick@gmail.com> writes:

> Thank you for the reply. I've now found the "culprit" (bisecting my
> init.el starting with emacs -Q). The dubious setting was:
>
>  '(file-coding-system-alist
>     (quote
>      (("\\.dz\\'" no-conversion . no-conversion)

(etc)

Even with this setting, I'm not able to reproduce the problem.  It would
be helpful with a recipe, starting from "emacs -Q", to verify that we're
fixing this in the correct way.

> I think it probably still makes sense to add a note to the manual for
> bufferpos-to-filepos and filepos-to-bufferpos to point out that they
> don't work if the line ending convention is unknown.

Well, manual does say that the coding system has to be known (which
implies that the line ending convention should also be known)...

> For bonus points, maybe it makes sense to add something to fail
> earlier (and more understandably!) in the info reading code. I'm not
> sure exactly where that would be, though.

I think those functions probably shouldn't signal an error in this
situation if asked to do an approximate calculation (but just guess at a
one-byte ending), perhaps.  But give a better error message when asked
to do an exact calculation.

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





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

* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
  2021-08-11 18:42   ` Lars Ingebrigtsen
@ 2021-08-12  8:21     ` Eli Zaretskii
  2021-08-12 12:54       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-08-12  8:21 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 36573, rswarbrick

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 11 Aug 2021 20:42:08 +0200
> Cc: 36573@debbugs.gnu.org
> 
> > I think it probably still makes sense to add a note to the manual for
> > bufferpos-to-filepos and filepos-to-bufferpos to point out that they
> > don't work if the line ending convention is unknown.
> 
> Well, manual does say that the coding system has to be known (which
> implies that the line ending convention should also be known)...
> 
> > For bonus points, maybe it makes sense to add something to fail
> > earlier (and more understandably!) in the info reading code. I'm not
> > sure exactly where that would be, though.
> 
> I think those functions probably shouldn't signal an error in this
> situation if asked to do an approximate calculation (but just guess at a
> one-byte ending), perhaps.  But give a better error message when asked
> to do an exact calculation.

I think, since these cases are very rare, it should be okay to assume
the -unix EOL type when this happens, and document that if this is the
case, the result could be an approximation even if the exact result
was requested.





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

* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
  2021-08-12  8:21     ` Eli Zaretskii
@ 2021-08-12 12:54       ` Lars Ingebrigtsen
  2021-08-12 13:08         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-12 12:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 36573, rswarbrick

Eli Zaretskii <eliz@gnu.org> writes:

> I think, since these cases are very rare, it should be okay to assume
> the -unix EOL type when this happens, and document that if this is the
> case, the result could be an approximation even if the exact result
> was requested.

It is a rare odd corner case, but I think erroring out is a better
solution here than having to document this.  :-)  `exact' meaning
"exact" is easier conceptually.

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





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

* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
  2021-08-12 12:54       ` Lars Ingebrigtsen
@ 2021-08-12 13:08         ` Eli Zaretskii
  2021-08-13 11:07           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-08-12 13:08 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 36573, rswarbrick

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: rswarbrick@gmail.com,  36573@debbugs.gnu.org
> Date: Thu, 12 Aug 2021 14:54:51 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I think, since these cases are very rare, it should be okay to assume
> > the -unix EOL type when this happens, and document that if this is the
> > case, the result could be an approximation even if the exact result
> > was requested.
> 
> It is a rare odd corner case, but I think erroring out is a better
> solution here than having to document this.  :-)  `exact' meaning
> "exact" is easier conceptually.

Fine with me, but I think we will still need to say in the doc string
something like

  It is an error to request the `exact' method when the buffer's EOL
  format is not yet decided.





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

* bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer
  2021-08-12 13:08         ` Eli Zaretskii
@ 2021-08-13 11:07           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-13 11:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 36573, rswarbrick

Eli Zaretskii <eliz@gnu.org> writes:

> Fine with me, but I think we will still need to say in the doc string
> something like
>
>   It is an error to request the `exact' method when the buffer's EOL
>   format is not yet decided.

Done now, and I've added a bunch of tests for these functions.

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





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

end of thread, other threads:[~2021-08-13 11:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-10 10:52 bug#36573: 26.1; bufferpos-to-filepos assumes coding-system-eol-type gives integer Rupert Swarbrick
2019-07-10 14:52 ` Eli Zaretskii
2019-07-12 15:14 ` Rupert Swarbrick
2019-07-12 18:17   ` Eli Zaretskii
2021-08-11 18:42   ` Lars Ingebrigtsen
2021-08-12  8:21     ` Eli Zaretskii
2021-08-12 12:54       ` Lars Ingebrigtsen
2021-08-12 13:08         ` Eli Zaretskii
2021-08-13 11:07           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.