unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
       [not found] ` <8762n3z13p.fsf@jidanni.org>
@ 2011-07-15 21:30   ` Lars Magne Ingebrigtsen
  2011-07-15 22:57     ` bug#6954: " Christoph Scholtes
  2011-07-16 13:11     ` martin rudalics
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-15 21:30 UTC (permalink / raw)
  To: jidanni; +Cc: 8615, cyd, monnier, 6954, emacs-devel

jidanni@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/



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

* Re: bug#6954: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
  2011-07-15 21:30   ` bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files Lars Magne Ingebrigtsen
@ 2011-07-15 22:57     ` Christoph Scholtes
       [not found]       ` <8762pqnxf9.fsf@jidanni.org>
  2011-07-16 13:11     ` martin rudalics
  1 sibling, 1 reply; 11+ messages in thread
From: Christoph Scholtes @ 2011-07-15 22:57 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 8615, emacs-devel, cyd, 6954, jidanni

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






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

* bug#8615: bug#6954: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
       [not found]       ` <8762pqnxf9.fsf@jidanni.org>
@ 2011-07-15 23:22         ` jidanni
  2011-07-15 23:35           ` Christoph Scholtes
  0 siblings, 1 reply; 11+ messages in thread
From: jidanni @ 2011-07-15 23:22 UTC (permalink / raw)
  To: cschol2112; +Cc: 8615, cyd, larsi, 6954, emacs-devel

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.





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

* Re: bug#8615: bug#6954: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
  2011-07-15 23:22         ` bug#8615: " jidanni
@ 2011-07-15 23:35           ` Christoph Scholtes
  2011-07-15 23:38             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Scholtes @ 2011-07-15 23:35 UTC (permalink / raw)
  To: jidanni; +Cc: larsi, 8615, cyd, 6954, emacs-devel

On 7/15/2011 5:22 PM, jidanni@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.




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

* Re: bug#8615: bug#6954: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
  2011-07-15 23:35           ` Christoph Scholtes
@ 2011-07-15 23:38             ` Lars Magne Ingebrigtsen
  2011-07-16  0:40               ` bug#6954: " Christoph Scholtes
  2011-07-16 12:47               ` Antoine Levitt
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-15 23:38 UTC (permalink / raw)
  To: Christoph Scholtes; +Cc: 8615, emacs-devel, cyd, 6954, jidanni

Christoph Scholtes <cschol2112@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/



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

* 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
  2011-07-15 23:38             ` Lars Magne Ingebrigtsen
@ 2011-07-16  0:40               ` Christoph Scholtes
  2011-07-16 12:47               ` Antoine Levitt
  1 sibling, 0 replies; 11+ messages in thread
From: Christoph Scholtes @ 2011-07-16  0:40 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 8615, emacs-devel, cyd, 6954, jidanni

On 7/15/2011 5:38 PM, Lars Magne Ingebrigtsen wrote:
> Christoph Scholtes<cschol2112@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.




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

* Re: bug#8615: bug#6954: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
  2011-07-15 23:38             ` Lars Magne Ingebrigtsen
  2011-07-16  0:40               ` bug#6954: " Christoph Scholtes
@ 2011-07-16 12:47               ` Antoine Levitt
  1 sibling, 0 replies; 11+ messages in thread
From: Antoine Levitt @ 2011-07-16 12:47 UTC (permalink / raw)
  To: emacs-devel

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

16/07/11 01:38, Lars Magne Ingebrigtsen
> Christoph Scholtes <cschol2112@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.

I'm not 100% sure that's related, but the ordering in (buffer-list) has
changed recently.

I think there's a bug that the order of (buffer-list) is sometimes not
modified when switching buffers. I attach a piece of code I use to
quickly switch buffers, with debug info printing the first buffers in
(buffer-list). The order of (buffer-list) is not modified when I press
s-tab, but it is when I M-x switch-to-most-recent-buffer. This result in
this code behaving in weird ways on recent versions of emacs. It used to
be fine a few days ago (if this bug proves hard to track, I'm willing to
bisect).

I'll report this as a separate bug if this turns out to be unrelated.


[-- Attachment #2: test.el --]
[-- Type: application/emacs-lisp, Size: 879 bytes --]

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

* Re: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
  2011-07-15 21:30   ` bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files Lars Magne Ingebrigtsen
  2011-07-15 22:57     ` bug#6954: " Christoph Scholtes
@ 2011-07-16 13:11     ` martin rudalics
  2011-07-16 15:19       ` Christoph Scholtes
  1 sibling, 1 reply; 11+ messages in thread
From: martin rudalics @ 2011-07-16 13:11 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 8615, emacs-devel, cyd, 6954, jidanni

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



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

* Re: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
  2011-07-16 13:11     ` martin rudalics
@ 2011-07-16 15:19       ` Christoph Scholtes
  2011-07-20 15:09         ` bug#6954: " Chong Yidong
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Scholtes @ 2011-07-16 15:19 UTC (permalink / raw)
  To: martin rudalics
  Cc: cyd, 6954, jidanni, Lars Magne Ingebrigtsen, emacs-devel, 8615

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.



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

* Re: bug#6954: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
  2011-07-16 15:19       ` Christoph Scholtes
@ 2011-07-20 15:09         ` Chong Yidong
       [not found]           ` <87eidfar8r.fsf@jidanni.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Chong Yidong @ 2011-07-20 15:09 UTC (permalink / raw)
  To: Christoph Scholtes
  Cc: 6954, emacs-devel, martin rudalics, Lars Magne Ingebrigtsen,
	jidanni, 8615

Christoph Scholtes <cschol2112@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.



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

* bug#6954: bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files
       [not found]           ` <87eidfar8r.fsf@jidanni.org>
@ 2011-07-20 15:40             ` jidanni
  0 siblings, 0 replies; 11+ messages in thread
From: jidanni @ 2011-07-20 15:40 UTC (permalink / raw)
  To: cyd; +Cc: cschol2112, 6954, emacs-devel, larsi, 8615

>>>>> "CY" == Chong Yidong <cyd@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.





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

end of thread, other threads:[~2011-07-20 15:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <m3mxgh6k9m.fsf@quimbies.gnus.org>
     [not found] ` <8762n3z13p.fsf@jidanni.org>
2011-07-15 21:30   ` bug#8615: Please make sure v q removes the buffer for JPGs just like it does for other files Lars Magne Ingebrigtsen
2011-07-15 22:57     ` bug#6954: " Christoph Scholtes
     [not found]       ` <8762pqnxf9.fsf@jidanni.org>
2011-07-15 23:22         ` bug#8615: " jidanni
2011-07-15 23:35           ` Christoph Scholtes
2011-07-15 23:38             ` Lars Magne Ingebrigtsen
2011-07-16  0:40               ` bug#6954: " Christoph Scholtes
2011-07-16 12:47               ` Antoine Levitt
2011-07-16 13:11     ` martin rudalics
2011-07-16 15:19       ` Christoph Scholtes
2011-07-20 15:09         ` bug#6954: " Chong Yidong
     [not found]           ` <87eidfar8r.fsf@jidanni.org>
2011-07-20 15:40             ` jidanni

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

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

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