GNU bug report logs -
#25517
print-format specifier mistaken as comment in inferior-octave-mode
Previous Next
To reply to this bug, email your comments to 25517 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Tue, 24 Jan 2017 10:27:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Röhler <andreas.roehler <at> easy-emacs.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 24 Jan 2017 10:27:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
See also png attached
In GNU Emacs 25.1.91.1 (i686-pc-linux-gnu, GTK+ Version 3.14.5)
of 2017-01-02 built on sprache
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description: Debian GNU/Linux 8.7 (jessie)
Configured using:
'configure --with-modules'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
MODULES
Important settings:
value of $LANG: de_DE.utf8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Inferior Octave
Minor modes in effect:
compilation-shell-minor-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-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
transient-mark-mode: t
Recent messages:
Checking 70 files in ~/emacs-25.1.91/lisp/erc...
Checking 34 files in ~/emacs-25.1.91/lisp/emulation...
Checking 167 files in ~/emacs-25.1.91/lisp/emacs-lisp...
Checking 24 files in ~/emacs-25.1.91/lisp/cedet...
Checking 57 files in ~/emacs-25.1.91/lisp/calendar...
Checking 87 files in ~/emacs-25.1.91/lisp/calc...
Checking 120 files in ~/emacs-25.1.91/lisp/obsolete...
Checking for load-path shadows...done
Mark set [2 times]
Auto-saving...done
Load-path shadows:
None found.
Features:
(pp shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils
thingatpt compile skeleton octave smie comint ansi-color ring
vc-filewise vc-rcs cl-extra help-mode cc-mode cc-fonts easymenu cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core 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 charscript case-table epa-hook jka-cmpr-hook help
simple abbrev 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 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 8 191027 19020)
(symbols 24 41093 0)
(miscs 20 70 337)
(strings 16 59215 5423)
(string-bytes 1 1095204)
(vectors 8 16689)
(vector-slots 4 506017 14162)
(floats 8 177 204)
(intervals 28 352 163)
(buffers 520 21)
(heap 1024 33581 776))
[sprintf.png (image/png, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Tue, 24 Jan 2017 13:19:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 25517 <at> debbugs.gnu.org (full text, mbox):
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
> See also png attached
>
It looks like the problem is that octave-mode-syntax-table sets single
quotes as punctuation even though GNU Octave's manual says single quotes
are string syntax [1].
[1]:
https://www.gnu.org/software/octave/doc/interpreter/String-Objects.html
Does this fix it?
--- i/lisp/progmodes/octave.el
+++ w/lisp/progmodes/octave.el
@@ -165,7 +165,7 @@ octave-mode-syntax-table
(modify-syntax-entry ?| "." table)
(modify-syntax-entry ?! "." table)
(modify-syntax-entry ?\\ "." table)
- (modify-syntax-entry ?\' "." table)
+ (modify-syntax-entry ?\' "\"" table)
(modify-syntax-entry ?\` "." table)
(modify-syntax-entry ?. "." table)
(modify-syntax-entry ?\" "\"" table)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Tue, 24 Jan 2017 15:25:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 25517 <at> debbugs.gnu.org (full text, mbox):
On 24.01.2017 14:19, npostavs <at> users.sourceforge.net wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
>> See also png attached
>>
> It looks like the problem is that octave-mode-syntax-table sets single
> quotes as punctuation even though GNU Octave's manual says single quotes
> are string syntax [1].
>
> [1]:
> https://www.gnu.org/software/octave/doc/interpreter/String-Objects.html
>
> Does this fix it?
>
> --- i/lisp/progmodes/octave.el
> +++ w/lisp/progmodes/octave.el
> @@ -165,7 +165,7 @@ octave-mode-syntax-table
> (modify-syntax-entry ?| "." table)
> (modify-syntax-entry ?! "." table)
> (modify-syntax-entry ?\\ "." table)
> - (modify-syntax-entry ?\' "." table)
> + (modify-syntax-entry ?\' "\"" table)
> (modify-syntax-entry ?\` "." table)
> (modify-syntax-entry ?. "." table)
> (modify-syntax-entry ?\" "\"" table)
>
Thanks. That should be a useful cure in octave-mode.
A resp. fix seems needed in inferior-octave-mode-map.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Tue, 24 Jan 2017 15:42:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 25517 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jan 24, 2017 at 10:35 AM, Andreas Röhler
<andreas.roehler <at> easy-emacs.de> wrote:
>> @@ -165,7 +165,7 @@ octave-mode-syntax-table
>> - (modify-syntax-entry ?\' "." table)
>> + (modify-syntax-entry ?\' "\"" table)
>
> Thanks. That should be a useful cure in octave-mode.
>
> A resp. fix seems needed in inferior-octave-mode-map.
Huh? What do you think needs changing in inferior-octave-mode-map?
That's a keymap? If you meant inferior-octave-mode-syntax-table, then
it already inherits everything from octave-mode-syntax-table anyway.
(defvar inferior-octave-mode-syntax-table
(let ((table (make-syntax-table octave-mode-syntax-table)))
table)
"Syntax table in use in `inferior-octave-mode' buffers.")
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Tue, 24 Jan 2017 16:01:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 25517 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 24.01.2017 16:41, Noam Postavsky wrote:
> On Tue, Jan 24, 2017 at 10:35 AM, Andreas Röhler
> <andreas.roehler <at> easy-emacs.de> wrote:
>>> @@ -165,7 +165,7 @@ octave-mode-syntax-table
>>> - (modify-syntax-entry ?\' "." table)
>>> + (modify-syntax-entry ?\' "\"" table)
>> Thanks. That should be a useful cure in octave-mode.
>>
>> A resp. fix seems needed in inferior-octave-mode-map.
> Huh? What do you think needs changing in inferior-octave-mode-map?
> That's a keymap? If you meant inferior-octave-mode-syntax-table, then
> it already inherits everything from octave-mode-syntax-table anyway.
>
> (defvar inferior-octave-mode-syntax-table
> (let ((table (make-syntax-table octave-mode-syntax-table)))
> table)
> "Syntax table in use in `inferior-octave-mode' buffers.")
Okay, see. However, it's not gone - see attachment.
While correct at octave-mode.
[inferior-octave.png (image/png, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Tue, 24 Jan 2017 22:49:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 25517 <at> debbugs.gnu.org (full text, mbox):
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
> On 24.01.2017 16:41, Noam Postavsky wrote:
>> On Tue, Jan 24, 2017 at 10:35 AM, Andreas Röhler
>> <andreas.roehler <at> easy-emacs.de> wrote:
>>>> @@ -165,7 +165,7 @@ octave-mode-syntax-table
>>>> - (modify-syntax-entry ?\' "." table)
>>>> + (modify-syntax-entry ?\' "\"" table)
>>> Thanks. That should be a useful cure in octave-mode.
>>>
>>> A resp. fix seems needed in inferior-octave-mode-map.
>> Huh? What do you think needs changing in inferior-octave-mode-map?
>> That's a keymap? If you meant inferior-octave-mode-syntax-table, then
>> it already inherits everything from octave-mode-syntax-table anyway.
>>
>> (defvar inferior-octave-mode-syntax-table
>> (let ((table (make-syntax-table octave-mode-syntax-table)))
>> table)
>> "Syntax table in use in `inferior-octave-mode' buffers.")
>
> Okay, see. However, it's not gone - see attachment.
> While correct at octave-mode.
That's without the change though, right?
I found out why octave-mode-syntax-table misses this setting:
octave-mode uses a syntax-propertize-function to set the correct syntax
for quotes, it looks like that's needed because of the way backslashes
are handled.
It's not so easy to apply octave-syntax-propertize-function to
inferior-octave-mode to due prompts and output being in the buffer too.
Kind of a similar problem as the multiple mode stuff.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Wed, 25 Jan 2017 08:32:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 25517 <at> debbugs.gnu.org (full text, mbox):
On 24.01.2017 23:49, npostavs <at> users.sourceforge.net wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
>> On 24.01.2017 16:41, Noam Postavsky wrote:
>>> On Tue, Jan 24, 2017 at 10:35 AM, Andreas Röhler
>>> <andreas.roehler <at> easy-emacs.de> wrote:
>>>>> @@ -165,7 +165,7 @@ octave-mode-syntax-table
>>>>> - (modify-syntax-entry ?\' "." table)
>>>>> + (modify-syntax-entry ?\' "\"" table)
>>>> Thanks. That should be a useful cure in octave-mode.
>>>>
>>>> A resp. fix seems needed in inferior-octave-mode-map.
>>> Huh? What do you think needs changing in inferior-octave-mode-map?
>>> That's a keymap? If you meant inferior-octave-mode-syntax-table, then
>>> it already inherits everything from octave-mode-syntax-table anyway.
>>>
>>> (defvar inferior-octave-mode-syntax-table
>>> (let ((table (make-syntax-table octave-mode-syntax-table)))
>>> table)
>>> "Syntax table in use in `inferior-octave-mode' buffers.")
>> Okay, see. However, it's not gone - see attachment.
>> While correct at octave-mode.
> That's without the change though, right?
No, changed source according to your fix. Otherwise wouldn't expect it
correct in plain octave-mode.
>
> I found out why octave-mode-syntax-table misses this setting:
> octave-mode uses a syntax-propertize-function to set the correct syntax
> for quotes, it looks like that's needed because of the way backslashes
> are handled.
>
> It's not so easy to apply octave-syntax-propertize-function to
> inferior-octave-mode to due prompts and output being in the buffer too.
> Kind of a similar problem as the multiple mode stuff.
Isn't there good old syntax-ppss at work, the universal source of bugs?
What about employing (parse-partial-sexp (line-beginning-position)
(point)) instead?
This would reduce the number of fontify-bugs considerably.
Starting from pos of last prompt should be possible too.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Wed, 25 Jan 2017 16:14:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 25517 <at> debbugs.gnu.org (full text, mbox):
On Wed, Jan 25, 2017 at 3:41 AM, Andreas Röhler
<andreas.roehler <at> easy-emacs.de> wrote:
>
>>>
>>> Okay, see. However, it's not gone - see attachment.
>>> While correct at octave-mode.
>>
>> That's without the change though, right?
>
>
> No, changed source according to your fix. Otherwise wouldn't expect it
> correct in plain octave-mode.
It does, in fact, work without the change in plain octave-mode.
Perhaps you forgot to recompile after applying the patch?
>
> Isn't there good old syntax-ppss at work, the universal source of bugs?
I've seen that every time you get on this topic, a long and ultimately
fruitless discussion ensues. Therefore I won't respond to any
suggestions about this.
Changed bug title to '[octave-mode] print-format specifier mistaken as comment' from '25.1.91; print-format specifier mistaken as comment'
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Sun, 22 Oct 2017 18:37:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Mon, 24 Aug 2020 15:35:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 25517 <at> debbugs.gnu.org (full text, mbox):
npostavs <at> users.sourceforge.net writes:
> It looks like the problem is that octave-mode-syntax-table sets single
> quotes as punctuation even though GNU Octave's manual says single quotes
> are string syntax [1].
[...]
> - (modify-syntax-entry ?\' "." table)
> + (modify-syntax-entry ?\' "\"" table)
I tried M-x inferior-octave with the test case without and with the
patch, and the patch seems to fix the problem for me, so I've applied it
to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 24 Aug 2020 15:35:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
25517 <at> debbugs.gnu.org and Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 24 Aug 2020 15:35:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 22 Sep 2020 11:24:05 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 28.1 and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 07 Feb 2021 14:15:02 GMT)
Full text and
rfc822 format available.
Removed tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 07 Feb 2021 14:15:02 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 07 Feb 2021 14:17:01 GMT)
Full text and
rfc822 format available.
bug Marked as found in versions 28.0.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 07 Feb 2021 14:17:02 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 28.1 and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 07 Feb 2021 14:18:01 GMT)
Full text and
rfc822 format available.
Removed tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 07 Feb 2021 14:18:02 GMT)
Full text and
rfc822 format available.
Changed bug title to 'print-format specifier mistaken as comment in inferior-octave-mode' from '[octave-mode] print-format specifier mistaken as comment'
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 07 Jun 2022 14:52:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25517
; Package
emacs
.
(Tue, 07 Jun 2022 14:53:02 GMT)
Full text and
rfc822 format available.
Message #54 received at 25517 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> reopen 25517
> tags 25517 - fixed patch
> quit
I closed and then reopened this apparently without saying why.
The bug is fixed in octave-mode, but not inferior-octave-mode -- because
inferior-octave-mode doesn't use the syntax table from octave-mode
because there's non-octave text in the buffer (like prompts and the
like).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.