I submitted a similar bug report for Emacs 25.2, but I was asked to try a later version by Eli Zaretskii. So I installed Emacs 26.1. I have the same problem. Please see this screenshot I took to show how I trigger the bug (video on Box): https://cornell.box.com/s/miozugx3v3cb47x8d40vc2tzc5gwnrb6 Thanks, Sagar In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-05-29 built on lcy01-amd64-029 Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04.1 LTS Recent messages: Applying style hooks...done Applying style hooks...done Type C-c C-c or C-c C-x to view the image as text or hex. Applying style hooks...done Applying style hooks...done Applying style hooks...done Wrote /home/sagar/.emacs.desktop.lock Desktop: 1 frame, 242 buffers restored, 10 failed to restore. For information about GNU Emacs and the GNU system, type C-h C-a. GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-05-29 Configured using: 'configure --build=x86_64-linux-gnu --prefix=/usr '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib --program-suffix=26 --with-modules --with-file-notification=inotify --with-mailutils --with-x=yes --with-x-toolkit=gtk3 --with-xwidgets --with-lcms2 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs26-pCvJBp/emacs26-26.1~1.git07f8f9b=. -fstack-protector-strong -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -no-pie'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS XWIDGETS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: TeX-PDF-mode: t shell-dirtrack-mode: t diff-auto-refine-mode: t global-aggressive-indent-mode: t aggressive-indent-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-strict-mode: t smartparens-mode: t window-number-mode: t pdf-occur-global-minor-mode: t desktop-save-mode: t winner-mode: t cl-old-struct-compat-mode: t show-paren-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 line-number-mode: t visual-line-mode: t transient-mark-mode: t Load-path shadows: /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-site hides /usr/share/emacs/site-lisp/tex-site /home/sagar/.emacs.d/elpa/auctex-12.1.1/auctex hides /usr/share/emacs/site-lisp/auctex /home/sagar/.emacs.d/elpa/auctex-12.1.1/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp /home/sagar/.emacs.d/elpa/auctex-12.1.1/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info /home/sagar/.emacs.d/elpa/auctex-12.1.1/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs /home/sagar/.emacs.d/elpa/auctex-12.1.1/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex /home/sagar/.emacs.d/elpa/auctex-12.1.1/latex hides /usr/share/emacs/site-lisp/auctex/latex /home/sagar/.emacs.d/elpa/auctex-12.1.1/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar /home/sagar/.emacs.d/elpa/auctex-12.1.1/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex hides /usr/share/emacs/site-lisp/auctex/tex /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik /home/sagar/.emacs.d/elpa/auctex-12.1.1/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp /home/sagar/.emacs.d/elpa/auctex-12.1.1/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite /home/sagar/.emacs.d/elpa/auctex-12.1.1/context-en hides /usr/share/emacs/site-lisp/auctex/context-en /home/sagar/.emacs.d/elpa/auctex-12.1.1/context hides /usr/share/emacs/site-lisp/auctex/context /home/sagar/.emacs.d/elpa/auctex-12.1.1/tex-ispell hides /usr/share/emacs/site-lisp/auctex/tex-ispell /home/sagar/.emacs.d/elpa/auctex-12.1.1/preview hides /usr/share/emacs/site-lisp/auctex/preview /home/sagar/.emacs.d/elpa/clang-format-20180406.1514/clang-format hides /usr/share/emacs/site-lisp/clang-format-6.0/clang-format /usr/share/emacs/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/26.1/lisp/textmodes/flyspell /usr/share/emacs/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/26.1/lisp/textmodes/ispell /usr/share/emacs/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/26.1/lisp/language/thai-word Features: (shadow sort mail-extr emacsbug sendmail make-mode sh-script executable mhtml-mode smartparens-javascript js-mode-expansions js json map flyspell ispell css-mode-expansions css-mode smie color eww mm-url url-queue url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap shr svg browse-url smartparens-html html-mode-expansions sgml-mode dom org-indent org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr org-docview org-bibtex bibtex org-bbdb org-w3m conf-mode latexenc preview prv-emacs tex-buf font-latex latex-mode-expansions latex latex-flymake flymake-proc flymake warnings tex-ispell tex-style tex dbus crm smartparens-latex tex-mode shell doc-view pdf-sync pdf-annot pdf-outline pdf-links org-element avl-tree generator smartparens-org the-org-mode-expansions org org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities noutline outline 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 pdf-history smerge-mode autorevert filenotify vc-git diff-mode cc-mode-expansions cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs elec-pair aggressive-indent easy-mmode iy-go-to-char ace-jump-mode clang-format xml smartparens-config smartparens-text smartparens dash cl-extra help-mode use-package-ensure use-package-core multi-run window-layout browse-kill-ring derived window-number 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 dired dired-loaddefs pdf-isearch let-alist pdf-misc imenu pdf-tools compile comint ansi-color cus-edit cus-start cus-load pdf-view bookmark pp jka-compr pdf-cache pdf-info tq pdf-util format-spec image-mode smex my-euphoria color-theme wid-edit cl smartscan desktop frameset winner ring expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom lisp-defuns multiple-cursors mc-hide-unmatched-lines-mode mc-separate-operations rectangular-region-mode mc-mark-pop mc-mark-more thingatpt mc-cycle-cursors mc-edit-lines multiple-cursors-core advice rect edmacro kmacro ido finder-inf tex-site 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 paren 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 xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 947277 46578) (symbols 48 65112 2) (miscs 40 2892 2831) (strings 32 190880 20633) (string-bytes 1 14750727) (vectors 16 64247) (vector-slots 8 1566895 62732) (floats 8 8633 405) (intervals 56 17369 111) (buffers 992 257))