unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10133: 24.0.91; mark-active
@ 2011-11-25 14:15 Richard Copley
  2011-11-25 14:30 ` bug#10133: (24.0.91; mark-active) Richard Copley
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Copley @ 2011-11-25 14:15 UTC (permalink / raw)
  To: 10133

The value of mark-active isn't always correct. (I first noticed this
when I typed `d' in a vc-log-view buffer and got the diff between the
revisions at point and mark, not the diff for the change at point.)

From `emacs -Q',

M-x transient-mark-mode <return>
=> Transient-Mark mode disabled

M-: mark-active <return>
=> nil

C-SPC
=> Mark set

M-: mark-active <return>
=> t


In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600)
 of 2011-11-25 on 57172UHB
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.6) --cflags -fno-omit-frame-pointer'

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: ENG
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-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-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
M-x t r a n s i e n t - m a r k - m o d e <return>
M-: m a r k - a c t i v e <return> C-SPC M-: m a r
k - a c t i v e <return> M-x r e p o r t - e m a c
s - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Transient-Mark mode disabled
nil
Mark set
t

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug cus-start cus-load time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar 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 minibuffer button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
multi-tty emacs)





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

* bug#10133: (24.0.91; mark-active)
  2011-11-25 14:15 bug#10133: 24.0.91; mark-active Richard Copley
@ 2011-11-25 14:30 ` Richard Copley
  2011-11-29  2:54   ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Copley @ 2011-11-25 14:30 UTC (permalink / raw)
  To: 10133

Ah, I see that `mark-active' isn't quite what I thought it was. I
guess the bug is that the functions in "log-view.el" should be using
`use-region-p' or `region-active-p' rather than `mark-active'.





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

* bug#10133: (24.0.91; mark-active)
  2011-11-25 14:30 ` bug#10133: (24.0.91; mark-active) Richard Copley
@ 2011-11-29  2:54   ` Glenn Morris
  2011-11-29 13:52     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2011-11-29  2:54 UTC (permalink / raw)
  To: Richard Copley; +Cc: 10133

Richard Copley wrote:

> I guess the bug is that the functions in "log-view.el" should be using
> `use-region-p' or `region-active-p' rather than `mark-active'.

Why? That would make them dependent on transient mark mode.
Nowhere in the doc of eg log-view-diff does it say that the function
behaves differently if transient mark mode is on. So I don't see that
there is a bug here.






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

* bug#10133: (24.0.91; mark-active)
  2011-11-29  2:54   ` Glenn Morris
@ 2011-11-29 13:52     ` Stefan Monnier
  2011-11-29 17:27       ` Glenn Morris
  2012-08-09  7:50       ` Chong Yidong
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2011-11-29 13:52 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Richard Copley, 10133

>> I guess the bug is that the functions in "log-view.el" should be using
>> `use-region-p' or `region-active-p' rather than `mark-active'.
> Why? That would make them dependent on transient mark mode.

But the current behavior means that without transient-mark-mode, if
you've set the mark at some point in the past, you can't do a "diff with
current file" any more, only a "diff between revision at point and
revision at mark".

> Nowhere in the doc of eg log-view-diff does it say that the function
> behaves differently if transient mark mode is on.  So I don't see that
> there is a bug here.

It's maybe not a bug, but it's a limitation.
I think `use-region-p' would make a lot of sense here nowadays (there
was no temporary tmm back when I wrote the code, so something like
use-region-p would have made the "diff between 2 revisions"
inaccessible to non-tmm users, but this limit has now been lifted).


        Stefan





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

* bug#10133: (24.0.91; mark-active)
  2011-11-29 13:52     ` Stefan Monnier
@ 2011-11-29 17:27       ` Glenn Morris
  2012-08-09  7:50       ` Chong Yidong
  1 sibling, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2011-11-29 17:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Richard Copley, 10133

Stefan Monnier wrote:

> But the current behavior means that without transient-mark-mode, if
> you've set the mark at some point in the past, you can't do a "diff with
> current file" any more, only a "diff between revision at point and
> revision at mark".

You can move the mark to point, though I agree it's not ideal.

> I think `use-region-p' would make a lot of sense here nowadays (there
> was no temporary tmm back when I wrote the code, so something like
> use-region-p would have made the "diff between 2 revisions"
> inaccessible to non-tmm users, but this limit has now been lifted).

Some people disable even temporary tmm. :)





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

* bug#10133: (24.0.91; mark-active)
  2011-11-29 13:52     ` Stefan Monnier
  2011-11-29 17:27       ` Glenn Morris
@ 2012-08-09  7:50       ` Chong Yidong
  1 sibling, 0 replies; 6+ messages in thread
From: Chong Yidong @ 2012-08-09  7:50 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Richard Copley, 10133

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> Nowhere in the doc of eg log-view-diff does it say that the function
>> behaves differently if transient mark mode is on.  So I don't see that
>> there is a bug here.
>
> It's maybe not a bug, but it's a limitation.
> I think `use-region-p' would make a lot of sense here nowadays (there
> was no temporary tmm back when I wrote the code, so something like
> use-region-p would have made the "diff between 2 revisions"
> inaccessible to non-tmm users, but this limit has now been lifted).

I changed it to use use-region-p.





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

end of thread, other threads:[~2012-08-09  7:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-25 14:15 bug#10133: 24.0.91; mark-active Richard Copley
2011-11-25 14:30 ` bug#10133: (24.0.91; mark-active) Richard Copley
2011-11-29  2:54   ` Glenn Morris
2011-11-29 13:52     ` Stefan Monnier
2011-11-29 17:27       ` Glenn Morris
2012-08-09  7:50       ` Chong Yidong

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).