From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gavin Jaeger-Freeborn Newsgroups: gmane.emacs.bugs Subject: bug#58983: 28.2; nroff-mode misshandled quoting Date: Wed, 02 Nov 2022 21:40:45 -0700 Message-ID: <63634bba.170a0220.8f10.097e@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10414"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.11; emacs 28.2 To: 58983@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 03 07:48:48 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqU1w-0002YB-8y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Nov 2022 07:48:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqU1O-0004FJ-0m; Thu, 03 Nov 2022 02:48:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqU1G-00048c-9b for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 02:48:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqU1F-0003MB-OV for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 02:48:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqU1F-0004LW-KX for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 02:48:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gavin Jaeger-Freeborn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Nov 2022 06:48:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58983 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166745803416455 (code B ref -1); Thu, 03 Nov 2022 06:48:05 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Nov 2022 06:47:14 +0000 Original-Received: from localhost ([127.0.0.1]:47656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqU0P-0004HJ-0d for submit@debbugs.gnu.org; Thu, 03 Nov 2022 02:47:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqSOW-0001KQ-GD for submit@debbugs.gnu.org; Thu, 03 Nov 2022 01:04:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqSOV-0004Ni-Jk for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 01:03:59 -0400 Original-Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqSOS-0005m8-Vs for bug-gnu-emacs@gnu.org; Thu, 03 Nov 2022 01:03:59 -0400 Original-Received: by mail-pj1-x102d.google.com with SMTP id c15-20020a17090a1d0f00b0021365864446so788017pjd.4 for ; Wed, 02 Nov 2022 22:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:date:subject:to:from:user-agent:message-id:from:to:cc :subject:date:message-id:reply-to; bh=bgVW9CZuylcisNOnTNB4tuBE+QZSk9f3+AvzQBCfhqA=; b=Xv8r+NioqClCw49lc/B6vkV/mdYwN70zdQLC4UUCIC2OSSlmE+u7j6HV/SkB7fGRCT 7/xcxIpsR3CvtqVpiy9YW1HKnQCnkaTW1vh0YLDU8R6ih4wTWZFTivEpeHy4PzKptvrP pBSY6Em5QHadxpK+pc9f6BJFNLRQNmTBx+oK+WzbMpkkIoxGEZqfdP6nzSFwTpZ/5DsI 4PGIG51kYDcuR4jBLBIp8nvEUMDqpegL92CvOlhuIIuxwA9EN3tUSRWYoGb/oY7RxH5w /Tuvv96G8cp+TVHKXJXWbT40Mnv9PWL6aiULe8AnAUxUcOZ3Ey2G5Qg+TtYR1w0aSTZ1 HSDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:date:subject:to:from:user-agent:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bgVW9CZuylcisNOnTNB4tuBE+QZSk9f3+AvzQBCfhqA=; b=RF7YafeTsSXWnMAQpmH0cRYMmksH7p3x3DYRr/tBd62Xc4u1j8le+YQ406wooQG960 WNwpvXYR+alFVXKlc83f19Q238i74a77k0JoHbj9LFyHQspx5JIO8GV1IZ4o74B3ePQ9 /5fkrHzM9zFqHQBgfzqfV/bFVTCfCG8S1RWj0dnDSRZiwvzwwLOoUGOWRF+T9i63qEJA dwLcRZY0ZovP0BTo+SvymHudJjyJ9B3UmuLDeFASqBZTgfR55jb3HWPwnS1Qejtt0G3E +wZ5a+kAiRh3K4IZ0+Qub7/dllM0/VB13zHmW//HrNcXkyohwkD3Is72a6HcShocjfki ofcA== X-Gm-Message-State: ACrzQf322WChYJn0WAAhW7CIxLDQZKs+1cwLBFKDNG9wWTkJY54JAcqN tSaULaEu4gfAuT+Pd2WYfGT5SyNtbSFn X-Google-Smtp-Source: AMsMyM5zrO3vnMNUQCWkQbVRPfaM/nPaDsA4NpseNnN3HwfjvO2xTcM3AYIiAw6ArUTE1BNB2EYNAA== X-Received: by 2002:a17:903:1250:b0:185:40c6:3c2c with SMTP id u16-20020a170903125000b0018540c63c2cmr28278372plh.64.1667451834648; Wed, 02 Nov 2022 22:03:54 -0700 (PDT) Original-Received: from localhost (S0106a84e3fe32ad3.gv.shawcable.net. [24.69.156.57]) by smtp.gmail.com with ESMTPSA id t1-20020a17090340c100b0018855a22ccfsm312070pld.91.2022.11.02.22.03.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 22:03:54 -0700 (PDT) X-Google-Original-Message-ID: --text follows this line-- Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=gavinfreeborn@gmail.com; helo=mail-pj1-x102d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 03 Nov 2022 02:47:05 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246922 Archived-At: Hello everyone, Currently nroff-mode misidentifies double quotes in string definitions. Currently all pairs of double quotes are highlighted as a string unless used in a comment like in most languages. However, nroff/troff has one special case where its is not the case. The following outlines how it should work. In nroff/troff you can define strings with the following format .ds welcome hello world This defines a `string` welcome with the contents `hello world' Now if someone wanted to define a string that started with a space they would instead use .ds welcome " hello world In addition you can call a macro with the same leeding `.` like so .B "hello world" This calls the macro `B` with it's first argument being `hello world` The issue is that at the moment the strings are simply detected with the code (modify-syntax-entry ?\" "\" 2" st) Meaning that (unless it's a comment) its assumed to be a string (at least that is my understanding). Instead a special case needs to be added to avoid doing this if the double quote is used in a string definition. The closest thing to a language specification these languages have is the troff user manual which defines the ds request as > .ds xx > > Define a string xx containing string. Any initial double quote in string > is stripped off to permit initial blanks. The manual can be found at https://www.troff.org/54.pdf For further examples on how this is used please see https://raw.githubusercontent.com/aligrudi/neatroff_make/master/tmac/tmac.en In addition https://github.com/aligrudi/neatroff_make/tree/master/demo contains multiple other examples. Thanks in advance! Gavin In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-09-12 built on frederik Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: EndeavourOS Configured using: 'configure --with-x-toolkit=gtk3 --with-native-compilation --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LC_MONETARY: en_CA.UTF-8 value of $LC_NUMERIC: en_CA.UTF-8 value of $LC_TIME: en_CA.UTF-8 value of $LANG: en_CA.UTF-8 locale-coding-system: utf-8-unix Major mode: mu4e:main Minor modes in effect: mu4e-search-minor-mode: t mu4e-update-minor-mode: t mu4e-context-minor-mode: t windmove-mode: t display-time-mode: t org-yaap-mode: t clipmon-mode: t treemacs-filewatch-mode: t treemacs-follow-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: t recentf-mode: t global-paren-face-mode: t repeat-mode: t winner-mode: t electric-pair-mode: t savehist-mode: t global-auto-revert-mode: t popper-mode: t diff-hl-flydiff-mode: t global-diff-hl-mode: t global-org-modern-mode: t shell-dirtrack-mode: t global-hl-line-mode: t corfu-history-mode: t global-corfu-mode: t vertico-mode: t marginalia-mode: t global-so-long-mode: t async-bytecomp-package-mode: t dired-async-mode: t override-global-mode: t apheleia-global-mode: t apheleia-mode: t puni-global-mode: t puni-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t global-prettify-symbols-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t overwrite-mode: overwrite-mode-binary Load-path shadows: /home/gavinok/.emacs.d/elpa/transient-20220918.2101/transient hides /usr/share/emacs/28.2/lisp/transient Features: (shadow face-remap message-attachment-reminder mu4e mu4e-org mu4e-main mu4e-view mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message flow-fill mu4e-contacts mu4e-update mu4e-folders mu4e-server mu4e-context mu4e-vars mu4e-helpers mu4e-config ido puni vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs emacsbug sendmail misearch multi-isearch view windmove sh-script smie tempel time org-duration org-eldoc org-download org-attach org-id url-http url-auth url-gw org-yaap diary-lib diary-loaddefs org-clock notifications clipmon writegood-mode flyspell ispell lsp-zig lsp-steep lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-yaml lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex lsp-tailwindcss lsp-sorbet lsp-solargraph lsp-rust lsp-rf lsp-remark lsp-racket lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-kotlin lsp-json lsp-javascript lsp-java-boot dap-java dap-gdb-lldb dap-utils dap-mode dap-tasks dap-launch posframe dap-overlays lsp-java lsp-idris lsp-haxe lsp-haskell lsp-groovy lsp-grammarly grammarly websocket bindat request lsp-hack lsp-graphql lsp-gleam lsp-go lsp-completion lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elixir lsp-elm lsp-dockerfile lsp-docker yaml lsp-dhall lsp-d lsp-css lsp-csharp gnutls lsp-crystal lsp-cmake lsp-clojure lsp-treemacs lsp-treemacs-generic lsp-treemacs-themes treemacs-treelib treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-bookmarks treemacs-interface treemacs-extensions treemacs-mouse-interface treemacs-tags treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator treemacs-scope pulse treemacs-faces treemacs-icons treemacs-themes treemacs-core-utils pfuture treemacs-logging treemacs-customization treemacs-macros lsp-semantic-tokens lsp-clangd lsp-beancount lsp-bash lsp-ansible lsp-angular lsp-ada lsp-actionscript lsp-pyright lsp-mode lsp-protocol yasnippet spinner network-stream nsm markdown-mode color lv inline ht f f-shortdoc shortdoc s dash haskell-doc inf-haskell haskell-decl-scan imenu haskell haskell-completions haskell-load haskell-commands highlight-uses-mode haskell-modules haskell-sandbox haskell-navigate-imports haskell-repl haskell-svg haskell-collapse haskell-debug haskell-interactive-mode haskell-presentation-mode haskell-compile haskell-hoogle haskell-process haskell-session haskell-indent haskell-mode haskell-cabal haskell-utils haskell-font-lock haskell-indentation haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports haskell-complete-module haskell-ghc-support etags fileloop xref dabbrev haskell-customize org-indent ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs mail-utils ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi nroff-mode mule-util orderless cursor-sensor consult-vertico consult compat-28 recentf tree-widget bookmark server hideshow checkdoc flymake-proc flymake compile text-property-search thingatpt paren-face hl-todo compat compat-macs executable vc-git repeaters repeat winner dired-x elec-pair apheleia disp-table pcase savehist autorevert filenotify popper project diff-hl-flydiff diff diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode org-protocol org-tempo tempo org-modern ob-rust ob-forth ob-scheme ob-clojure ob-lisp ob-java ob-dot ob-lua ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-python python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time ls-lisp ob-shell shell ob-haskell ox-md ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda org-refile ox-html table ox-ascii ox-publish ox org-element avl-tree generator org-contrib 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 noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601 time-date ol org-keys oc org-compat org-macs org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs hl-line spaceway-theme cape corfu-history corfu visual-regexp vertico-directory vertico marginalia advice cus-edit pp cus-load wid-edit comp comp-cstr warnings rx so-long pragmatapro-lig fontaine async-bytecomp dired-async async dired-aux dired dired-loaddefs quelpa-use-package cl-extra quelpa mm-decode mm-bodies mm-encode lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr help-fns radix-tree help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core finder-inf cl easy-mmode edmacro kmacro info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap 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 iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1884181 93137) (symbols 48 61947 21) (strings 32 321162 20706) (string-bytes 1 9511735) (vectors 16 113045) (vector-slots 8 2128991 115355) (floats 8 1035 778) (intervals 56 151390 236) (buffers 992 142))