GNU bug report logs -
#7622
[PATCH] lib-src/emacsclient.c: Change -H to -h. Order options alphabetically
Previous Next
Reported by: Jari Aalto <jari.aalto <at> cante.net>
Date: Sun, 12 Dec 2010 14:43:02 UTC
Severity: wishlist
Tags: patch
Found in version 23.2+1-5.1
Done: Lars Magne 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 7622 in the body.
You can then email your comments to 7622 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#7622
; Package
emacs
.
(Sun, 12 Dec 2010 14:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jari Aalto <jari.aalto <at> cante.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 12 Dec 2010 14:43:02 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)]
Package: emacs
Version: 23.2+1-5.1
Severity: wishlist
Tags: patch
The patch changes help option to lowercase -h like found e.g. in GNU
cp(1). The option help is also presented alphabetically.
The patch is against Git:
74bd01f 2010-12-12 Merge branch 'master' of git://git.sv.gnu.org/emacs
[ lib-src/ChangeLog ]
2010-12-12 Jari Aalto <jari.aalto <at> cante.net>
* emacsclient.c (decode_options): Change help option from -H to -h.
(print_help_and_exit): Order options alphabetically.
[0001-emacsclient.c-decode_options-Change-help-option-from.patch (text/x-diff, inline)]
From f9c51ef32df48c3a01cb32e9b67aa5694794ccef Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto <at> cante.net>
Date: Sun, 12 Dec 2010 16:41:47 +0200
Subject: [PATCH] * emacsclient.c (decode_options): Change help option from -H to -h.
(print_help_and_exit): Order options alphabetically.
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Signed-off-by: Jari Aalto <jari.aalto <at> cante.net>
---
lib-src/emacsclient.c | 36 +++++++++++++++++++-----------------
1 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 48ea3d2..9759898 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -516,9 +516,9 @@ decode_options (int argc, char **argv)
{
int opt = getopt_long_only (argc, argv,
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
- "VHnea:s:f:d:tc",
+ "Vhnea:s:f:d:tc",
#else
- "VHnea:f:d:tc",
+ "Vhnea:f:d:tc",
#endif
longopts, 0);
@@ -581,7 +581,7 @@ decode_options (int argc, char **argv)
current_frame = 0;
break;
- case 'H':
+ case 'h':
print_help_and_exit ();
break;
@@ -646,29 +646,31 @@ Tell the Emacs server to visit the specified files.\n\
Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\
\n\
The following OPTIONS are accepted:\n\
--V, --version Just print version info and return\n\
--H, --help Print this usage information message\n\
--nw, -t, --tty Open a new Emacs frame on the current terminal\n\
+-a EDITOR, --alternate-editor=EDITOR\n\
+ Editor to fallback to if the server is not running\n"
+#ifndef WINDOWSNT
+" If EDITOR is the empty string, start Emacs in daemon\n\
+ mode and try connecting again\n"
+#endif /* not WINDOWSNT */
+"\
-c, --create-frame Create a new frame instead of trying to\n\
use the current Emacs frame\n\
--e, --eval Evaluate the FILE arguments as ELisp expressions\n\
--n, --no-wait Don't wait for the server to return\n\
-d DISPLAY, --display=DISPLAY\n\
Visit the file in the given display\n\
+-e, --eval Evaluate the FILE arguments as ELisp expressions\n\
+-f SERVER, --server-file=SERVER\n\
+ Set filename of the TCP authentication file\n\
+-n, --no-wait Don't wait for the server to return\n\
+-nw, -t, --tty Open a new Emacs frame on the current terminal\n\
--parent-id=ID Open in parent window ID, via XEmbed\n"
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
"-s SOCKET, --socket-name=SOCKET\n\
Set filename of the UNIX socket for communication\n"
#endif
-"-f SERVER, --server-file=SERVER\n\
- Set filename of the TCP authentication file\n\
--a EDITOR, --alternate-editor=EDITOR\n\
- Editor to fallback to if the server is not running\n"
-#ifndef WINDOWSNT
-" If EDITOR is the empty string, start Emacs in daemon\n\
- mode and try connecting again\n"
-#endif /* not WINDOWSNT */
-"\n\
+"\
+-h, --help Print this usage information message\n\
+-V, --version Just print version info and return\n\
+\n\
Report bugs with M-x report-emacs-bug.\n", progname);
exit (EXIT_SUCCESS);
}
--
1.7.2.3
[Message part 3 (text/plain, inline)]
-- System Information
Debian Release: squeeze/sid
APT Prefers testing
APT policy: (990, testing) (500, unstable) (1, experimental)
Architecture: amd64
Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Fri Sep 17 21:50:19 UTC 2010 x86_64 GNU/Linux
Locale: LANG=en_DK.UTF-8
-- Versions of packages `emacs depends on'.
Depends:
emacs23 23.2+1-5.1 GNU Emacs is the extensible self-documenting
emacs23-lucid 23.2+1-5.1 GNU Emacs is the extensible self-documenting
emacs23-nox 23.2+1-5.1 GNU Emacs is the extensible self-documenting
Reply sent
to
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
:
You have taken responsibility.
(Tue, 10 Apr 2012 23:50:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jari Aalto <jari.aalto <at> cante.net>
:
bug acknowledged by developer.
(Tue, 10 Apr 2012 23:50:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 7622-close <at> debbugs.gnu.org (full text, mbox):
Jari Aalto <jari.aalto <at> cante.net> writes:
> The patch changes help option to lowercase -h like found e.g. in GNU
> cp(1). The option help is also presented alphabetically.
[larsi <at> stories ~/src/emacs/trunk]$ cp -h
cp: invalid option -- 'h'
So I don't think this change would be correct.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#7622
; Package
emacs
.
(Wed, 11 Apr 2012 05:24:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 7622 <at> debbugs.gnu.org (full text, mbox):
On 2012-04-11 01:48, Lars Magne Ingebrigtsen wrote:
| Jari Aalto <jari.aalto <at> cante.net> writes:
|
| > The patch changes help option to lowercase -h like found e.g. in GNU
| > cp(1). The option help is also presented alphabetically.
|
| [larsi <at> stories ~/src/emacs/trunk]$ cp -h
| cp: invalid option -- 'h'
|
| So I don't think this change would be correct.
I remembered wrong. GNU uses --long options for cp(1) and mv(1); I
assume because it wanted to reserve all short options.
But almot universally lowercase -h, is understood as a synonym for
--help. At least for emacsclient that would work well as there are no
conflicting options[*].
The patch would also make the listing a little easier; alphabetical as
in GNU programs in general.
Jari
[*] -H and -h could have been taken to mean something else for
historical reasons in other programs.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 09 May 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 136 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.