* bug#58282: Distinguishing glasses-mode display
@ 2022-10-04 3:36 uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 7:18 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-04 3:36 UTC (permalink / raw)
To: 58282
I am using "glasses-mode", but It is difficult to distinguish which words get changed. For instance, if one has a mixture of CamelCase, Under_scores one would not know which is modified and which is original. Particularly problematic when one is modifying the code.
Could "glasses-mode" be made in such way as to indicate that "glasses-mode" changed its display, by default.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 3:36 bug#58282: Distinguishing glasses-mode display uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-04 7:18 ` Eli Zaretskii
2022-10-04 11:01 ` Lars Ingebrigtsen
2022-10-04 11:47 ` Christopher Dimech
0 siblings, 2 replies; 18+ messages in thread
From: Eli Zaretskii @ 2022-10-04 7:18 UTC (permalink / raw)
To: uzibalqa; +Cc: 58282
> Date: Tue, 04 Oct 2022 03:36:34 +0000
> From: uzibalqa via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
>
> I am using "glasses-mode", but It is difficult to distinguish which words get changed. For instance, if one has a mixture of CamelCase, Under_scores one would not know which is modified and which is original. Particularly problematic when one is modifying the code.
>
> Could "glasses-mode" be made in such way as to indicate that "glasses-mode" changed its display, by default.
I think we have this already: customize glasses-face to some distinct
face, like 'bold'. Then the capital letters of identifiers where
glasses.el inserted underscores will be shown in bold, and you can
visually distinguish them from the original underscores.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 7:18 ` Eli Zaretskii
@ 2022-10-04 11:01 ` Lars Ingebrigtsen
2022-10-04 11:47 ` Christopher Dimech
1 sibling, 0 replies; 18+ messages in thread
From: Lars Ingebrigtsen @ 2022-10-04 11:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 58282, uzibalqa
Eli Zaretskii <eliz@gnu.org> writes:
> I think we have this already: customize glasses-face to some distinct
> face, like 'bold'. Then the capital letters of identifiers where
> glasses.el inserted underscores will be shown in bold, and you can
> visually distinguish them from the original underscores.
Also, I think the idea with this mode is to use it in languages where
camelCase is the accepted way to write things -- and they never mix
camelCase with camel_Case, so changing the defaults here would also be
inappropriate.
So I don't think there's anything here to be fixed, and I'm closing this
bug report.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 7:18 ` Eli Zaretskii
2022-10-04 11:01 ` Lars Ingebrigtsen
@ 2022-10-04 11:47 ` Christopher Dimech
2022-10-04 12:27 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 12:43 ` Eli Zaretskii
1 sibling, 2 replies; 18+ messages in thread
From: Christopher Dimech @ 2022-10-04 11:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 58282, uzibalqa
> Sent: Tuesday, October 04, 2022 at 7:18 PM
> From: "Eli Zaretskii" <eliz@gnu.org>
> To: "uzibalqa" <uzibalqa@proton.me>
> Cc: 58282@debbugs.gnu.org
> Subject: bug#58282: Distinguishing glasses-mode display
>
> > Date: Tue, 04 Oct 2022 03:36:34 +0000
> > From: uzibalqa via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >
> >
> > I am using "glasses-mode", but It is difficult to distinguish which words get changed. For instance, if one has a mixture of CamelCase, Under_scores one would not know which is modified and which is original. Particularly problematic when one is modifying the code.
> >
> > Could "glasses-mode" be made in such way as to indicate that "glasses-mode" changed its display, by default.
>
> I think we have this already: customize glasses-face to some distinct
> face, like 'bold'. Then the capital letters of identifiers where
> glasses.el inserted underscores will be shown in bold, and you can
> visually distinguish them from the original underscores.
Because I use bold font the default does not work for me. I want to
make the changes in my init file. How can I change the foreground
and background colour of the glasses matches? Is it possible for users
to use a UTF8 Code as separator, and if so, how can this be done?
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 11:47 ` Christopher Dimech
@ 2022-10-04 12:27 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 12:43 ` Eli Zaretskii
1 sibling, 0 replies; 18+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-04 12:27 UTC (permalink / raw)
To: Christopher Dimech; +Cc: Eli Zaretskii, 58282
------- Original Message -------
On Tuesday, October 4th, 2022 at 11:47 AM, Christopher Dimech <dimech@gmx.com> wrote:
> > Sent: Tuesday, October 04, 2022 at 7:18 PM
> > From: "Eli Zaretskii" eliz@gnu.org
> > To: "uzibalqa" uzibalqa@proton.me
> > Cc: 58282@debbugs.gnu.org
> > Subject: bug#58282: Distinguishing glasses-mode display
> >
> > > Date: Tue, 04 Oct 2022 03:36:34 +0000
> > > From: uzibalqa via "Bug reports for GNU Emacs,
> > > the Swiss army knife of text editors" bug-gnu-emacs@gnu.org
> > >
> > > I am using "glasses-mode", but It is difficult to distinguish which words get changed. For instance, if one has a mixture of CamelCase, Under_scores one would not know which is modified and which is original. Particularly problematic when one is modifying the code.
> > >
> > > Could "glasses-mode" be made in such way as to indicate that "glasses-mode" changed its display, by default.
> >
> > I think we have this already: customize glasses-face to some distinct
> > face, like 'bold'. Then the capital letters of identifiers where
> > glasses.el inserted underscores will be shown in bold, and you can
> > visually distinguish them from the original underscores.
>
>
> Because I use bold font the default does not work for me. I want to
> make the changes in my init file. How can I change the foreground
> and background colour of the glasses matches? Is it possible for users
> to use a UTF8 Code as separator, and if so, how can this be done?
Being able to use unicode for separator would be valuable as the typeface
can remain the same, whilst the separator would clearly indicate that the
symbol used is not part of the original code.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 11:47 ` Christopher Dimech
2022-10-04 12:27 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-04 12:43 ` Eli Zaretskii
2022-10-04 14:46 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2022-10-04 12:43 UTC (permalink / raw)
To: Christopher Dimech; +Cc: 58282, uzibalqa
> From: Christopher Dimech <dimech@gmx.com>
> Cc: uzibalqa <uzibalqa@proton.me>, 58282@debbugs.gnu.org
> Date: Tue, 4 Oct 2022 13:47:33 +0200
>
> > I think we have this already: customize glasses-face to some distinct
> > face, like 'bold'. Then the capital letters of identifiers where
> > glasses.el inserted underscores will be shown in bold, and you can
> > visually distinguish them from the original underscores.
>
> Because I use bold font the default does not work for me.
??? What default? The default is that glasses-face is just nil, so no
special face is put on any parts of the identifiers. 'bold' was just
an example of a non-default face; you can use any face there.
> I want to make the changes in my init file. How can I change the
> foreground and background colour of the glasses matches?
You can't. This face is not about changing the matches, it is about
changing the appearance of the capital letters in identifiers where
glasses-mode adds the separator (which is underscore _ by default)
> Is it possible for users to use a UTF8 Code as separator, and if so,
> how can this be done?
Customize the variable glasses-separator. (This has nothing to do
with the original bug report, though.)
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 12:43 ` Eli Zaretskii
@ 2022-10-04 14:46 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 14:52 ` Christopher Dimech
2022-10-04 16:26 ` Eli Zaretskii
0 siblings, 2 replies; 18+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-04 14:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Christopher Dimech, 58282
------- Original Message -------
On Tuesday, October 4th, 2022 at 12:43 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Christopher Dimech dimech@gmx.com
> > Cc: uzibalqa uzibalqa@proton.me, 58282@debbugs.gnu.org
> > Date: Tue, 4 Oct 2022 13:47:33 +0200
> >
> > > I think we have this already: customize glasses-face to some distinct
> > > face, like 'bold'. Then the capital letters of identifiers where
> > > glasses.el inserted underscores will be shown in bold, and you can
> > > visually distinguish them from the original underscores.
> >
> > Because I use bold font the default does not work for me.
>
>
> ??? What default? The default is that glasses-face is just nil, so no
> special face is put on any parts of the identifiers. 'bold' was just
> an example of a non-default face; you can use any face there.
>
> > I want to make the changes in my init file. How can I change the
> > foreground and background colour of the glasses matches?
>
>
> You can't. This face is not about changing the matches, it is about
> changing the appearance of the capital letters in identifiers where
> glasses-mode adds the separator (which is underscore _ by default)
>
> > Is it possible for users to use a UTF8 Code as separator, and if so,
> > how can this be done?
>
>
> Customize the variable glasses-separator. (This has nothing to do
> with the original bug report, though.)
How can I change the colour of the capital letters or use utf8 using
elisp commands?
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 14:46 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-04 14:52 ` Christopher Dimech
2022-10-04 15:53 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 16:28 ` Eli Zaretskii
2022-10-04 16:26 ` Eli Zaretskii
1 sibling, 2 replies; 18+ messages in thread
From: Christopher Dimech @ 2022-10-04 14:52 UTC (permalink / raw)
To: uzibalqa; +Cc: Eli Zaretskii, 58282
> Sent: Wednesday, October 05, 2022 at 2:46 AM
> From: "uzibalqa" <uzibalqa@proton.me>
> To: "Eli Zaretskii" <eliz@gnu.org>
> Cc: "Christopher Dimech" <dimech@gmx.com>, 58282@debbugs.gnu.org
> Subject: Re: bug#58282: Distinguishing glasses-mode display
>
> ------- Original Message -------
> On Tuesday, October 4th, 2022 at 12:43 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>
> > > From: Christopher Dimech dimech@gmx.com
> > > Cc: uzibalqa uzibalqa@proton.me, 58282@debbugs.gnu.org
> > > Date: Tue, 4 Oct 2022 13:47:33 +0200
> > >
> > > > I think we have this already: customize glasses-face to some distinct
> > > > face, like 'bold'. Then the capital letters of identifiers where
> > > > glasses.el inserted underscores will be shown in bold, and you can
> > > > visually distinguish them from the original underscores.
> > >
> > > Because I use bold font the default does not work for me.
> >
> >
> > ??? What default? The default is that glasses-face is just nil, so no
> > special face is put on any parts of the identifiers. 'bold' was just
> > an example of a non-default face; you can use any face there.
> >
> > > I want to make the changes in my init file. How can I change the
> > > foreground and background colour of the glasses matches?
> >
> >
> > You can't. This face is not about changing the matches, it is about
> > changing the appearance of the capital letters in identifiers where
> > glasses-mode adds the separator (which is underscore _ by default)
> >
> > > Is it possible for users to use a UTF8 Code as separator, and if so,
> > > how can this be done?
> >
> >
> > Customize the variable glasses-separator. (This has nothing to do
> > with the original bug report, though.)
>
> How can I change the colour of the capital letters or use utf8 using
> elisp commands?
You could just do
(setq glasses-separator "➾")
with the character being a utf8 symbol.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 14:52 ` Christopher Dimech
@ 2022-10-04 15:53 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 16:28 ` Eli Zaretskii
1 sibling, 0 replies; 18+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-04 15:53 UTC (permalink / raw)
To: Christopher Dimech; +Cc: Eli Zaretskii, 58282
------- Original Message -------
On Tuesday, October 4th, 2022 at 2:52 PM, Christopher Dimech <dimech@gmx.com> wrote:
>
>
> > Sent: Wednesday, October 05, 2022 at 2:46 AM
> > From: "uzibalqa" uzibalqa@proton.me
> > To: "Eli Zaretskii" eliz@gnu.org
> > Cc: "Christopher Dimech" dimech@gmx.com, 58282@debbugs.gnu.org
> > Subject: Re: bug#58282: Distinguishing glasses-mode display
> >
> > ------- Original Message -------
> > On Tuesday, October 4th, 2022 at 12:43 PM, Eli Zaretskii eliz@gnu.org wrote:
> >
> > > > From: Christopher Dimech dimech@gmx.com
> > > > Cc: uzibalqa uzibalqa@proton.me, 58282@debbugs.gnu.org
> > > > Date: Tue, 4 Oct 2022 13:47:33 +0200
> > > >
> > > > > I think we have this already: customize glasses-face to some distinct
> > > > > face, like 'bold'. Then the capital letters of identifiers where
> > > > > glasses.el inserted underscores will be shown in bold, and you can
> > > > > visually distinguish them from the original underscores.
> > > >
> > > > Because I use bold font the default does not work for me.
> > >
> > > ??? What default? The default is that glasses-face is just nil, so no
> > > special face is put on any parts of the identifiers. 'bold' was just
> > > an example of a non-default face; you can use any face there.
> > >
> > > > I want to make the changes in my init file. How can I change the
> > > > foreground and background colour of the glasses matches?
> > >
> > > You can't. This face is not about changing the matches, it is about
> > > changing the appearance of the capital letters in identifiers where
> > > glasses-mode adds the separator (which is underscore _ by default)
> > >
> > > > Is it possible for users to use a UTF8 Code as separator, and if so,
> > > > how can this be done?
> > >
> > > Customize the variable glasses-separator. (This has nothing to do
> > > with the original bug report, though.)
> >
> > How can I change the colour of the capital letters or use utf8 using
> > elisp commands?
>
>
> You could just do
>
> (setq glasses-separator "➾")
>
> with the character being a utf8 symbol.
I would prefer using utf symbols than changing colours.
I am using the following function using hex code for Black Rightwards Arrowhead
(defun typex-camelsens ()
"Splits CamelCase phrases using separator."
(interactive)
(setq glasses-separator "\u27A4")
(glasses-mode))
How can I pass an arbitrary hex code interactively, besides using a default?
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 14:52 ` Christopher Dimech
2022-10-04 15:53 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-04 16:28 ` Eli Zaretskii
1 sibling, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2022-10-04 16:28 UTC (permalink / raw)
To: Christopher Dimech; +Cc: 58282, uzibalqa
> From: Christopher Dimech <dimech@gmx.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, 58282@debbugs.gnu.org
> Date: Tue, 4 Oct 2022 16:52:44 +0200
>
> > > Customize the variable glasses-separator. (This has nothing to do
> > > with the original bug report, though.)
> >
> > How can I change the colour of the capital letters or use utf8 using
> > elisp commands?
>
> You could just do
>
> (setq glasses-separator "➾")
>
> with the character being a utf8 symbol.
No, that will not work in general in this case. You must use
Customize.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 14:46 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 14:52 ` Christopher Dimech
@ 2022-10-04 16:26 ` Eli Zaretskii
2022-10-04 17:28 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2022-10-04 16:26 UTC (permalink / raw)
To: uzibalqa; +Cc: dimech, 58282
> Date: Tue, 04 Oct 2022 14:46:16 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: Christopher Dimech <dimech@gmx.com>, 58282@debbugs.gnu.org
>
> ------- Original Message -------
> On Tuesday, October 4th, 2022 at 12:43 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>
> > > From: Christopher Dimech dimech@gmx.com
> > > Cc: uzibalqa uzibalqa@proton.me, 58282@debbugs.gnu.org
> > > Date: Tue, 4 Oct 2022 13:47:33 +0200
> > >
> > > > I think we have this already: customize glasses-face to some distinct
> > > > face, like 'bold'. Then the capital letters of identifiers where
> > > > glasses.el inserted underscores will be shown in bold, and you can
> > > > visually distinguish them from the original underscores.
> > >
> > > Because I use bold font the default does not work for me.
> >
> >
> > ??? What default? The default is that glasses-face is just nil, so no
> > special face is put on any parts of the identifiers. 'bold' was just
> > an example of a non-default face; you can use any face there.
> >
> > > I want to make the changes in my init file. How can I change the
> > > foreground and background colour of the glasses matches?
> >
> >
> > You can't. This face is not about changing the matches, it is about
> > changing the appearance of the capital letters in identifiers where
> > glasses-mode adds the separator (which is underscore _ by default)
> >
> > > Is it possible for users to use a UTF8 Code as separator, and if so,
> > > how can this be done?
> >
> >
> > Customize the variable glasses-separator. (This has nothing to do
> > with the original bug report, though.)
>
> How can I change the colour of the capital letters or use utf8 using
> elisp commands?
I answered both questions above. What is unclear?
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 16:26 ` Eli Zaretskii
@ 2022-10-04 17:28 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 18:02 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-04 17:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: dimech, 58282
------- Original Message -------
On Tuesday, October 4th, 2022 at 4:26 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Tue, 04 Oct 2022 14:46:16 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: Christopher Dimech dimech@gmx.com, 58282@debbugs.gnu.org
> >
> > ------- Original Message -------
> > On Tuesday, October 4th, 2022 at 12:43 PM, Eli Zaretskii eliz@gnu.org wrote:
> >
> > > > From: Christopher Dimech dimech@gmx.com
> > > > Cc: uzibalqa uzibalqa@proton.me, 58282@debbugs.gnu.org
> > > > Date: Tue, 4 Oct 2022 13:47:33 +0200
> > > >
> > > > > I think we have this already: customize glasses-face to some distinct
> > > > > face, like 'bold'. Then the capital letters of identifiers where
> > > > > glasses.el inserted underscores will be shown in bold, and you can
> > > > > visually distinguish them from the original underscores.
> > > >
> > > > Because I use bold font the default does not work for me.
> > >
> > > ??? What default? The default is that glasses-face is just nil, so no
> > > special face is put on any parts of the identifiers. 'bold' was just
> > > an example of a non-default face; you can use any face there.
> > >
> > > > I want to make the changes in my init file. How can I change the
> > > > foreground and background colour of the glasses matches?
> > >
> > > You can't. This face is not about changing the matches, it is about
> > > changing the appearance of the capital letters in identifiers where
> > > glasses-mode adds the separator (which is underscore _ by default)
> > >
> > > > Is it possible for users to use a UTF8 Code as separator, and if so,
> > > > how can this be done?
> > >
> > > Customize the variable glasses-separator. (This has nothing to do
> > > with the original bug report, though.)
> >
> > How can I change the colour of the capital letters or use utf8 using
> > elisp commands?
>
>
> I answered both questions above. What is unclear?
Been focusing on getting this to work
(defun camelsens (hexcode)
"Splits CamelCase phrases using separator."
(interactive (list
(completing-read "Utf8_hex_code: " '("\u27A4" "\u25BA" "\u2192") nil t "\u2192")))
(setq glasses-separator hexcode)
(glasses-mode))
But this only works the first time I call the function.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 17:28 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-04 18:02 ` Eli Zaretskii
2022-10-04 18:09 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2022-10-04 18:02 UTC (permalink / raw)
To: uzibalqa; +Cc: dimech, 58282
> Date: Tue, 04 Oct 2022 17:28:21 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: dimech@gmx.com, 58282@debbugs.gnu.org
>
> (defun camelsens (hexcode)
>
> "Splits CamelCase phrases using separator."
>
> (interactive (list
>
> (completing-read "Utf8_hex_code: " '("\u27A4" "\u25BA" "\u2192") nil t "\u2192")))
>
> (setq glasses-separator hexcode)
>
> (glasses-mode))
>
> But this only works the first time I call the function.
You cannot simply assign the value to this variable. Look at its
defcustom form to understand what is missing.
And anyway, what does this have to do with the bug report? You are
asking basic Emacs Lisp questions.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 18:02 ` Eli Zaretskii
@ 2022-10-04 18:09 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 18:16 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-04 18:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: dimech, 58282
------- Original Message -------
On Tuesday, October 4th, 2022 at 6:02 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Tue, 04 Oct 2022 17:28:21 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: dimech@gmx.com, 58282@debbugs.gnu.org
> >
> > (defun camelsens (hexcode)
> >
> > "Splits CamelCase phrases using separator."
> >
> > (interactive (list
> >
> > (completing-read "Utf8_hex_code: " '("\u27A4" "\u25BA" "\u2192") nil t "\u2192")))
> >
> > (setq glasses-separator hexcode)
> >
> > (glasses-mode))
> >
> > But this only works the first time I call the function.
>
>
> You cannot simply assign the value to this variable. Look at its
> defcustom form to understand what is missing.
>
> And anyway, what does this have to do with the bug report? You are
> asking basic Emacs Lisp questions.
Because I can use utf, I can easily distinguish between code and glasses display.
This feature solves my problem.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 18:09 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-04 18:16 ` Eli Zaretskii
2022-10-06 0:56 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2022-10-04 18:16 UTC (permalink / raw)
To: uzibalqa; +Cc: dimech, 58282
> Date: Tue, 04 Oct 2022 18:09:53 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: dimech@gmx.com, 58282@debbugs.gnu.org
>
> > You cannot simply assign the value to this variable. Look at its
> > defcustom form to understand what is missing.
> >
> > And anyway, what does this have to do with the bug report? You are
> > asking basic Emacs Lisp questions.
>
> Because I can use utf, I can easily distinguish between code and glasses display.
> This feature solves my problem.
So do use it. It is possible and supported, just not by a simple
setq.
Here's the defcustom of that option from glasses.el:
(defcustom glasses-separator "_"
"String to be displayed as a visual separator in identifiers.
It is used both for adding missing separators and for replacing separators
defined by `glasses-original-separator'. If you don't want to add missing
separators, set `glasses-separator' to an empty string. If you don't want to
replace existent separators, set `glasses-original-separator' to an empty
string."
:type 'string
:set 'glasses-custom-set
:initialize 'custom-initialize-default)
What does the :set attribute tell you?
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-04 18:16 ` Eli Zaretskii
@ 2022-10-06 0:56 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-06 6:35 ` Eli Zaretskii
0 siblings, 1 reply; 18+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-06 0:56 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: dimech, 58282
------- Original Message -------
On Tuesday, October 4th, 2022 at 6:16 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Tue, 04 Oct 2022 18:09:53 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: dimech@gmx.com, 58282@debbugs.gnu.org
> >
> > > You cannot simply assign the value to this variable. Look at its
> > > defcustom form to understand what is missing.
> > >
> > > And anyway, what does this have to do with the bug report? You are
> > > asking basic Emacs Lisp questions.
> >
> > Because I can use utf, I can easily distinguish between code and glasses display.
> > This feature solves my problem.
>
>
> So do use it. It is possible and supported, just not by a simple
> setq.
>
> Here's the defcustom of that option from glasses.el:
>
> (defcustom glasses-separator "_"
> "String to be displayed as a visual separator in identifiers.
> It is used both for adding missing separators and for replacing separators
> defined by `glasses-original-separator'. If you don't want to add missing separators, set` glasses-separator' to an empty string. If you don't want to
> replace existent separators, set `glasses-original-separator' to an empty
> string."
> :type 'string
> :set 'glasses-custom-set
> :initialize 'custom-initialize-default)
>
> What does the :set attribute tell you?
I could call (glasses-set-overlay-properties)
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-06 0:56 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-10-06 6:35 ` Eli Zaretskii
2022-10-06 11:53 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2022-10-06 6:35 UTC (permalink / raw)
To: uzibalqa; +Cc: dimech, 58282
> Date: Thu, 06 Oct 2022 00:56:05 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: dimech@gmx.com, 58282@debbugs.gnu.org
>
> > Here's the defcustom of that option from glasses.el:
> >
> > (defcustom glasses-separator "_"
> > "String to be displayed as a visual separator in identifiers.
> > It is used both for adding missing separators and for replacing separators
> > defined by `glasses-original-separator'. If you don't want to add missing separators, set` glasses-separator' to an empty string. If you don't want to
> > replace existent separators, set `glasses-original-separator' to an empty
> > string."
> > :type 'string
> > :set 'glasses-custom-set
> > :initialize 'custom-initialize-default)
> >
> > What does the :set attribute tell you?
>
> I could call (glasses-set-overlay-properties)
That's not really related.
What the :set attribute says is that you need to call that function
after changing the value, to "install" the new value.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#58282: Distinguishing glasses-mode display
2022-10-06 6:35 ` Eli Zaretskii
@ 2022-10-06 11:53 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 18+ messages in thread
From: uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-10-06 11:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: dimech, 58282
Sent with Proton Mail secure email.
------- Original Message -------
On Thursday, October 6th, 2022 at 6:35 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Thu, 06 Oct 2022 00:56:05 +0000
> > From: uzibalqa uzibalqa@proton.me
> > Cc: dimech@gmx.com, 58282@debbugs.gnu.org
> >
> > > Here's the defcustom of that option from glasses.el:
> > >
> > > (defcustom glasses-separator "_"
> > > "String to be displayed as a visual separator in identifiers.
> > > It is used both for adding missing separators and for replacing separators
> > > defined by `glasses-original-separator'. If you don't want to add missing separators, set` glasses-separator' to an empty string. If you don't want to
> > > replace existent separators, set `glasses-original-separator' to an empty
> > > string."
> > > :type 'string
> > > :set 'glasses-custom-set
> > > :initialize 'custom-initialize-default)
> > >
> > > What does the :set attribute tell you?
> >
> > I could call (glasses-set-overlay-properties)
>
>
> That's not really related.
>
> What the :set attribute says is that you need to call that function
> after changing the value, to "install" the new value.
The function "glasses-custom-set"? The documentation also states that
"glasses-set-overlay-properties" can also be used. What would be the
best code sequence then?
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2022-10-06 11:53 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-04 3:36 bug#58282: Distinguishing glasses-mode display uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 7:18 ` Eli Zaretskii
2022-10-04 11:01 ` Lars Ingebrigtsen
2022-10-04 11:47 ` Christopher Dimech
2022-10-04 12:27 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 12:43 ` Eli Zaretskii
2022-10-04 14:46 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 14:52 ` Christopher Dimech
2022-10-04 15:53 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 16:28 ` Eli Zaretskii
2022-10-04 16:26 ` Eli Zaretskii
2022-10-04 17:28 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 18:02 ` Eli Zaretskii
2022-10-04 18:09 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-04 18:16 ` Eli Zaretskii
2022-10-06 0:56 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-06 6:35 ` Eli Zaretskii
2022-10-06 11:53 ` uzibalqa via Bug reports for GNU Emacs, the Swiss army knife of text editors
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.