unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19712: 24.4; GNUmakefile mode: C-c C-c does not comment lines in recipes correctly
@ 2015-01-28 14:55 Alain Kalker
  2020-12-03 11:53 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Alain Kalker @ 2015-01-28 14:55 UTC (permalink / raw)
  To: 19712


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))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#19712: 24.4; GNUmakefile mode: C-c C-c does not comment lines in recipes correctly
  2015-01-28 14:55 bug#19712: 24.4; GNUmakefile mode: C-c C-c does not comment lines in recipes correctly Alain Kalker
@ 2020-12-03 11:53 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-03 11:53 UTC (permalink / raw)
  To: Alain Kalker; +Cc: 19712

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

Alain Kalker <a.c.kalker@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:


[-- Attachment #2: Type: image/png, Size: 65694 bytes --]

[-- Attachment #3: Type: text/plain, Size: 36 bytes --]


Following the recipe, I get this:


[-- Attachment #4: Type: image/png, Size: 67673 bytes --]

[-- Attachment #5: Type: text/plain, Size: 298 bytes --]


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-03 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 14:55 bug#19712: 24.4; GNUmakefile mode: C-c C-c does not comment lines in recipes correctly Alain Kalker
2020-12-03 11:53 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).