unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43231: 27.1; hexl-insert-hex-char on an empty file "hexl-current-address: Point is not on a character in the file".
@ 2020-09-05 19:22 Igor Saprykin
  2020-09-06 14:15 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Igor Saprykin @ 2020-09-05 19:22 UTC (permalink / raw)
  To: 43231

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

hexl-mode doesn't seem to allow me to create a binary file.

Steps:
1. Open Emacs
2. Create a new file using C-x C-f /tmp/boot-sect.bin
3. M-x hexl-mode
4. M-x hexl-insert-hex-char
5. e
6. Nothing is written into the buffer and the message buffer says "Point is
not on a character file".

I took a brief look at the source code and it appears
that (hexl-current-address) expected the cursor to not be in the top left
(0,0) location of the buffer.  Normally in hexl-mode those columns are
going to be occupied by addresses.  Yet, that's exactly where the cursor is
because that's an empty file.

I tried on my two Macs and on a Linux box too.
It works as expected if I do "echo 0 > /tmp/boot-sect.bin" first so that
the file isn't empty.

Cheers,
Igor
-----

In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60
Version 10.14.6 (Build 18G95))
 of 2020-08-11 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.6

Recent messages:
Loading paren...done
[yas] Prepared just-in-time loading of snippets successfully.
Loading server...done
Users/igor/.emacs.d/elpa/justify-kp/justify-kp.el: ‘flet’ is an obsolete
macro (as of 24.3); use either ‘cl-flet’ or ‘cl-letf’. [2 times]
Key Chord mode on
For information about GNU Emacs and the GNU system, type C-h C-a.
Package cl is deprecated
(New file)
hexl-current-address: Point is not on a character in the file

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Hexl

Minor modes in effect:
  ruler-mode: t
  hl-line-mode: t
  hexl-follow-ascii: t
  hexl-follow-ascii-mode: t
  global-emojify-mode: t
  emojify-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  evil-mode: t
  evil-local-mode: t
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  winum-mode: t
  pyvenv-mode: t
  shell-dirtrack-mode: t
  window-number-meta-mode: t
  window-number-mode: t
  global-linum-mode: t
  linum-mode: t
  global-auto-revert-mode: t
  ido-everywhere: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
epg epg-config gnus-util rmail rmail-loaddefs text-property-search
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils ruler-mode hl-line hexl ffap emojify apropos tar-mode
arc-mode archive-mode ht key-chord evil evil-keybindings
evil-integration undo-tree diff evil-maps evil-commands reveal flyspell
ispell evil-jumps evil-command-window evil-types evil-search evil-ex
evil-macros evil-repeat evil-states evil-core evil-common windmove rect
evil-digraphs evil-vars monokai-theme justify-kp dash-functional keyfreq
em-term term disp-table ehelp server winum no-littering flycheck dash
yasnippet highlight-indentation flymake-proc flymake warnings thingatpt
company-capf company help-fns elpy elpy-rpc pcase pyvenv eshell esh-cmd
esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util
elpy-shell rx elpy-profile elpy-django s elpy-refactor derived edmacro
kmacro python tramp-sh tramp tramp-loaddefs trampver tramp-integration
tramp-compat shell parse-time iso8601 ls-lisp grep compile files-x etags
fileloop generator xref project cus-edit wid-edit use-package-ensure
use-package-core exec-path-from-shell finder-inf org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete comint ansi-color ring org-list org-faces
org-entities time-date noutline outline easy-mmode org-version
ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
window-number linum advice el-get el-get-autoloading
el-get-list-packages el-get-dependencies el-get-build el-get-status pp
el-get-methods el-get-fossil el-get-svn el-get-pacman el-get-github-zip
el-get-github-tar el-get-http-zip el-get-http-tar el-get-hg el-get-go
el-get-git-svn el-get-fink el-get-emacswiki el-get-http el-get-notify
el-get-emacsmirror el-get-github el-get-git el-get-elpa el-get-darcs
el-get-cvs el-get-bzr el-get-brew el-get-builtin el-get-apt-get
el-get-recipes el-get-byte-compile el-get-custom cl-extra help-mode
el-get-core autoload radix-tree lisp-mnt cl dired dired-loaddefs
autorevert filenotify ido sanityinc-solarized-light-theme
color-theme-sanityinc-solarized paren time cus-start cus-load info
package easymenu browse-url url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer 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 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
threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 503465 28220)
 (symbols 48 33655 5)
 (strings 32 198733 5278)
 (string-bytes 1 4888032)
 (vectors 16 76343)
 (vector-slots 8 2595040 48026)
 (floats 8 179 51)
 (intervals 56 396 0)
 (buffers 1000 13))

[-- Attachment #2: Type: text/html, Size: 8525 bytes --]

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

end of thread, other threads:[~2020-09-12 15:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-05 19:22 bug#43231: 27.1; hexl-insert-hex-char on an empty file "hexl-current-address: Point is not on a character in the file" Igor Saprykin
2020-09-06 14:15 ` Eli Zaretskii
2020-09-06 14:40   ` Lars Ingebrigtsen
2020-09-06 14:47     ` Eli Zaretskii
2020-09-06 22:10       ` Unknown
2020-09-08 14:03         ` Eli Zaretskii
2020-09-12 15:29           ` Unknown
2020-09-06 17:25   ` Lars Ingebrigtsen
2020-09-06 20:55     ` Igor Saprykin

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