GNU bug report logs - #51451
image-transform-original has a misleading name

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Thu, 28 Oct 2021 00:32:02 UTC

Severity: minor

Fixed in version 29.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

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 51451 in the body.
You can then email your comments to 51451 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Thu, 28 Oct 2021 00:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefan <at> marxist.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 28 Oct 2021 00:32:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: bug-gnu-emacs <at> gnu.org
Subject: image-transform-original has a misleading name
Date: Wed, 27 Oct 2021 17:31:48 -0700
Severity: minor

This is the docstring of `image-transform-original'.

    (image-transform-original)

    Display the current image with the original (actual) size and
    rotation.

From reading this it is clear what it does, but the command name makes
it sound like it will transform the original image.

These are the commands under the "s" key in image-mode:

    s 0             image-transform-reset
    s b             image-transform-fit-both
    s f             image-mode-fit-frame
    s h             image-transform-fit-to-height
    s m             image-transform-set-smoothing
    s o             image-transform-original
    s r             image-transform-set-rotation
    s s             image-transform-set-scale
    s w             image-transform-fit-to-width

Perhaps this would be less confusing if these commands were named
`image-display-*' instead of `image-transform-*'?

    s 0             image-display-reset-size
    s b             image-display-fit-both
    s f             image-mode-fit-frame
    s h             image-display-fit-to-height
    s m             image-display-set-smoothing
    s o             image-display-original-size
    s r             image-display-set-rotation
    s s             image-display-set-scale
    s w             image-display-fit-to-width

Doesn't that make more sense?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Fri, 29 Oct 2021 13:15:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51451 <at> debbugs.gnu.org
Subject: Re: bug#51451: image-transform-original has a misleading name
Date: Fri, 29 Oct 2021 15:14:05 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> Perhaps this would be less confusing if these commands were named
> `image-display-*' instead of `image-transform-*'?
>
>     s 0             image-display-reset-size
>     s b             image-display-fit-both
>     s f             image-mode-fit-frame
>     s h             image-display-fit-to-height
>     s m             image-display-set-smoothing
>     s o             image-display-original-size
>     s r             image-display-set-rotation
>     s s             image-display-set-scale
>     s w             image-display-fit-to-width
>
> Doesn't that make more sense?

It makes sense to me -- I've been confused by these commands myself.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Sun, 31 Oct 2021 19:53:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51451 <at> debbugs.gnu.org
Subject: Re: bug#51451: image-transform-original has a misleading name
Date: Sun, 31 Oct 2021 21:46:17 +0200
> These are the commands under the "s" key in image-mode:
>
>     s 0             image-transform-reset
>     s b             image-transform-fit-both
>     s f             image-mode-fit-frame
>     s h             image-transform-fit-to-height
>     s m             image-transform-set-smoothing
>     s o             image-transform-original
>     s r             image-transform-set-rotation
>     s s             image-transform-set-scale
>     s w             image-transform-fit-to-width
>
> Perhaps this would be less confusing if these commands were named
> `image-display-*' instead of `image-transform-*'?
>
>     s 0             image-display-reset-size
>     s b             image-display-fit-both
>     s f             image-mode-fit-frame
>     s h             image-display-fit-to-height
>     s m             image-display-set-smoothing
>     s o             image-display-original-size
>     s r             image-display-set-rotation
>     s s             image-display-set-scale
>     s w             image-display-fit-to-width
>
> Doesn't that make more sense?

image-transform-* commands are modifying the values of
image-transform-* variables.
Would you propose to rename variables as well?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Sun, 31 Oct 2021 20:25:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51451 <at> debbugs.gnu.org
Subject: Re: bug#51451: image-transform-original has a misleading name
Date: Sun, 31 Oct 2021 13:24:21 -0700
Juri Linkov <juri <at> linkov.net> writes:

> image-transform-* commands are modifying the values of
> image-transform-* variables.
> Would you propose to rename variables as well?

I didn't think about that, as the commands are what the user will see.
Maybe we should.  Do you think it would be a good idea?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Wed, 03 Nov 2021 18:50:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 51451 <at> debbugs.gnu.org
Subject: Re: bug#51451: image-transform-original has a misleading name
Date: Wed, 03 Nov 2021 20:48:29 +0200
>> image-transform-* commands are modifying the values of
>> image-transform-* variables.
>> Would you propose to rename variables as well?
>
> I didn't think about that, as the commands are what the user will see.
> Maybe we should.  Do you think it would be a good idea?

At least, currently there is consistency in naming of
image-transform-* functions and variables.  Whether
selecting such a prefix was a good choice is another question.

But if you see a problem only in the name of image-transform-original,
then it could be renamed to image-transform-set-original or maybe
better to image-transform-reset-to-original, i.e. to something more
descriptive, while keeping the existing name prefix.

PS: renaming to image-transform-reset-to-original will also require
renaming image-transform-reset to image-transform-reset-to-initial.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Wed, 03 Nov 2021 20:18:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51451 <at> debbugs.gnu.org
Subject: Re: bug#51451: image-transform-original has a misleading name
Date: Wed, 3 Nov 2021 13:16:55 -0700
Juri Linkov <juri <at> linkov.net> writes:

>>> image-transform-* commands are modifying the values of
>>> image-transform-* variables.
>>> Would you propose to rename variables as well?
>>
>> I didn't think about that, as the commands are what the user will see.
>> Maybe we should.  Do you think it would be a good idea?
>
> At least, currently there is consistency in naming of
> image-transform-* functions and variables.

That's true.

> But if you see a problem only in the name of image-transform-original,
> then it could be renamed to image-transform-set-original or maybe
> better to image-transform-reset-to-original, i.e. to something more
> descriptive, while keeping the existing name prefix.

I see a problem with all of them, especially in combination with
`image-save'.  :-(

But the most confusing one by far is `image-transform-original', indeed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Wed, 14 Sep 2022 13:53:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51451 <at> debbugs.gnu.org
Subject: Re: bug#51451: image-transform-original has a misleading name
Date: Wed, 14 Sep 2022 09:52:43 -0400
close 51451 29.1
thanks

Juri Linkov <juri <at> linkov.net> writes:

>>> image-transform-* commands are modifying the values of
>>> image-transform-* variables.
>>> Would you propose to rename variables as well?
>>
>> I didn't think about that, as the commands are what the user will see.
>> Maybe we should.  Do you think it would be a good idea?
>
> At least, currently there is consistency in naming of
> image-transform-* functions and variables.  Whether
> selecting such a prefix was a good choice is another question.
>
> But if you see a problem only in the name of image-transform-original,
> then it could be renamed to image-transform-set-original or maybe
> better to image-transform-reset-to-original, i.e. to something more
> descriptive, while keeping the existing name prefix.
>
> PS: renaming to image-transform-reset-to-original will also require
> renaming image-transform-reset to image-transform-reset-to-initial.

Thanks.  I've now changed this as you suggest (commit 37fe0cd358).




bug marked as fixed in version 29.1, send any further explanations to 51451 <at> debbugs.gnu.org and Stefan Kangas <stefan <at> marxist.se> Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 14 Sep 2022 13:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Wed, 14 Sep 2022 19:31:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 51451 <at> debbugs.gnu.org
Subject: Re: bug#51451: image-transform-original has a misleading name
Date: Wed, 14 Sep 2022 22:11:11 +0300
>> PS: renaming to image-transform-reset-to-original will also require
>> renaming image-transform-reset to image-transform-reset-to-initial.
>
> Thanks.  I've now changed this as you suggest (commit 37fe0cd358).

Thanks, I noticed that the manual mentions only
'image-transform-reset-to-initial'.  Shouldn't it also mention
'image-transform-reset-to-original' briefly, after a comma, e.g.:

  To reset all transformations to the initial state, use
  ‘image-transform-reset-to-initial’ bound to ‘s 0’, and to the
  original state, use ‘image-transform-reset-to-original’ bound to ‘s o’.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51451; Package emacs. (Wed, 14 Sep 2022 23:07:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 51451 <at> debbugs.gnu.org
Subject: Re: bug#51451: image-transform-original has a misleading name
Date: Wed, 14 Sep 2022 16:06:39 -0700
Juri Linkov <juri <at> linkov.net> writes:

>  I noticed that the manual mentions only
> 'image-transform-reset-to-initial'.  Shouldn't it also mention
> 'image-transform-reset-to-original' briefly, after a comma, e.g.:
>
>   To reset all transformations to the initial state, use
>   ‘image-transform-reset-to-initial’ bound to ‘s 0’, and to the
>   original state, use ‘image-transform-reset-to-original’ bound to ‘s o’.

OK, now done (commit 8c73ed0ec3).




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

This bug report was last modified 1 year and 189 days ago.

Previous Next


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