emacs - Copying sections in hexl-mode -
when using hexl-mode
in emacs view binary file, there way of copying , pasting section file?
i have tried standard c-spc
, select region, m-w
but pasting new file treats whole thing normal text, i.e. text file looks lots of these:
000159a0: 6e00 1295 00e0 3400 0a51 0942 0701 1295 n.....4..q.b....
i.e. making literal copy of text, not copying binary data representing
what want copy section, paste new file such binary representation of section
in other words want able generate new binary files parts of original binary file using hexl-mode viewing original binary file
hope makes sense..
that sounds cool feature, unforuntately hexl-mode
doesn't that. next best thing can clip file head
, tail
, example yank file.txt
000002a0 00000340, you'd run
head file.txt -c $((0x00000340)) | tail -c +$((0x000002a0)) | xclip -sel c
Comments
Post a Comment