GNU bug report logs - #11977
23.2; F5 and revert without confirmation

Previous Next

Package: emacs;

Reported by: Romain TROIT <romain.troit <at> aviation-civile.gouv.fr>

Date: Wed, 18 Jul 2012 15:39:01 UTC

Severity: wishlist

Tags: wontfix

Found in version 23.2

Done: Chong Yidong <cyd <at> gnu.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 11977 in the body.
You can then email your comments to 11977 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#11977; Package emacs. (Wed, 18 Jul 2012 15:39:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Romain TROIT <romain.troit <at> aviation-civile.gouv.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 18 Jul 2012 15:39:01 GMT) Full text and rfc822 format available.

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

From: Romain TROIT <romain.troit <at> aviation-civile.gouv.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.2; F5 and revert without confirmation
Date: Wed, 18 Jul 2012 14:41:56 +0200
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug.  If you can, give
a recipe starting from `emacs -Q':



Hello,
This piece of code should really be part of emacs defaults !
Best regards, and thanks for emacs.
William

(defun revert-buffer-no-confirm ()
    "Revert buffer without confirmation."
    (interactive) (revert-buffer t t))
(define-key global-map [f5] 'revert-buffer-no-confirm)






If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/23.2/etc/DEBUG.


In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-12-11 on raven, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
configured using `configure  '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  show-paren-mode: t
  tooltip-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-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<down-mouse-1> <mouse-1> <escape> x e m a c s <tab> 
r e <tab> p <tab> <tab> o r <tab> t - b u g <return> 
<escape> <escape> <escape> <escape> x r e p o r <tab> 
<return>

Recent messages:
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50git-core.el (source)...done
Loading /etc/emacs/site-start.d/50ocaml-mode.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/emacs/site-start.d/51tuareg-mode.el (source)...done
*** Reading .emacs and ~/Emacs ***
Loading paren...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit

Load-path shadows:
/usr/share/emacs/23.2/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs/23.2/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs/23.2/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs/23.2/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs/23.2/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs/23.2/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs/23.2/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs/23.2/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs/23.2/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs/23.2/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs/23.2/site-lisp/auctex/tex-fptex hides /usr/share/emacs/site-lisp/auctex/tex-fptex
/usr/share/emacs/23.2/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs/23.2/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs/23.2/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs/23.2/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs/23.2/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs/23.2/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs/23.2/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs/23.2/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/23.2/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.2/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.2/lisp/textmodes/ispell

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug paren
cus-start cus-load eurocat-asf-mode opas-arts-config-mode
opas-tma-points-mode opas-traj-mode opas-tma-proc-mode devhelp
preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11977; Package emacs. (Wed, 18 Jul 2012 15:58:01 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Romain TROIT'" <romain.troit <at> aviation-civile.gouv.fr>,
	<11977 <at> debbugs.gnu.org>
Subject: RE: bug#11977: 23.2; F5 and revert without confirmation
Date: Wed, 18 Jul 2012 08:51:25 -0700
> This piece of code should really be part of emacs defaults !
> 
> (defun revert-buffer-no-confirm ()
>     "Revert buffer without confirmation."
>     (interactive) (revert-buffer t t))
> (define-key global-map [f5] 'revert-buffer-no-confirm)

+1, at least for adding the definition.

FWIW, that's exactly the code I have in misc-cmds.el.

Wrt binding f5 by default:

Emacs Dev generally avoids binding function keys by default, as it should.  But
they have already created default bindings for some function keys (they should
*not* have, IMHO).

Also, function keys are repeatable keys (just hold one down to repeat it), and
as such they should generally be used for repeatable commands.  We should
generally put commands (such as buffer reverting) that are typically not
repeated on other key sequences, and not waste repeatable keys on them.

But this binding could be made by default on MS Windows perhaps.  On that
platform f5 is revert/update/refresh for applications generally.

(Personally/FWIW, I bind it to f5 on all platforms.)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11977; Package emacs. (Wed, 18 Jul 2012 23:03:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: drew.adams <at> oracle.com
Cc: 11977 <at> debbugs.gnu.org, romain.troit <at> aviation-civile.gouv.fr
Subject: Re: bug#11977: 23.2; F5 and revert without confirmation
Date: Thu, 19 Jul 2012 02:55:53 +0400
"Drew Adams" <drew.adams <at> oracle.com> writes:

>> This piece of code should really be part of emacs defaults !
>>
>> (defun revert-buffer-no-confirm ()
>>     "Revert buffer without confirmation."
>>     (interactive) (revert-buffer t t))
>> (define-key global-map [f5] 'revert-buffer-no-confirm)
>
> +1, at least for adding the definition.

Personally, I don't think it's a good suggestion:

1. A user might stumble on the command accidentally (that's what the
confirmation is for).

2. (define-key global-map [f5] 'revert-buffer-no-confirm)

is not that much shorter than

  (define-key global-map [f5] (lambda () (interactive) (revert-buffer t 
t)))

--Dmitry




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11977; Package emacs. (Wed, 18 Jul 2012 23:20:01 GMT) Full text and rfc822 format available.

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

From: Christopher Schmidt <christopher <at> ch.ristopher.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#11977: 23.2; F5 and revert without confirmation
Date: Thu, 19 Jul 2012 00:13:00 +0100 (BST)
Dmitry Gutov <dgutov <at> yandex.ru> writes:
[...]
> 2. (define-key global-map [f5] 'revert-buffer-no-confirm)
>
> is not that much shorter than
>
>   (define-key global-map [f5] (lambda () (interactive) (revert-buffer t t)))

C-h k <f5>, C-h b and friends won't display much helpful information in
this case.

I don't think that any key should be bound to revert-buffer without
confirmation.  It is too easy to hit the key by accident.

        Christopher




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11977; Package emacs. (Sat, 21 Jul 2012 21:17:08 GMT) Full text and rfc822 format available.

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

From: Romain Troit <romain.troit <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 11977 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#11977: 23.2; F5 and revert without confirmation
Date: Thu, 19 Jul 2012 22:14:21 +0200
Le 19/07/2012 00:55, Dmitry Gutov a écrit :
> "Drew Adams" <drew.adams <at> oracle.com> writes:
>
> >> This piece of code should really be part of emacs defaults !
> >>
> >> (defun revert-buffer-no-confirm ()
> >>     "Revert buffer without confirmation."
> >>     (interactive) (revert-buffer t t))
> >> (define-key global-map [f5] 'revert-buffer-no-confirm)
> >
> > +1, at least for adding the definition.
>
> Personally, I don't think it's a good suggestion:
>
> 1. A user might stumble on the command accidentally (that's what the
> confirmation is for).
>
> 2. (define-key global-map [f5] 'revert-buffer-no-confirm)
>
> is not that much shorter than
>
>   (define-key global-map [f5] (lambda () (interactive) (revert-buffer 
> t t)))
2 : No indeed, it not much longer, but only you knows how to do this 
(and me now!)

Regards,

William




Added tag(s) wontfix. Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 02 Sep 2012 04:17:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 11977 <at> debbugs.gnu.org and Romain TROIT <romain.troit <at> aviation-civile.gouv.fr> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 02 Sep 2012 04:17:01 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. (Sun, 30 Sep 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 263 days ago.

Previous Next


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