GNU bug report logs - #19712
24.4; GNUmakefile mode: C-c C-c does not comment lines in recipes correctly

Previous Next

Package: emacs;

Reported by: Alain Kalker <a.c.kalker <at> gmail.com>

Date: Wed, 28 Jan 2015 14:57:01 UTC

Severity: normal

Found in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19712 in the body.
You can then email your comments to 19712 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19712; Package emacs. (Wed, 28 Jan 2015 14:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alain Kalker <a.c.kalker <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 28 Jan 2015 14:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alain Kalker <a.c.kalker <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4;
 GNUmakefile mode: C-c C-c does not comment lines in recipes correctly
Date: Wed, 28 Jan 2015 15:55:38 +0100
In a buffer editing a Makefile, marking a line in a recipe then doing
C-c C-c should put a "#" at the beginning of the line (before the
<tab>).  Instead, it puts "# " before the command, which doesn't make a
valid Makefile comment, i.e. it gets sent to the shell. In particular,
expansions like $(definedvar) get executed, which is usually not what is
wanted.

I think that Emacs should check whether the lines in the selected region
start with <tab>, in which case the "#" should go before the <tab>(s).



In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.7)
 of 2015-01-17 on bisson
Windowing system distributor `The X.Org Foundation', version 11.0.11603000
System Description:	Arch Linux

Configured using:
 `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: GNUmakefile

Minor modes in effect:
  delete-selection-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  show-paren-mode: t
  google-this-mode: t
  global-whitespace-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  global-company-mode: t
  company-mode: t
  cua-mode: t
  server-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x C-f M a k e f i l e <return> f o o : <return> <tab> 
e c h o SPC b a r <return> <tab> e c h o SPC b a z 
<return> <up> <S-down> C-c C-c C-c M-x r e p o r t 
- e m a <tab> <return>

Recent messages:
[yas] Loading for `prog-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/miki/.emacs.d/elpa/yasnippet-20141223.303/snippets/prog-mode) (quote prog-mode)))!
[yas] Loading compiled snippets from /home/miki/.emacs.d/elpa/yasnippet-20141223.303/snippets/prog-mode
Loading /home/miki/.emacs.d/elpa/yasnippet-20141223.303/snippets/prog-mode/.yas-setup...done
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
[yas] Loading for `makefile-gmake-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/miki/.emacs.d/elpa/yasnippet-20141223.303/snippets/makefile-gmake-mode) (quote makefile-gmake-mode)))!
[yas] Loading compiled snippets from /home/miki/.emacs.d/elpa/yasnippet-20141223.303/snippets/makefile-gmake-mode
[yas] Loading for `makefile-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/miki/.emacs.d/elpa/yasnippet-20141223.303/snippets/makefile-mode) (quote makefile-mode)))!
[yas] Loading compiled snippets from /home/miki/.emacs.d/elpa/yasnippet-20141223.303/snippets/makefile-mode
Mark set

Load-path shadows:
/usr/share/emacs/site-lisp/SuperCollider/tree-widget hides /usr/share/emacs/24.4/lisp/tree-widget

Features:
(shadow sort mail-extr emacsbug message idna cl-macs format-spec rfc822
mml mml-sec mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader sendmail vc-git make-mode hideshow eldoc elisp-slime-nav
hl-sexp thingatpt .emacs saveplace imenu company-files company-oddmuse
company-keywords company-etags etags ring company-gtags
company-dabbrev-code company-dabbrev company-capf company-cmake
company-ropemacs company-xcode company-clang company-semantic
company-eclim company-template company-css company-nxml company-bbdb
company-irony irony-completion irony-snippet company-tern s
ucs-normalize dash-functional tern url-http tls url-auth mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums url-gw json tsdh-dark-theme delsel
yasnippet cl gv paren google-this easy-mmode url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source eieio byte-opt bytecomp byte-compile cconv
eieio-core password-cache url-vars mailcap gnus gnus-ems nnheader
gnus-util mail-utils mm-util help-fns mail-prsvr wid-edit whitespace
flycheck-irony pcase irony-diagnostics irony flycheck find-func
help-mode rx subr-x dash company cua-base cus-start cus-load ix grapnel
pkg-info-autoloads epl-autoloads queue-autoloads info easymenu
slime-autoloads sly-autoloads package epg-config server edmacro kmacro
cl-loaddefs cl-lib time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar 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 minibuffer 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 make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 281588 13670)
 (symbols 48 28284 0)
 (miscs 40 91 134)
 (strings 32 42741 7231)
 (string-bytes 1 1207705)
 (vectors 16 41774)
 (vector-slots 8 775934 9330)
 (floats 8 427 420)
 (intervals 56 270 74)
 (buffers 960 14)
 (heap 1024 43631 1614))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19712; Package emacs. (Thu, 03 Dec 2020 11:54:02 GMT) Full text and rfc822 format available.

Message #8 received at 19712 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alain Kalker <a.c.kalker <at> gmail.com>
Cc: 19712 <at> debbugs.gnu.org
Subject: Re: bug#19712: 24.4; GNUmakefile mode: C-c C-c does not comment
 lines in recipes correctly
Date: Thu, 03 Dec 2020 12:53:13 +0100
[Message part 1 (text/plain, inline)]
Alain Kalker <a.c.kalker <at> gmail.com> writes:

> In a buffer editing a Makefile, marking a line in a recipe then doing
> C-c C-c should put a "#" at the beginning of the line (before the
> <tab>).  Instead, it puts "# " before the command, which doesn't make a
> valid Makefile comment, i.e. it gets sent to the shell. In particular,
> expansions like $(definedvar) get executed, which is usually not what is
> wanted.

(This bug report unfortunately got no response at the time.)

I tried reproducing this bug in Emacs 28 with this Makefile snippet:

[Message part 2 (image/png, inline)]
[Message part 3 (text/plain, inline)]
Following the recipe, I get this:

[Message part 4 (image/png, inline)]
[Message part 5 (text/plain, inline)]
So it looks like this has been fixed at some point since this was
reported, and I'm closing this bug report.  If this is still an issue,
please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

bug closed, send any further explanations to 19712 <at> debbugs.gnu.org and Alain Kalker <a.c.kalker <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 03 Dec 2020 11:54: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. (Thu, 31 Dec 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.