GNU bug report logs - #8615
Please make sure v q removes the buffer for JPGs just like it does for other files

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Wed, 4 May 2011 18:18:01 UTC

Severity: minor

Tags: fixed

Merged with 6954

Done: Juri Linkov <juri <at> jurta.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 8615 in the body.
You can then email your comments to 8615 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 04 May 2011 18:18:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 May 2011 18:18:01 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: Please make sure v q removes the buffer for JPGs just like it does
	for other files
Date: Thu, 05 May 2011 02:16:42 +0800
Please make sure v q removes the buffer for JPGs just like it does for
text files, in dired. Yes this is a duplicate report.
You will notice all the JPGs you viewed still sitting there in your
buffer list.




Forcibly Merged 6954 8615. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 04 May 2011 19:14:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Mon, 04 Jul 2011 14:33:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 8615 <at> debbugs.gnu.org
Subject: Re: Please make sure v q removes the buffer for JPGs just like it
	does for other files
Date: Mon, 04 Jul 2011 16:31:50 +0200
jidanni <at> jidanni.org writes:

> Please make sure v q removes the buffer for JPGs just like it does for
> text files, in dired. Yes this is a duplicate report.  You will notice
> all the JPGs you viewed still sitting there in your buffer list.

The problem is this:

  (if (eq (with-current-buffer buffer
	    (get major-mode 'mode-class))
	  'special)
      (progn
	(switch-to-buffer buffer)
	(message "Not using View mode because the major mode is special"))


`view-mode' refuses to switch itself on if the mode is special, and
Image mode is apparently special.

Is there any particular reason for `view-mode' to refuse to switch
itself on in special modes?
        
-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Mon, 04 Jul 2011 17:46:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Mon, 04 Jul 2011 13:45:07 -0400
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> `view-mode' refuses to switch itself on if the mode is special, and
> Image mode is apparently special.
>
> Is there any particular reason for `view-mode' to refuse to switch
> itself on in special modes?

How does it make sense to visit image buffers in view mode?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 05 Jul 2011 01:48:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: cyd <at> stupidchicken.com
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 05 Jul 2011 09:47:39 +0800
>>>>> "CY" == Chong Yidong <cyd <at> stupidchicken.com> writes:
CY> Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

>> `view-mode' refuses to switch itself on if the mode is special, and
>> Image mode is apparently special.
>> 
>> Is there any particular reason for `view-mode' to refuse to switch
>> itself on in special modes?

CY> How does it make sense to visit image buffers in view mode?

So then the buffer will disappear when we hit "q"!




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 05 Jul 2011 03:45:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: jidanni <at> jidanni.org
Cc: 8615 <at> debbugs.gnu.org, cyd <at> stupidchicken.com, larsi <at> gnus.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Mon, 04 Jul 2011 23:44:22 -0400
>>> `view-mode' refuses to switch itself on if the mode is special, and
>>> Image mode is apparently special.
>>> 
>>> Is there any particular reason for `view-mode' to refuse to switch
>>> itself on in special modes?

CY> How does it make sense to visit image buffers in view mode?

> So then the buffer will disappear when we hit "q"!

That should happen even without using view-mode.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 05 Jul 2011 03:59:01 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: monnier <at> iro.umontreal.ca
Cc: 8615 <at> debbugs.gnu.org, cyd <at> stupidchicken.com, larsi <at> gnus.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 05 Jul 2011 11:58:41 +0800
>>>>> "SM" == Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>>> `view-mode' refuses to switch itself on if the mode is special, and
>>>> Image mode is apparently special.
>>>> 
>>>> Is there any particular reason for `view-mode' to refuse to switch
>>>> itself on in special modes?

CY> How does it make sense to visit image buffers in view mode?

>> So then the buffer will disappear when we hit "q"!

SM> That should happen even without using view-mode.

Well it doesn't in both cases.
$ emacs -q a_directory_full_of_jpgs
v q C-x C-b SPC <return> q C-x C-b
Note how the picture entries are both still disgustingly hanging around
there on the C-x C-b table.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 05 Jul 2011 13:38:03 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 8615 <at> debbugs.gnu.org, cyd <at> stupidchicken.com, monnier <at> iro.umontreal.ca
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 05 Jul 2011 15:35:12 +0200
jidanni <at> jidanni.org writes:

> Well it doesn't in both cases.
> $ emacs -q a_directory_full_of_jpgs
> v q C-x C-b SPC <return> q C-x C-b
> Note how the picture entries are both still disgustingly hanging around
> there on the C-x C-b table.

If having `view-mode' not being able to work in `special' modes (I don't
know why that is, but there's probably a reason?), then the `v' Dired
command could just bind the `q' command explicitly in all `special'
modes.

That is, it'd start the a tiny `dired-view-mode' in `special' modes,
where the only command it would bind would be `q'.

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 05 Jul 2011 15:05:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 8615 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 05 Jul 2011 11:04:03 -0400
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> If having `view-mode' not being able to work in `special' modes (I don't
> know why that is, but there's probably a reason?), then the `v' Dired
> command could just bind the `q' command explicitly in all `special'
> modes.
>
> That is, it'd start the a tiny `dired-view-mode' in `special' modes,
> where the only command it would bind would be `q'.

I prefer a more limited fix: bind `q' in Image mode to a command that
kills the buffer.  Better still, add an option to bury instead of kill.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 05 Jul 2011 15:08:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 8615 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 05 Jul 2011 17:07:29 +0200
Chong Yidong <cyd <at> stupidchicken.com> writes:

> I prefer a more limited fix: bind `q' in Image mode to a command that
> kills the buffer.  Better still, add an option to bury instead of kill.

Isn't burying a buffer the more common "quit"-like action in most modes?
I guess there's no real standard for that, so having `q' be
`kill-buffer' sounds OK to me.

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 05 Jul 2011 19:17:03 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 8615 <at> debbugs.gnu.org,
	jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 05 Jul 2011 15:06:20 -0400
>> I prefer a more limited fix: bind `q' in Image mode to a command that
>> kills the buffer.  Better still, add an option to bury instead of kill.

> Isn't burying a buffer the more common "quit"-like action in most modes?
> I guess there's no real standard for that, so having `q' be
> `kill-buffer' sounds OK to me.

AFAIK, usually `q' is bound to `quit-window'.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 05 Jul 2011 20:48:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 8615 <at> debbugs.gnu.org,
	jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 05 Jul 2011 22:47:16 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Isn't burying a buffer the more common "quit"-like action in most modes?
>> I guess there's no real standard for that, so having `q' be
>> `kill-buffer' sounds OK to me.
>
> AFAIK, usually `q' is bound to `quit-window'.

Which hides the window and buries the buffer.  But doesn't kill it, like
`view-mode' does.

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 06 Jul 2011 00:59:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 8615 <at> debbugs.gnu.org,
	jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 05 Jul 2011 20:58:16 -0400
>>> Isn't burying a buffer the more common "quit"-like action in most modes?
>>> I guess there's no real standard for that, so having `q' be
>>> `kill-buffer' sounds OK to me.
>> AFAIK, usually `q' is bound to `quit-window'.
> Which hides the window and buries the buffer.  But doesn't kill it, like
> `view-mode' does.

C-u q does.  And in any case, I was just describing the usual binding
used in special-modes, regardless of whether it behaves like view-mode.
FWIW, I find view-mode's behavior generally odd and hard to predict (as
a user), so I don't think it's crucial to always follow its lead.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Thu, 14 Jul 2011 14:03:09 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 8615 <at> debbugs.gnu.org,
	6954 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Thu, 14 Jul 2011 15:53:41 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> C-u q does.  And in any case, I was just describing the usual binding
> used in special-modes, regardless of whether it behaves like view-mode.
> FWIW, I find view-mode's behavior generally odd and hard to predict (as
> a user), so I don't think it's crucial to always follow its lead.

No, but it would be nice if `v' in dired always did the same thing with
`q'.

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Fri, 15 Jul 2011 21:28:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: larsi <at> gnus.org
Cc: 8615 <at> debbugs.gnu.org, cyd <at> stupidchicken.com, monnier <at> iro.umontreal.ca,
	6954 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Sat, 16 Jul 2011 05:27:06 +0800
Now broken even more in
emacs-snapshot:
  Installed: 1:20110705-1

$ emacs -Q a_directory_with_images
type v on an image
type q
Now guess what we are looking at?
Back to the directory?
No.
You folks buried it!
And the image is also buried, not killed, too!




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Fri, 15 Jul 2011 21:31:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 8615 <at> debbugs.gnu.org, cyd <at> stupidchicken.com, monnier <at> iro.umontreal.ca,
	6954 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Fri, 15 Jul 2011 23:30:16 +0200
jidanni <at> jidanni.org writes:

> Now broken even more in
> emacs-snapshot:
>   Installed: 1:20110705-1
>
> $ emacs -Q a_directory_with_images
> type v on an image
> type q
> Now guess what we are looking at?
> Back to the directory?
> No.
> You folks buried it!
> And the image is also buried, not killed, too!

I don't think anything has actually changed with the bug you reported,
but yeah, wow.  `q' popped to a totally different buffer than I
expected.

Is this a part of the switch-to-buffer/window thingie rework?

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Fri, 15 Jul 2011 22:58:04 GMT) Full text and rfc822 format available.

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

From: Christoph Scholtes <cschol2112 <at> googlemail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 8615 <at> debbugs.gnu.org, emacs-devel <at> gnu.org, cyd <at> stupidchicken.com,
	6954 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#6954: bug#8615: Please make sure v q removes the buffer for
	JPGs just like it does for other files
Date: Fri, 15 Jul 2011 16:57:34 -0600
On 7/15/2011 3:30 PM, Lars Magne Ingebrigtsen wrote:

>> $ emacs -Q a_directory_with_images
>> type v on an image
>> type q
>> Now guess what we are looking at?
>> Back to the directory?
>> No.
>> You folks buried it!
>> And the image is also buried, not killed, too!
>
> I don't think anything has actually changed with the bug you reported,
> but yeah, wow.  `q' popped to a totally different buffer than I
> expected.
>
> Is this a part of the switch-to-buffer/window thingie rework?

I can reproduce the described behavior with build from a couple of 
minutes ago.

According to describe-key, the `q' key is bound to quit-window. The `q' 
key should bury the buffer (image). `z' will kill it.

All of this is consistent with image-mode using special-mode map, which 
maps `q' to quit-window and `z' to kill buffer.

Not sure though, why `q' does not switch back to the dired buffer. It 
seems to put the dired buffer second in the buffer list and switch to 
the buffer which is first in the list.

Christoph







Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Fri, 15 Jul 2011 23:23:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: cschol2112 <at> googlemail.com
Cc: cyd <at> stupidchicken.com, larsi <at> gnus.org, 8615 <at> debbugs.gnu.org,
	6954 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#6954: bug#8615: Please make sure v q removes the buffer for
	JPGs just like it does for other files
Date: Sat, 16 Jul 2011 07:22:17 +0800
All I am asking is for the same actions for the same keys.
I'm willing to learn the new keys, as long as they are consistent.
Currently q and z act differently, depending on if one is viewing a
image vs. non image.

Even though both I got to via a "v" in dired.

CS> Not sure though, why `q' does not switch back to the dired buffer. It
CS> seems to put the dired buffer second in the buffer list and switch to
CS> the buffer which is first in the list.

That needs to be fixed too. That started last week.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Fri, 15 Jul 2011 23:36:03 GMT) Full text and rfc822 format available.

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

From: Christoph Scholtes <cschol2112 <at> googlemail.com>
To: jidanni <at> jidanni.org
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org, cyd <at> stupidchicken.com,
	6954 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#8615: bug#6954: bug#8615: Please make sure v q removes the
	buffer for JPGs just like it does for other files
Date: Fri, 15 Jul 2011 17:35:50 -0600
On 7/15/2011 5:22 PM, jidanni <at> jidanni.org wrote:
> All I am asking is for the same actions for the same keys.
> I'm willing to learn the new keys, as long as they are consistent.
> Currently q and z act differently, depending on if one is viewing a
> image vs. non image.
>
> Even though both I got to via a "v" in dired.

Most other files (all?) are opened in view-mode, which binds `q' and `z' 
differently. I think view-mode and special-mode need to agree on how to 
map certain keys, e.g. `q', i.e. common operations like quit or 
kill-buffer. Either by deriving view-mode from special-mode or matching 
the maps.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Fri, 15 Jul 2011 23:40:04 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Christoph Scholtes <cschol2112 <at> googlemail.com>
Cc: 8615 <at> debbugs.gnu.org, emacs-devel <at> gnu.org, cyd <at> stupidchicken.com,
	6954 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: bug#6954: bug#8615: Please make sure v q removes the
	buffer for JPGs just like it does for other files
Date: Sat, 16 Jul 2011 01:38:56 +0200
Christoph Scholtes <cschol2112 <at> googlemail.com> writes:

> Most other files (all?) are opened in view-mode, which binds `q' and
> z' differently. I think view-mode and special-mode need to agree on
> how to map certain keys, e.g. `q', i.e. common operations like quit or
> kill-buffer. Either by deriving view-mode from special-mode or
> matching the maps.

It's not a view-mode issue.

Open up a directory in dired.  Select a sub-directory.  Type `q'.  End
up in a buffer that wasn't the one you started in.

So `quit-window' and friends have apparently gotten a bit confused in
the last couple of days.

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sat, 16 Jul 2011 00:41:02 GMT) Full text and rfc822 format available.

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

From: Christoph Scholtes <cschol2112 <at> googlemail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 8615 <at> debbugs.gnu.org, emacs-devel <at> gnu.org, cyd <at> stupidchicken.com,
	6954 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#6954: bug#8615: bug#6954: bug#8615: Please make sure v q
	removes the buffer for JPGs just like it does for other files
Date: Fri, 15 Jul 2011 18:40:24 -0600
On 7/15/2011 5:38 PM, Lars Magne Ingebrigtsen wrote:
> Christoph Scholtes<cschol2112 <at> googlemail.com>  writes:
>
>> Most other files (all?) are opened in view-mode, which binds `q' and
>> z' differently. I think view-mode and special-mode need to agree on
>> how to map certain keys, e.g. `q', i.e. common operations like quit or
>> kill-buffer. Either by deriving view-mode from special-mode or
>> matching the maps.
>
> It's not a view-mode issue.

IMO, it is very much a view-mode issue. The original issue description 
states that v q should remove the image buffer, i.e. kill it. It will 
never do this, since image-mode uses special mode map, and special-mode 
buries on `q', whereas other modes use view-mode. view-mode does kill 
the buffer on q, but I believe exit-action has to be set correctly.

> Open up a directory in dired.  Select a sub-directory.  Type `q'.  End
> up in a buffer that wasn't the one you started in.
>
> So `quit-window' and friends have apparently gotten a bit confused in
> the last couple of days.

This is a separate issue and needs to be fixed.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sat, 16 Jul 2011 12:25:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: larsi <at> gnus.org
Cc: 8615 <at> debbugs.gnu.org, cyd <at> stupidchicken.com, monnier <at> iro.umontreal.ca,
	6954 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Sat, 16 Jul 2011 20:24:30 +0800
After years of using v q SPC v q SPC v q SPC to view photos in dired,
you fellows latest tinkering has really thrown a monkey wrench into my life.
Though I even in my previous letter promised to learn the new ways,
I am afraid that is no longer possible.
Therefore perhaps someone can provide me with a doctors prescription I
can put into .emacs, that would make v and q act like the good old days.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sat, 16 Jul 2011 13:12:04 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 8615 <at> debbugs.gnu.org, emacs-devel <at> gnu.org, cyd <at> stupidchicken.com,
	6954 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like	it does for other files
Date: Sat, 16 Jul 2011 15:11:38 +0200
>> $ emacs -Q a_directory_with_images
>> type v on an image
>> type q
>> Now guess what we are looking at?
>> Back to the directory?
>> No.
>> You folks buried it!
>> And the image is also buried, not killed, too!
>
> I don't think anything has actually changed with the bug you reported,
> but yeah, wow.  `q' popped to a totally different buffer than I
> expected.
>
> Is this a part of the switch-to-buffer/window thingie rework?

It is ;-)  As a matter of fact it's the combination of

(1) a bug in Emacs 23's `pop-to-buffer' causing it to _not_ reselect the
    selected window when it's used for displaying the buffer, and

(2) a recent change which had `find-file' use `pop-to-buffer' instead of
    `set-window-buffer'.

Hopefully fixed now (the bug in Emacs 23 remains unfixed since noone has
complained about it yet - after all `pop-to-buffer' was supposed to use
any but the selected window).

Thanks for complaining, martin




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sat, 16 Jul 2011 15:20:04 GMT) Full text and rfc822 format available.

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

From: Christoph Scholtes <cschol2112 <at> googlemail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: cyd <at> stupidchicken.com, 6954 <at> debbugs.gnu.org, jidanni <at> jidanni.org,
	Lars Magne Ingebrigtsen <larsi <at> gnus.org>, emacs-devel <at> gnu.org,
	8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like	it does for other files
Date: Sat, 16 Jul 2011 09:19:30 -0600
On 7/16/2011 7:11 AM, martin rudalics wrote:

> Hopefully fixed now (the bug in Emacs 23 remains unfixed since noone has
> complained about it yet - after all `pop-to-buffer' was supposed to use
> any but the selected window).

Now it behaves correctly on `q' and switches back to the dired buffer. 
Thanks for the fix.

However, the original issue reported is still not resolved. `q' buries 
the buffer and does not kill it, like it used to before special-mode was 
introduced.

Maybe Stefan or Chong can comment on whether this is to be regarded an 
issue or not.

I still think view-mode and special-mode need to be aligned in terms of 
these common actions.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sat, 16 Jul 2011 15:26:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Christoph Scholtes <cschol2112 <at> googlemail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, cyd <at> stupidchicken.com,
	8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like	it does for other files
Date: Sat, 16 Jul 2011 17:24:56 +0200
Christoph Scholtes <cschol2112 <at> googlemail.com> writes:

> I still think view-mode and special-mode need to be aligned in terms
> of these common actions.

What's the reason `view-mode' is inhibited for `special' modes?

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sun, 17 Jul 2011 02:11:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 8615 <at> debbugs.gnu.org,
	6954 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Sat, 16 Jul 2011 22:10:38 -0400
>> C-u q does.  And in any case, I was just describing the usual binding
>> used in special-modes, regardless of whether it behaves like view-mode.
>> FWIW, I find view-mode's behavior generally odd and hard to predict (as
>> a user), so I don't think it's crucial to always follow its lead.
> No, but it would be nice if `v' in dired always did the same thing
> with `q'.

Why?


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sun, 17 Jul 2011 02:25:03 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Chong Yidong <cyd <at> stupidchicken.com>, 8615 <at> debbugs.gnu.org,
	6954 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Sun, 17 Jul 2011 04:23:46 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> C-u q does.  And in any case, I was just describing the usual binding
>>> used in special-modes, regardless of whether it behaves like view-mode.
>>> FWIW, I find view-mode's behavior generally odd and hard to predict (as
>>> a user), so I don't think it's crucial to always follow its lead.
>> No, but it would be nice if `v' in dired always did the same thing
>> with `q'.
>
> Why?

If the user uses `v', they probably expects to see the article in view
mode.  If they didn't, they would have hit RET instead.

One of the things that `v' gives you is `q'.

QED.  :-)

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sun, 17 Jul 2011 02:28:04 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: monnier <at> iro.umontreal.ca
Cc: 8615 <at> debbugs.gnu.org, larsi <at> gnus.org, cyd <at> stupidchicken.com,
	6954 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Sun, 17 Jul 2011 10:27:48 +0800
>>>>> "SM" == Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> C-u q does.  And in any case, I was just describing the usual binding
>>> used in special-modes, regardless of whether it behaves like view-mode.
>>> FWIW, I find view-mode's behavior generally odd and hard to predict (as
>>> a user), so I don't think it's crucial to always follow its lead.
>> No, but it would be nice if `v' in dired always did the same thing
>> with `q'.

SM> Why?

Because when we hit q on a text file, it neatly disappears (from the
buffer list), whereas hitting q on an image file oddly leaves it sitting
on the buffer list, one look at which would shock one off ones chair --
my god how did I stuff emacs memory with all those images?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Mon, 18 Jul 2011 14:43:03 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Christoph Scholtes <cschol2112 <at> googlemail.com>, cyd <at> stupidchicken.com,
	8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like	it does for other files
Date: Mon, 18 Jul 2011 10:42:48 -0400
>> I still think view-mode and special-mode need to be aligned in terms
>> of these common actions.
> What's the reason `view-mode' is inhibited for `special' modes?

I think the problem here is that the notion of "special mode" is not
well defined.  Until recently I think it only applied to non-file modes,
so did not affect dired's `v'.

I'd tend to think that view-mode's refusal to run in special modes
should not apply to files.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 19 Jul 2011 15:04:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Christoph Scholtes <cschol2112 <at> googlemail.com>, cyd <at> stupidchicken.com,
	8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like	it does for other files
Date: Tue, 19 Jul 2011 17:03:03 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I'd tend to think that view-mode's refusal to run in special modes
> should not apply to files.

I've now altered `view-mode' to allow running in `special' modes that
are visiting a file.

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




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 19 Jul 2011 15:04:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 8615 <at> debbugs.gnu.org and jidanni <at> jidanni.org Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 19 Jul 2011 15:04:03 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 20 Jul 2011 15:10:04 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Christoph Scholtes <cschol2112 <at> googlemail.com>
Cc: 6954 <at> debbugs.gnu.org, emacs-devel <at> gnu.org,
	martin rudalics <rudalics <at> gmx.at>,
	Lars Magne Ingebrigtsen <larsi <at> gnus.org>, jidanni <at> jidanni.org,
	8615 <at> debbugs.gnu.org
Subject: Re: bug#6954: bug#8615: Please make sure v q removes the buffer for
	JPGs just like	it does for other files
Date: Wed, 20 Jul 2011 11:09:27 -0400
Christoph Scholtes <cschol2112 <at> googlemail.com> writes:

> `q' buries the buffer and does not kill it, like it used to before
> special-mode was introduced.
>
> I still think view-mode and special-mode need to be aligned in terms
> of these common actions.

I don't see why it's important for `q' to do exactly the same thing in
view-mode and special-mode.  It seems reasonable for `q' to bury the
buffer in special-mode, which knows nothing about what the inheriting
mode's buffers are for (so burying is safer than killing).  In
view-mode, killing the buffer is reasonable if we regard view-mode as a
"less"-like quick way to view and then discard a file, in which case it
would be a nuisance to keep the buffer around afterward.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 20 Jul 2011 15:41:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: cyd <at> stupidchicken.com
Cc: cschol2112 <at> googlemail.com, 6954 <at> debbugs.gnu.org, emacs-devel <at> gnu.org,
	rudalics <at> gmx.at, larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#6954: bug#8615: Please make sure v q removes the buffer for
	JPGs just like	it does for other files
Date: Wed, 20 Jul 2011 23:40:13 +0800
>>>>> "CY" == Chong Yidong <cyd <at> stupidchicken.com> writes:
CY> I don't see why it's important for `q' to do exactly the same thing in

Well as long as there is a way for me the user to put something in his
.emacs file to "make sure v q removes the buffer for JPGs just like it
does for other files". Also like xli(1)'s q too.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 18 Aug 2011 11:24:03 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Juri Linkov <juri <at> jurta.org> to control <at> debbugs.gnu.org. (Mon, 21 Nov 2011 23:34:01 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 24.1 and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 21 Nov 2011 23:35:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Mon, 21 Nov 2011 23:48:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 22 Nov 2011 01:45:03 +0200
This is a regression.  It makes special modes `image-mode', `archive-mode'
unusable when visited from dired because their keybindings are clobbered
with view's keybindings.

I propose to remove this regression by reverting revno#105285.
The original request was for something different.  The OP asked
for killing the image buffer with `q', not visiting it with `view-mode'.

There are different ways to do this properly.  One is to rebind `q'
to `kill-this-buffer' in `image-mode' (inherited from `special-mode-map').
This change will affect all users.

Or to document a way to do this individually with a customization like Stefan
demonstrated in http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg01136.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 00:49:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 22 Nov 2011 01:46:06 +0100
Juri Linkov <juri <at> jurta.org> writes:

> This is a regression.  It makes special modes `image-mode', `archive-mode'
> unusable when visited from dired because their keybindings are clobbered
> with view's keybindings.

That only happens if you use the `v' command instead of the ordinary
`RET' command to view these files, right?

If you're using the `v' command, you presumably want to see the files
using `view-mode', since that's what that command is supposed to do.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 01:13:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 22 Nov 2011 03:04:36 +0200
>> This is a regression.  It makes special modes `image-mode', `archive-mode'
>> unusable when visited from dired because their keybindings are clobbered
>> with view's keybindings.
>
> That only happens if you use the `v' command instead of the ordinary
> `RET' command to view these files, right?
>
> If you're using the `v' command, you presumably want to see the files
> using `view-mode', since that's what that command is supposed to do.

Like jidanni, I used to type `v q SPC v q SPC v q SPC' to browse files in Dired.
Now when images and archives are viewed with `v', keybindings overridden
by view.el are useless (except `q'), so functionality of these modes is broken.

It's a pain to be careful of using the right key for different kind of files:
to type `RET' to view images and archives, or to type `v' to view other files.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 05:46:01 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 22 Nov 2011 13:44:17 +0800
>>>>> "JL" == Juri Linkov <juri <at> jurta.org> writes:

JL> Like jidanni, I used to type `v q SPC v q SPC v q SPC' to browse files in Dired.
JL> Now when images and archives are viewed with `v', keybindings overridden
JL> by view.el are useless (except `q'), so functionality of these modes is broken.

JL> It's a pain to be careful of using the right key for different kind of files:
JL> to type `RET' to view images and archives, or to type `v' to view other files.

No need, everything seems to be working fine now with emacs -q in
Package: emacs-snapshot Version: 1:20111121-1

The only things left in the *Buffer List* after lots of v q SPC v q SPC
are directories... but I guess there is some reason to keep them laying around?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 16:30:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 22 Nov 2011 18:27:34 +0200
> JL> Like jidanni, I used to type `v q SPC v q SPC v q SPC' to browse files in Dired.
> JL> Now when images and archives are viewed with `v', keybindings overridden
> JL> by view.el are useless (except `q'), so functionality of these modes is broken.
>
> JL> It's a pain to be careful of using the right key for different kind of files:
> JL> to type `RET' to view images and archives, or to type `v' to view other files.
>
> No need, everything seems to be working fine now with emacs -q in
> Package: emacs-snapshot Version: 1:20111121-1

Do you view images with `v q SPC v q SPC'?  When viewing images with
`v', image-mode is broken because image viewing keybindings are rebound
to functions of view.el.

Perhaps you visit only small images that fit into the screen,
so you don't need to use image-mode keys other than `q'.
But when images are larger and you need to scroll them, you are screwed.

> The only things left in the *Buffer List* after lots of v q SPC v q SPC
> are directories... but I guess there is some reason to keep them laying around?

I have the same problem with directories, so I have in .emacs:

  (defun quit-window-kill-buffer ()
    "Quit WINDOW and kill its buffer."
    (interactive)
    (quit-window t))
  (define-key dired-mode-map "q" 'quit-window-kill-buffer)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 18:38:01 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 02:36:01 +0800
>>>>> "JL" == Juri Linkov <juri <at> jurta.org> writes:
JL> Perhaps you visit only small images that fit into the screen,
JL> so you don't need to use image-mode keys other than `q'.
JL> But when images are larger and you need to scroll them, you are screwed.
Hmmm, well the only difference I see is C-h m doesn't give a key list
... Also no key to reduce the size so an image fits in the buffer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 18:57:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 22 Nov 2011 20:51:52 +0200
> JL> Perhaps you visit only small images that fit into the screen,
> JL> so you don't need to use image-mode keys other than `q'.
> JL> But when images are larger and you need to scroll them, you are screwed.
> Hmmm, well the only difference I see is C-h m doesn't give a key list

You can see the difference with `C-h b'.  Then you will see:

  RET		image-toggle-animation
  SPC		image-scroll-up
  DEL		image-scroll-down

vs.

  RET		View-scroll-line-forward
  SPC		View-scroll-page-forward
  DEL		View-scroll-page-backward

> ... Also no key to reduce the size so an image fits in the buffer.

`image-scale-fit-height' is intended to be bound to `c f h' in
`image-transform-mode', but for some reason it's commented out.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 19:05:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 03:02:49 +0800
>>>>> "JL" == Juri Linkov <juri <at> jurta.org> writes:
JL> You can see the difference with `C-h b'.
OK, but usually we look in C-h m... anyway I was doing OK with the
arrow keys.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 22:44:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 00:39:34 +0200
> The only things left in the *Buffer List* after lots of v q SPC v q SPC
> are directories... but I guess there is some reason to keep them laying around?

Following the same strict logic, typing `v' on a directory should enable
`view-mode' in Dired mode, so jidanni could use `q' to kill Dired buffers.
Of course, this makes no sense, like it makes no sense to enable
`view-mode' in Archive mode that is very similar to Dired mode.

So I see only one way to resolve this situation it to revert the regression
(another reason to do that is that logic of enabling `view-mode' should be
the same as in `toggle-read-only' that checks only for special mode,
not for `buffer-file-name').

As for the request for `q' to kill Dired and Image buffers,
we could recommend jidanni to put in his .emacs these two lines:

  (global-set-key [remap quit-window]
    (lambda () (interactive) (quit-window (not current-prefix-arg))))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 22 Nov 2011 23:38:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 07:35:34 +0800
>>>>> "JL" == Juri Linkov <juri <at> jurta.org> writes:
JL> As for the request for `q' to kill Dired and Image buffers,
JL> we could recommend jidanni to put in his .emacs these two lines:

JL>   (global-set-key [remap quit-window]
JL>     (lambda () (interactive) (quit-window (not current-prefix-arg))))
Yes but I only use emacs for a max of four hours, so it doesn't fill up
so bad, I just thought it might be a bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 23 Nov 2011 06:21:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 14:18:30 +0800
Juri Linkov <juri <at> jurta.org> writes:

> Do you view images with `v q SPC v q SPC'?  When viewing images with
> `v', image-mode is broken because image viewing keybindings are rebound
> to functions of view.el.

Which keybindings are you referring to?  Just the `q' (quit-window vs
View-quit) key, or more?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 23 Nov 2011 07:27:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: Chong Yidong <cyd <at> gnu.org>
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 09:20:23 +0200
>> Do you view images with `v q SPC v q SPC'?  When viewing images with
>> `v', image-mode is broken because image viewing keybindings are rebound
>> to functions of view.el.
>
> Which keybindings are you referring to?  Just the `q' (quit-window vs
> View-quit) key, or more?

I mean keybindings

  RET		image-toggle-animation
  SPC		image-scroll-up
  DEL		image-scroll-down

vs

  RET		View-scroll-line-forward
  SPC		View-scroll-page-forward
  DEL		View-scroll-page-backward

As for `q', I don't understand why `quit-window' should differ from `View-quit'.
Why does `q' bound to `View-quit' kill the buffer, while `quit-window'
bound to `q' doesn't?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 23 Nov 2011 10:43:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 8615 <at> debbugs.gnu.org, Chong Yidong <cyd <at> gnu.org>, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 11:40:07 +0100
Juri Linkov <juri <at> jurta.org> writes:

> As for `q', I don't understand why `quit-window' should differ from
> `View-quit'.  Why does `q' bound to `View-quit' kill the buffer, while
> `quit-window' bound to `q' doesn't?

I thought the point of "view mode" was to give you a mode for, well,
quick viewing.  In that context it makes perfect sense for `q' to kill
the buffer.  If you're using a regular non-view mode, having `q' kill
the buffer would be odd.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 23 Nov 2011 14:13:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Juri Linkov <juri <at> jurta.org>, 8615 <at> debbugs.gnu.org,
	Chong Yidong <cyd <at> gnu.org>, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 09:10:47 -0500
>> As for `q', I don't understand why `quit-window' should differ from
>> `View-quit'.  Why does `q' bound to `View-quit' kill the buffer, while
>> `quit-window' bound to `q' doesn't?

> I thought the point of "view mode" was to give you a mode for, well,
> quick viewing.  In that context it makes perfect sense for `q' to kill
> the buffer.  If you're using a regular non-view mode, having `q' kill
> the buffer would be odd.

Using "view mode" as the deciding factor is wrong.  The "quick viewing"
meaning is bound to the use of "v" is dired, not to the use of
view-mode.  So maybe the right solution is to make view-mode use
quit-window, change quit-window so it obeys a `quit-window-kills'
variable (which toggles the meaning of C-u), and change dired's v to set
quit-window-kills buffer-locally?

I'm sure it's the right behavior: I do think that we want to move
towards merging View-quit and quit-window, but other than that I don't
know because I like my Emacs to accumulate buffers.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 23 Nov 2011 19:53:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Juri Linkov <juri <at> jurta.org>, 8615 <at> debbugs.gnu.org,
	Chong Yidong <cyd <at> gnu.org>, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 14:51:15 -0500
> I'm sure it's the right behavior: I do think that we want to move
    ^^^
    not

Sorry,

         Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 23 Nov 2011 20:06:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>, Chong Yidong <cyd <at> gnu.org>,
	8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Wed, 23 Nov 2011 22:00:51 +0200
> I'm not sure it's the right behavior: I do think that we want to move
> towards merging View-quit and quit-window, but other than that I don't
> know because I like my Emacs to accumulate buffers.

That's the main problem: some users like to accumulate buffers
and some users don't like.  So there should be an option to disable
accumulating by `q'.  One variant is remap such as you recommended in
http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg01136.html
Another variant is adding a defcustom such as `quit-window-kills'.
It seems defcustom is more user-friendly.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 23 Nov 2011 20:58:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juri Linkov'" <juri <at> jurta.org>,
	"'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 'Chong Yidong' <cyd <at> gnu.org>,
	8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: RE: bug#8615: Please make sure v q removes the buffer for JPGs just
	likeit does for other files
Date: Wed, 23 Nov 2011 12:55:43 -0800
> > because I like my Emacs to accumulate buffers.
> 
> That's the main problem: some users like to accumulate buffers
> and some users don't like.  So there should be an option to disable
> accumulating by `q'.  One variant is remap such as you recommended in
> http://lists.gnu.org/archive/html/emacs-devel/2011-10/msg01136.html
> Another variant is adding a defcustom such as `quit-window-kills'.
> It seems defcustom is more user-friendly.

Another distinction that it might help to make here is the kind of buffer and
its purpose.  I have no problem accumulating buffers, in general, but I have no
need to accumulate buffers that are essentially temporary and part of a dialog,
once that dialog is finished.

Emacs currently displays some buffers as part of a (non-modal) dialog, but there
is no real (operational, code-aware) notion of such a dialog, and generally no
way for the code to know that the displayed buffer is no longer needed after the
dialog is finished (if the code even knows when it is finished).  Such a buffer
is really only for temporary display, but it is not handled using any simple
construct such as `with-temp-buffer'.  (A user will know, of course, and one
approach could be to have two different keys, one that blows the buffer away and
another that holds onto it.)

If this rings a bell, fine.  If not, fuggeddabowdit - I'm not interested in
belaboring this; we've been through it before.

I agree that a reasonable start would be a user option, as Juri suggests (and
has been suggested before) - some way for a user to express a preference.  "I
like my Emacs to accumulate buffers" is fine as an expression of individual
preference, but not as a guide to Emacs design for everyone.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Wed, 23 Nov 2011 21:29:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8615 <at> debbugs.gnu.org, 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>,
	'Chong Yidong' <cyd <at> gnu.org>,
	'Stefan Monnier' <monnier <at> iro.umontreal.ca>, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	likeit does for other files
Date: Wed, 23 Nov 2011 23:18:35 +0200
> Another distinction that it might help to make here is the kind of buffer and
> its purpose.  I have no problem accumulating buffers, in general, but I have no
> need to accumulate buffers that are essentially temporary and part of a dialog,
> once that dialog is finished.

I have problems with accumulating buffers because I use desktop.el
that remembers all file buffers and tries to restore them after restart.
Other users may have other problems with accumulating buffers.
I solved this problem for myself by adding to .emacs:

(define-key image-mode-map "q" 'quit-window-kill-buffer)
(define-key archive-mode-map "q" 'quit-window-kill-buffer)
(define-key tar-mode-map "q" 'quit-window-kill-buffer)
(define-key dired-mode-map "q" 'quit-window-kill-buffer)

Of course, we should not suggest users doing the same.
So perhaps a defcustom would be the best solution.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Thu, 24 Nov 2011 02:17:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 'Chong Yidong' <cyd <at> gnu.org>,
	8615 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>,
	jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	likeit does for other files
Date: Wed, 23 Nov 2011 21:14:58 -0500
> I have problems with accumulating buffers because I use desktop.el
> that remembers all file buffers and tries to restore them after restart.
> Other users may have other problems with accumulating buffers.
> I solved this problem for myself by adding to .emacs:

> (define-key image-mode-map "q" 'quit-window-kill-buffer)
> (define-key archive-mode-map "q" 'quit-window-kill-buffer)
> (define-key tar-mode-map "q" 'quit-window-kill-buffer)
> (define-key dired-mode-map "q" 'quit-window-kill-buffer)

(define-key special-mode-map "q" 'quit-window-kill-buffer)

should be sufficient (tho I haven't checked that all the modes above
inherit from special-mode).


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Thu, 24 Nov 2011 06:15:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: larsi <at> gnus.org, 8615 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Thu, 24 Nov 2011 14:13:15 +0800
Juri Linkov <juri <at> jurta.org> writes:

> I mean keybindings
>
>   RET		image-toggle-animation
>   SPC		image-scroll-up
>   DEL		image-scroll-down
>
> vs
>
>   RET		View-scroll-line-forward
>   SPC		View-scroll-page-forward
>   DEL		View-scroll-page-backward

Hmm, SPC and DEL seem to do pretty much the same thing in both cases,
but the difference for RET is clearly problematic.

So I think you're right, we should revert 105285.  The original behavior
requested by the OP (making `q' delete the buffer) can be handled, as
discussed, by introducing an option to make quit-window delete the
buffer---but that bit can wait till post-24.1.




Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Thu, 24 Nov 2011 07:14:02 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Thu, 24 Nov 2011 07:14:02 GMT) Full text and rfc822 format available.

Message #172 received at 8615-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Chong Yidong <cyd <at> gnu.org>
Cc: larsi <at> gnus.org, 8615-done <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Thu, 24 Nov 2011 09:10:45 +0200
> So I think you're right, we should revert 105285.

Done.

> The original behavior requested by the OP (making `q' delete the
> buffer) can be handled, as discussed, by introducing an option to make
> quit-window delete the buffer---but that bit can wait till post-24.1.

Meanwhile, jidanni and other users could use a redefinition
recommended by Stefan:

(global-set-key [remap quit-window]
  (lambda () (interactive) (quit-window (not current-prefix-arg))))

or

(define-key special-mode-map "q"
  (lambda () (interactive) (quit-window (not current-prefix-arg))))




Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Thu, 24 Nov 2011 07:14:02 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Thu, 24 Nov 2011 07:14:02 GMT) Full text and rfc822 format available.

Message #178 received at 8615-done <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: larsi <at> gnus.org, cyd <at> gnu.org, 8615-done <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Thu, 24 Nov 2011 15:43:32 +0800
JL> Meanwhile, jidanni and other users could use a redefinition
JL> recommended by Stefan:
Well OK I'll try it next weekly Debian snapshot.




Message #179 received at 8615-done <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: larsi <at> gnus.org, cyd <at> gnu.org, 8615-done <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Thu, 08 Dec 2011 05:20:40 +0800
>>>>> "JL" == Juri Linkov <juri <at> jurta.org> writes:
JL> (global-set-key [remap quit-window]
JL>   (lambda () (interactive) (quit-window (not current-prefix-arg))))
Wait, this is already ruining my life,
   Buffer "*compilation*" has a running process; kill it? (yes or no)
I only want viewing of images, and OK maybe directories too to disappear
from the buffer list upon 'q'. The rest is overkill. I like the
*compilation* buffer etc. to stay around even if no running process. Help.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Thu, 08 Dec 2011 09:04:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: larsi <at> gnus.org, cyd <at> gnu.org, 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Thu, 08 Dec 2011 11:01:04 +0200
> I only want viewing of images, and OK maybe directories too to disappear
> from the buffer list upon 'q'. The rest is overkill. I like the
> *compilation* buffer etc. to stay around even if no running process. Help.

Then bind them separately:

(eval-after-load "image-mode"
  '(progn
     (define-key image-mode-map "q"
       (lambda () (interactive) (quit-window (not current-prefix-arg))))))

(eval-after-load "dired"
  '(progn
     (define-key dired-mode-map "q"
       (lambda () (interactive) (quit-window (not current-prefix-arg))))))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Sat, 10 Dec 2011 10:25:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Sat, 10 Dec 2011 18:17:06 +0800
Erg... this is what I have so far,

(eval-after-load "image-mode"
  '(progn
     (define-key image-mode-map "q"
       (lambda () (interactive) (quit-window (not current-prefix-arg))))));bug#8615
(eval-after-load "dired"
  '(progn
     (define-key dired-mode-map "q"
       (lambda () (interactive) (quit-window (not current-prefix-arg))))))
(eval-after-load "arc-mode"
  '(progn
     (define-key archive-mode-map "q";note the difference from the library name
       (lambda () (interactive) (quit-window (not current-prefix-arg))))))

i.e., an ever growing list. OK, I give up, you win. I'll use

(global-set-key [remap quit-window]
  (lambda () (interactive) (quit-window (not current-prefix-arg))))

But please tell me how to then restore the virgin "q" behavior for one or two
modes, e.g.,

(eval-after-load "compile"
  '(progn
     (define-key compilation-mode-map ... ???

I tired several things but nothing worked. Perhaps the "remap" above
ruined it for everything.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Tue, 13 Dec 2011 07:15:02 GMT) Full text and rfc822 format available.

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

From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Tue, 13 Dec 2011 00:12:49 -0700
On 12/10/11 3:17 AM, jidanni <at> jidanni.org wrote:
> Erg... this is what I have so far,
>
> (eval-after-load "image-mode"
>    '(progn
>       (define-key image-mode-map "q"
>         (lambda () (interactive) (quit-window (not current-prefix-arg))))));bug#8615
> (eval-after-load "dired"
>    '(progn
>       (define-key dired-mode-map "q"
>         (lambda () (interactive) (quit-window (not current-prefix-arg))))))
> (eval-after-load "arc-mode"
>    '(progn
>       (define-key archive-mode-map "q";note the difference from the library name
>         (lambda () (interactive) (quit-window (not current-prefix-arg))))))
>
> i.e., an ever growing list. OK, I give up, you win. I'll use
>
> (global-set-key [remap quit-window]
>    (lambda () (interactive) (quit-window (not current-prefix-arg))))
>
> But please tell me how to then restore the virgin "q" behavior for one or two
> modes, e.g.,
>
> (eval-after-load "compile"
>    '(progn
>       (define-key compilation-mode-map ... ???
>
> I tired several things but nothing worked. Perhaps the "remap" above
> ruined it for everything.

Just a guess, assuming that the original behavior is (quit-window 
current-prefix-arg):

(defvar remap-quit-window-exceptions '()
  "List of `major-mode' symbols in which `quit-window' should not be remapped.")

(global-set-key [remap quit-window]
   (lambda () (interactive)
     (if (memq major-mode remap-quit-window-exceptions)
	 (quit-window current-prefix-arg)
       (quit-window (not current-prefix-arg)))))

;; (setq remap-quit-window-exceptions
;;       (cons 'compilation-mode remap-quit-window-exceptions))

-- 
Kevin Rodgers
Denver, Colorado, USA





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8615; Package emacs. (Thu, 15 Dec 2011 21:45:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: 8615 <at> debbugs.gnu.org
Subject: Re: bug#8615: Please make sure v q removes the buffer for JPGs just
	like it does for other files
Date: Thu, 15 Dec 2011 23:30:55 +0200
> (eval-after-load "compile"
>   '(progn
>      (define-key compilation-mode-map ... ???
>
> I tired several things but nothing worked. Perhaps the "remap" above
> ruined it for everything.

You could try:

(define-key special-mode-map "q"
  (lambda () (interactive) (quit-window (not current-prefix-arg))))

(eval-after-load "compile"
  '(progn
     (define-key compilation-mode-map "q" 'quit-window)))

PS:
This means that in 24.2 we should add two customizable options:
one with a list of modes to remap, and one with a list of modes
to exclude from remapping.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Jan 2012 12:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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