From unknown Mon Jun 23 23:49:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12137 <12137@debbugs.gnu.org> To: bug#12137 <12137@debbugs.gnu.org> Subject: Status: 23.4; latex-mode tex-insert-quote not aware of ties in context Reply-To: bug#12137 <12137@debbugs.gnu.org> Date: Tue, 24 Jun 2025 06:49:15 +0000 retitle 12137 23.4; latex-mode tex-insert-quote not aware of ties in context reassign 12137 emacs submitter 12137 Norman Ramsey severity 12137 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 04 13:01:53 2012 Received: (at submit) by debbugs.gnu.org; 4 Aug 2012 17:01:53 +0000 Received: from localhost ([127.0.0.1]:33630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sxhjc-0006ZQ-B3 for submit@debbugs.gnu.org; Sat, 04 Aug 2012 13:01:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33601) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SxhjZ-0006ZI-H9 for submit@debbugs.gnu.org; Sat, 04 Aug 2012 13:01:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sxhc5-0003ek-7u for submit@debbugs.gnu.org; Sat, 04 Aug 2012 12:54:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,MANY_HDRS_LCASE, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:58351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxhc5-0003eg-4v for submit@debbugs.gnu.org; Sat, 04 Aug 2012 12:54:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxhc3-00026a-G7 for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 12:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sxhc1-0003eH-TX for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 12:54:03 -0400 Received: from vms173015pub.verizon.net ([206.46.173.15]:58425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxhc1-0003eC-MF for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 12:54:01 -0400 Received: from homedog.cs.tufts.edu ([unknown] [108.20.67.9]) by vms173015.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0M8800BY6PLPZVE0@vms173015.mailsrvcs.net> for bug-gnu-emacs@gnu.org; Sat, 04 Aug 2012 11:53:50 -0500 (CDT) Received: by homedog.cs.tufts.edu (Postfix, from userid 32074) id 716B9119EAE; Sat, 04 Aug 2012 12:53:49 -0400 (EDT) From: Norman Ramsey To: bug-gnu-emacs@gnu.org Subject: 23.4; latex-mode tex-insert-quote not aware of ties in context Date: Sat, 04 Aug 2012 12:53:49 -0400 Message-id: MIME-version: 1.0 Content-type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) C-x C-f / t m p / x . t e x h e l l o SPC " m y " SPC d e a r e s t ~ " d a r l i n g . " The resulting text is hello ``my'' dearest~''darling.'' But in TeX, the ~ character is a "tie", and for purposes of electric quote marks, it should be treated as a space, not as an end-of-word character, producing the correct text hello ``my'' dearest~``darling.'' (Note difference in quotes preceding 'darling'.) In GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-07 on biber, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10707000 configured using `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' 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: LaTeX Minor modes in effect: shell-dirtrack-mode: t flyspell-mode: t noweb-minor-mode: t tooltip-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-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: u t h SPC a n d SPC p l a P l a s s SPC g e t SPC a SPC b e t t e r SPC r e s u l t SPC t h a n C-o C-a I n SPC t h i s SPC e x t e r m r e m e SPC c a s e , M-d M-d M-d M-d M-d C-e M-b M-b M-b M-b C-e SPC t h e SPC g r e e d y SPC a l g o r i t h m : SPC c h o o s i n g SPC n o t SPC t o SPC b r e a k SPC b e t w e e n SPC C-n M-f M-f M-f C-k C-y C-p C-e C-y C-b C-b C-e a l s o SPC i h n n i n h i b i t s SPC t h e SPC b r e a k SPC b e t w e e n SPC " o h ~ a n d " ~ a n d ` ~ " y e s . " C-b C-b C-b C-b C-b C-b ` ` C-e C-p C-p C-e M-b C-d C-d ` ` C-a C-x C-s C-n C-n C-o H e r e SPC i t SPC i s SPC C-a C-x C-s C-h k " C-n ~ " C-a C-k C-k C-x C-s M-x e m a c s - r e r e b o p o r r t - e m Recent messages: Error during redisplay: (args-out-of-range 126888 127378) Mark set Saving file /home/nr/cs/152/git-repo/textbook/haskell.nw... Wrote /home/nr/cs/152/git-repo/textbook/haskell.nw Saving file /home/nr/cs/152/git-repo/textbook/haskell.nw... Wrote /home/nr/cs/152/git-repo/textbook/haskell.nw Type C-x 4 C-o RET to restore the other window. Saving file /home/nr/cs/152/git-repo/textbook/haskell.nw... Wrote /home/nr/cs/152/git-repo/textbook/haskell.nw Making completion list... Load-path shadows: ~nr/emacs/sml-mode hides /usr/share/emacs23/site-lisp/sml-mode/sml-mode ~nr/emacs/sml-proc hides /usr/share/emacs23/site-lisp/sml-mode/sml-proc /usr/share/emacs/site-lisp/haskell-mode/haskell-indent hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-indent /usr/share/emacs/site-lisp/haskell-mode/haskell-indentation hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-indentation /usr/share/emacs/site-lisp/haskell-mode/haskell-c hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-c /usr/share/emacs/site-lisp/haskell-mode/haskell-hugs hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-hugs /usr/share/emacs/site-lisp/haskell-mode/haskell-font-lock hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-font-lock /usr/share/emacs/site-lisp/haskell-mode/haskell-mode hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-mode /usr/share/emacs/site-lisp/haskell-mode/haskell-doc hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-doc /usr/share/emacs/site-lisp/haskell-mode/haskell-decl-scan hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-decl-scan /usr/share/emacs/site-lisp/haskell-mode/haskell-site-file hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-site-file /usr/share/emacs/site-lisp/haskell-mode/haskell-simple-indent hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-simple-indent /usr/share/emacs/site-lisp/haskell-mode/haskell-ghci hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-ghci /usr/share/emacs/site-lisp/haskell-mode/inf-haskell hides /usr/share/emacs/23.4/site-lisp/haskell-mode/inf-haskell /usr/share/emacs/site-lisp/haskell-mode/haskell-cabal hides /usr/share/emacs/23.4/site-lisp/haskell-mode/haskell-cabal ~nr/emacs/noweb-mode hides /usr/share/emacs/site-lisp/noweb-mode /usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup ~nr/emacs/mwheel hides /usr/share/emacs/23.4/lisp/mwheel ~nr/emacs/longlines hides /usr/share/emacs/23.4/lisp/longlines /usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell /usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell Features: (shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode view apache-mode multi-isearch vc-rcs caml warnings skeleton scheme mule-util sml-menus sml-mode haskell-cabal conf-mode newcomment python-21 python parse-time cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs icon make-mode sh-script executable vc-cvs cus-edit cus-start cus-load wid-edit dired tex-mode shell vc-git haskell-font-lock haskell-decl-scan haskell-doc haskell-indentation haskell-indent haskell-mode byte-opt bytecomp byte-compile pp vc-hg flyspell ispell darcsum easymenu add-log rect assoc lua-mode filladapt scroll-in-place noweb derived multi-mode advice help-fns advice-preload imenu compile comint ring desktop edmacro kmacro mmm-auto mmm-vars mmm-compat regexp-opt cl cl-19 emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 14 23:56:47 2012 Received: (at 12137-done) by debbugs.gnu.org; 15 Aug 2012 03:56:47 +0000 Received: from localhost ([127.0.0.1]:57441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1Uit-0005lY-3a for submit@debbugs.gnu.org; Tue, 14 Aug 2012 23:56:47 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:59189) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T1Uir-0005l0-Gw for 12137-done@debbugs.gnu.org; Tue, 14 Aug 2012 23:56:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09MCqqR/2dsb2JhbABEDrA6g0mBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIIwVYE8Gg X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195711838" Received: from 76-10-170-145.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([76.10.170.145]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 14 Aug 2012 23:48:03 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 681C9AE2F6; Tue, 14 Aug 2012 23:48:03 -0400 (EDT) From: Stefan Monnier To: Norman Ramsey Subject: Re: bug#12137: 23.4; latex-mode tex-insert-quote not aware of ties in context Message-ID: References: Date: Tue, 14 Aug 2012 23:48:03 -0400 In-Reply-To: (Norman Ramsey's message of "Sat, 04 Aug 2012 12:53:49 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12137-done Cc: 12137-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > hello ``my'' dearest~''darling.'' Thanks, I fixed it in Emacs's trunk with the patch below, Stefan === modified file 'lisp/textmodes/tex-mode.el' --- lisp/textmodes/tex-mode.el 2012-08-03 02:29:59 +0000 +++ lisp/textmodes/tex-mode.el 2012-08-15 03:45:12 +0000 @@ -1286,7 +1286,8 @@ (delete-char (length tex-open-quote)) t))) (self-insert-command (prefix-numeric-value arg)) - (insert (if (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) + (insert (if (or (memq (char-syntax (preceding-char)) '(?\( ?> ?\s)) + (memq (preceding-char) '(?~))) tex-open-quote tex-close-quote)))) (defun tex-validate-buffer () From unknown Mon Jun 23 23:49:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 12 Sep 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator