GNU bug report logs - #4019
command to move point to #else (or #elif) in c-mode

Previous Next

Packages: emacs, cc-mode;

Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>

Date: Sun, 2 Aug 2009 18:30:07 UTC

Severity: wishlist

Tags: moreinfo

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 4019 in the body.
You can then email your comments to 4019 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4019; Package emacs. (Sun, 02 Aug 2009 18:30:07 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dan Nicolaescu <dann <at> ics.uci.edu>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: command to move point to #else (or #elif) in c-mode
Date: Sun, 2 Aug 2009 11:18:57 -0700 (PDT)
When looking at code with a lot of preprocessor conditionals, a lot of
times it is very useful when the point is at an #if to move it the
corresponding #else (or #elif) to check what is happening on the other
branch of the #if.  C-c C-p and C-c C-n are not very useful when you
have to deal with a lot of nested and not nested #if #else.

Please consider adding such a command.

Thanks!





Severity set to 'wishlist' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 29 Sep 2009 01:25:05 GMT) Full text and rfc822 format available.

bug reassigned from package 'emacs' to 'emacs,cc-mode'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 29 Sep 2009 01:25:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#4019; Package emacs,cc-mode. (Sun, 10 Jul 2022 02:54:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 4019 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#4019: command to move point to #else (or #elif) in c-mode
Date: Sat, 9 Jul 2022 19:53:34 -0700
Hi Alan,

Dan Nicolaescu <dann <at> ics.uci.edu> writes:

> When looking at code with a lot of preprocessor conditionals, a lot of
> times it is very useful when the point is at an #if to move it the
> corresponding #else (or #elif) to check what is happening on the other
> branch of the #if.  C-c C-p and C-c C-n are not very useful when you
> have to deal with a lot of nested and not nested #if #else.

This wishlist request was reported in 2009, but never got a reply.

It seems to me that such a command would be useful but is still missing.




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#4019; Package emacs,cc-mode. (Sun, 10 Jul 2022 10:36:03 GMT) Full text and rfc822 format available.

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

From: Daniel Martín <mardani29 <at> yahoo.es>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 4019 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>,
 Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#4019: command to move point to #else (or #elif) in c-mode
Date: Sun, 10 Jul 2022 12:35:15 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> Hi Alan,
>
> Dan Nicolaescu <dann <at> ics.uci.edu> writes:
>
>> When looking at code with a lot of preprocessor conditionals, a lot of
>> times it is very useful when the point is at an #if to move it the
>> corresponding #else (or #elif) to check what is happening on the other
>> branch of the #if.  C-c C-p and C-c C-n are not very useful when you
>> have to deal with a lot of nested and not nested #if #else.
>
> This wishlist request was reported in 2009, but never got a reply.
>
> It seems to me that such a command would be useful but is still missing.

There are c-down-conditional-with-else and c-up-conditional-with-else,
which you can bind to a key if you use them frequently.




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#4019; Package emacs,cc-mode. (Sun, 10 Jul 2022 10:49:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 4019 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>,
 Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#4019: command to move point to #else (or #elif) in c-mode
Date: Sun, 10 Jul 2022 03:48:21 -0700
Daniel Martín <mardani29 <at> yahoo.es> writes:

> There are c-down-conditional-with-else and c-up-conditional-with-else,
> which you can bind to a key if you use them frequently.

OK, so I guess this has been fixed meanwhile?  Should the request be
closed?




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#4019; Package emacs,cc-mode. (Sun, 10 Jul 2022 11:17:01 GMT) Full text and rfc822 format available.

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

From: Daniel Martín <mardani29 <at> yahoo.es>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 4019 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>,
 Dan Nicolaescu <dann <at> ics.uci.edu>
Subject: Re: bug#4019: command to move point to #else (or #elif) in c-mode
Date: Sun, 10 Jul 2022 13:16:36 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> Daniel Martín <mardani29 <at> yahoo.es> writes:
>
>> There are c-down-conditional-with-else and c-up-conditional-with-else,
>> which you can bind to a key if you use them frequently.
>
> OK, so I guess this has been fixed meanwhile?  Should the request be
> closed?

Yes, I think so.




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#4019; Package emacs,cc-mode. (Sun, 10 Jul 2022 11:52:01 GMT) Full text and rfc822 format available.

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

From: Alan Mackenzie <acm <at> muc.de>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 4019 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>,
 Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#4019: command to move point to #else (or #elif) in c-mode
Date: Sun, 10 Jul 2022 11:51:15 +0000
Hello, Stefan.

On Sun, Jul 10, 2022 at 03:48:21 -0700, Stefan Kangas wrote:
> Daniel Martín <mardani29 <at> yahoo.es> writes:

> > There are c-down-conditional-with-else and c-up-conditional-with-else,
> > which you can bind to a key if you use them frequently.

> OK, so I guess this has been fixed meanwhile?

No.  The two commands have always been there (for values of "always"
greater that 20 years).  Maybe they need more publicity, somehow.

> Should the request be closed?

I'm not sure that c-down/up-conditional-with-else are exactly what the
OP is asking for.

-- 
Alan Mackenzie (Nuremberg, Germany).




Added tag(s) moreinfo. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 10 Jul 2022 12:15:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#4019; Package emacs,cc-mode. (Sun, 10 Jul 2022 13:07:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 4019 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>,
 Stefan Kangas <stefan <at> marxist.se>,
 Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#4019: command to move point to #else (or #elif) in c-mode
Date: Sun, 10 Jul 2022 15:06:30 +0200
Alan Mackenzie <acm <at> muc.de> writes:

> I'm not sure that c-down/up-conditional-with-else are exactly what the
> OP is asking for.

Me neither, but this reminds me -- do we have a command/minor mode that
tells you all the C conditionals you're inside?  I'd love a minor mode
that'd say (in the mode line, for instance), that I'm inside

HAVE_UNEXEC -> DOUG_LEA_MALLOC

or whatever.

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




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#4019; Package emacs,cc-mode. (Mon, 08 Aug 2022 12:47:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 4019 <at> debbugs.gnu.org, Dan Nicolaescu <dann <at> ics.uci.edu>,
 Stefan Kangas <stefan <at> marxist.se>,
 Daniel Martín <mardani29 <at> yahoo.es>
Subject: Re: bug#4019: command to move point to #else (or #elif) in c-mode
Date: Mon, 08 Aug 2022 14:46:44 +0200
Alan Mackenzie <acm <at> muc.de> writes:

>> OK, so I guess this has been fixed meanwhile?
>
> No.  The two commands have always been there (for values of "always"
> greater that 20 years).  Maybe they need more publicity, somehow.
>
>> Should the request be closed?
>
> I'm not sure that c-down/up-conditional-with-else are exactly what the
> OP is asking for.

There wasn't any response in a month, and it seems unlikely that
there'll be more progress here without input from the original bug
reporter, so I'm closing this bug report.

If progress can be made, please respond to the debbugs address and we'll
reopen.




bug closed, send any further explanations to 4019 <at> debbugs.gnu.org and Dan Nicolaescu <dann <at> ics.uci.edu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 08 Aug 2022 12:48: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, 06 Sep 2022 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 226 days ago.

Previous Next


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