* Q3 - how to delete by words, not cut?
@ 2024-12-14 23:57 Tatsu Takamaro
2024-12-15 2:42 ` [External] : " Drew Adams
0 siblings, 1 reply; 17+ messages in thread
From: Tatsu Takamaro @ 2024-12-14 23:57 UTC (permalink / raw)
To: help-gnu-emacs
Question 3 of 4.
What if I want not to cut (or how you call it - kill) a word with
"backward-kill-word" and "kill-word", but delete it (so as not to put
the words into the exchange buffer (clipboard))?
Tony.
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [External] : Q3 - how to delete by words, not cut?
2024-12-14 23:57 Q3 - how to delete by words, not cut? Tatsu Takamaro
@ 2024-12-15 2:42 ` Drew Adams
2024-12-15 2:45 ` Drew Adams
0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2024-12-15 2:42 UTC (permalink / raw)
To: Tatsu Takamaro, help-gnu-emacs@gnu.org
> What if I want not to cut (or how you call it - kill) a word with
> "backward-kill-word" and "kill-word", but delete it (so as not to put
> the words into the exchange buffer (clipboard))?
^^^^^^^^^^^^^^^
^
kill buffer
Something like this:
(defun my-backward-delete-word (arg)
"Delete backard ARG words.
ARG is the numeric prefix arg (default 1)."
(interactive "p")
(let ((opt (point)))
(backward-word arg)
(delete-region opt (point))))
Bind it to some key.
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [External] : Q3 - how to delete by words, not cut?
2024-12-15 2:42 ` [External] : " Drew Adams
@ 2024-12-15 2:45 ` Drew Adams
2024-12-16 23:26 ` Tatsu Takamaro
0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2024-12-15 2:45 UTC (permalink / raw)
To: Drew Adams, Tatsu Takamaro, help-gnu-emacs@gnu.org
See also (elisp) `Deletion':
https://www.gnu.org/software/emacs/manual/html_node/elisp/Deletion.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [External] : Q3 - how to delete by words, not cut?
2024-12-15 2:45 ` Drew Adams
@ 2024-12-16 23:26 ` Tatsu Takamaro
2024-12-17 0:01 ` Drew Adams
2024-12-17 4:06 ` Jean Louis
0 siblings, 2 replies; 17+ messages in thread
From: Tatsu Takamaro @ 2024-12-16 23:26 UTC (permalink / raw)
To: Drew Adams, help-gnu-emacs@gnu.org
Unfortunately, as it was said by others, there is no built-in function
to delete by word.
вс, 15.12.2024 5:45, Drew Adams пишет:
> See also (elisp) `Deletion':
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Deletion.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [External] : Q3 - how to delete by words, not cut?
2024-12-16 23:26 ` Tatsu Takamaro
@ 2024-12-17 0:01 ` Drew Adams
2024-12-17 0:26 ` Tatsu Takamaro
2024-12-17 4:06 ` Jean Louis
1 sibling, 1 reply; 17+ messages in thread
From: Drew Adams @ 2024-12-17 0:01 UTC (permalink / raw)
To: Tatsu Takamaro, help-gnu-emacs@gnu.org
> Unfortunately, as it was said by others, there is no
> built-in function to delete by word.
Do you need one? What's wrong with the non-built-in
one I gave you?
This might give you a hint: Most Emacs users haven't
felt the need for one to be built-in. Emacs is > 40
years old. It's had thousands, probably millions, of
users. And users don't hesitate to request things
they find missing. You can bet that if it were felt
important that such a function be built-in, it would be.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [External] : Q3 - how to delete by words, not cut?
2024-12-17 0:01 ` Drew Adams
@ 2024-12-17 0:26 ` Tatsu Takamaro
2024-12-17 2:28 ` Drew Adams
2024-12-17 8:38 ` [External] : Q3 - how to delete by words, not cut? Vagn Johansen
0 siblings, 2 replies; 17+ messages in thread
From: Tatsu Takamaro @ 2024-12-17 0:26 UTC (permalink / raw)
To: Drew Adams, help-gnu-emacs@gnu.org
Well, if I often work with a buffer (I mean a clipboard, not a Emacs's
buffer), I often paste from it. And with "cut" functions instead of
"delete" I will have my clipboard full of trash instead of some useful
text paragraph. Of course, it's not very important.
I assume I would do it by a cycle - delete one char per each iteration
until the char is a space. But I don't know Elisp, so I'm not sure (for
now) how to make this cycle and how to bind a cycle (not a single
command) on a key. So, maybe later. Or maybe someone would help here.
вт, 17.12.2024 3:01, Drew Adams пишет:
>> Unfortunately, as it was said by others, there is no
>> built-in function to delete by word.
> Do you need one? What's wrong with the non-built-in
> one I gave you?
>
> This might give you a hint: Most Emacs users haven't
> felt the need for one to be built-in. Emacs is > 40
> years old. It's had thousands, probably millions, of
> users. And users don't hesitate to request things
> they find missing. You can bet that if it were felt
> important that such a function be built-in, it would be.
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [External] : Q3 - how to delete by words, not cut?
2024-12-17 0:26 ` Tatsu Takamaro
@ 2024-12-17 2:28 ` Drew Adams
2024-12-18 23:54 ` Tatsu Takamaro
2024-12-17 8:38 ` [External] : Q3 - how to delete by words, not cut? Vagn Johansen
1 sibling, 1 reply; 17+ messages in thread
From: Drew Adams @ 2024-12-17 2:28 UTC (permalink / raw)
To: Tatsu Takamaro, help-gnu-emacs@gnu.org
> I assume I would do it by a cycle - delete one char per
> each iteration until the char is a space.
Do what? Delete a word backwards? Did you try the
`my-backward-delete-word' command I defined for you?
> But I don't know Elisp...
Time to learn a little, if you want to define your
own commands. I recommend you look into the Intro
Elisp manual: `C-h i m intro TAB RET'.
The command I defined saves the current cursor
location (point); then it uses predefined function
`backward-word', to move backward a word; then it
uses predefined function `delete-region', to delete
the text between the new location (point) and the
original (saved) location.
If you want to define deletion (not kill) commands,
then use `delete-region' (or other deletion functions).
They're building-block functions, not commands.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [External] : Q3 - how to delete by words, not cut?
2024-12-16 23:26 ` Tatsu Takamaro
2024-12-17 0:01 ` Drew Adams
@ 2024-12-17 4:06 ` Jean Louis
2024-12-17 4:12 ` Drew Adams
1 sibling, 1 reply; 17+ messages in thread
From: Jean Louis @ 2024-12-17 4:06 UTC (permalink / raw)
To: Tatsu Takamaro; +Cc: Drew Adams, help-gnu-emacs@gnu.org
* Tatsu Takamaro <tatsu.takamaro@gmail.com> [2024-12-17 02:28]:
> Unfortunately, as it was said by others, there is no built-in function to
> delete by word.
I use M-d to delete by word.
--
Jean Louis
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [External] : Q3 - how to delete by words, not cut?
2024-12-17 4:06 ` Jean Louis
@ 2024-12-17 4:12 ` Drew Adams
2024-12-17 4:25 ` Jean Louis
0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2024-12-17 4:12 UTC (permalink / raw)
To: Jean Louis, Tatsu Takamaro; +Cc: help-gnu-emacs@gnu.org
> > Unfortunately, as it was said by others, there is no built-in function
> > to delete by word.
>
> I use M-d to delete by word.
The default binding of `M-d' is `kill-word'.
TT wants to delete words without adding them
to the kill-ring. And backward (like
`backard-kill-word', without killing).
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [External] : Q3 - how to delete by words, not cut?
2024-12-17 4:12 ` Drew Adams
@ 2024-12-17 4:25 ` Jean Louis
0 siblings, 0 replies; 17+ messages in thread
From: Jean Louis @ 2024-12-17 4:25 UTC (permalink / raw)
To: Drew Adams; +Cc: Tatsu Takamaro, help-gnu-emacs@gnu.org
* Drew Adams <drew.adams@oracle.com> [2024-12-17 07:12]:
> > > Unfortunately, as it was said by others, there is no built-in function
> > > to delete by word.
> >
> > I use M-d to delete by word.
>
> The default binding of `M-d' is `kill-word'.
> TT wants to delete words without adding them
> to the kill-ring. And backward (like
> `backard-kill-word', without killing).
M-Backspace deletes word backword.
What one can do to avoid kill ring is to set variable `kill-ring-max'
to zero with {M-x customize-option RET kill-ring-max} and then it will
not be saved in the kill ring. That is not accurate result for the
wish though. Undo works well, but kill ring becomes empty.
--
Jean Louis
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [External] : Q3 - how to delete by words, not cut?
2024-12-17 0:26 ` Tatsu Takamaro
2024-12-17 2:28 ` Drew Adams
@ 2024-12-17 8:38 ` Vagn Johansen
1 sibling, 0 replies; 17+ messages in thread
From: Vagn Johansen @ 2024-12-17 8:38 UTC (permalink / raw)
To: help-gnu-emacs
Tatsu Takamaro <tatsu.takamaro@gmail.com> writes:
> Well, if I often work with a buffer (I mean a clipboard, not a Emacs's
> buffer), I often paste from it. And with "cut" functions instead of
> "delete" I will have my clipboard full of trash instead of some useful
> text paragraph. Of course, it's not very important.
People then press M-y (yank-pop) to go to next "saved" item
--
Vagn Johansen
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [External] : Q3 - how to delete by words, not cut?
2024-12-17 2:28 ` Drew Adams
@ 2024-12-18 23:54 ` Tatsu Takamaro
2024-12-19 2:31 ` Drew Adams
0 siblings, 1 reply; 17+ messages in thread
From: Tatsu Takamaro @ 2024-12-18 23:54 UTC (permalink / raw)
To: Drew Adams, help-gnu-emacs@gnu.org
*Did you try the `my-backward-delete-word' command I defined for you?*
Sorry, I didn't try it before. Because I didn't understand it by that
time (and I have a habbit not to run any code until I understand it good
enough). But now I dived into it and got it...
Though the function logic is clear, the key binding won't work. I tried
different keys. Here is the current state:
*(defun tt-delword-backward (arg)**
**"Delete backward arg words. (default 1)"**
**(interactive "C-;")**
** (let**
** ((opt (point)))**
** (backward-word arg)**
** (delete-region opt (point))**
** )**
**)**
**
**(defun tt-delword-forward (arg)**
**"Delete forward arg words. (default 1)"**
**(interactive "C-'")**
** (let**
** ((opt (point)))**
** (forward-word arg)**
** (delete-region opt (point))**
** )**
**)*
I tried to set (interactive "b") and (interactive "f") for backward and
forward respectively. When "C-;" is set the minibuffers says it's
undefined, when letters are set it just type letters. The call by M-x
doesn't do the job either.
вт, 17.12.2024 5:28, Drew Adams пишет:
>> I assume I would do it by a cycle - delete one char per
>> each iteration until the char is a space.
> Do what? Delete a word backwards? Did you try the
> `my-backward-delete-word' command I defined for you?
>
>> But I don't know Elisp...
> Time to learn a little, if you want to define your
> own commands. I recommend you look into the Intro
> Elisp manual: `C-h i m intro TAB RET'.
>
> The command I defined saves the current cursor
> location (point); then it uses predefined function
> `backward-word', to move backward a word; then it
> uses predefined function `delete-region', to delete
> the text between the new location (point) and the
> original (saved) location.
>
> If you want to define deletion (not kill) commands,
> then use `delete-region' (or other deletion functions).
> They're building-block functions, not commands.
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [External] : Q3 - how to delete by words, not cut?
2024-12-18 23:54 ` Tatsu Takamaro
@ 2024-12-19 2:31 ` Drew Adams
2024-12-20 0:19 ` Tatsu Takamaro
0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2024-12-19 2:31 UTC (permalink / raw)
To: Tatsu Takamaro, help-gnu-emacs@gnu.org
> > Did you try the `my-backward-delete-word' command I defined for you?
>
> Sorry, I didn't try it before. Because I didn't understand it
> by that time (and I have a habbit not to run any code until I
> understand it good enough).
A good habit! No reason to be sorry for that.
> But now I dived into it and got it...
> Though the function logic is clear, the key binding won't work.
> I tried different keys. Here is the current state:
>
> (defun tt-delword-backward (arg)
> "Delete backward arg words. (default 1)"
> (interactive "C-;") ; <==============
> (let ((opt (point)))
> (backward-word arg)
> (delete-region opt (point))))
>
> (defun tt-delword-forward (arg)
> "Delete forward arg words. (default 1)"
> (interactive "C-'") ; <==============
> (let ((opt (point)))
> (forward-word arg)
> (delete-region opt (point))))
>
> I tried to set (interactive "b") and (interactive "f")
> for backward and forward respectively.
No. You need to read up on `interactive'.
This is what I suggested:
(defun my-backward-delete-word (arg)
"Delete backard ARG words.
ARG is the numeric prefix arg (default 1)."
(interactive "p")
(let ((opt (point)))
(backward-word arg)
(delete-region opt (point))))
The "p" arg for `interactive' passes the current
numeric prefix arg that a user supplies as the
argument (ARG). That defaults to 1, if the user
doesn't explicitly provide any prefix arg.
So with no arg it deletes one word (backward).
With `M-1' it does the same thing. With `M-2'
it deletes two words, etc.
This is common for Emacs commands that act on
things from the cursor position - you can use
the same command and key binding to act on N
things by using `C-u N' (or `M-n' for small #s).
> When "C-;" is set the minibuffers says it's undefined, when letters are set it just type letters. The call by M-x doesn't do the job either.
Fix your `interactive' argument. It's not a
key description. `interactive' has nothing to
do with any key binding. It specifies how
arguments (in this case argument ARG) are
provided when the function's invoked interactively.
I followed that command definition with this:
Bind it to some key.
IOW: you define a command and you bind that
command to a key (if you want). If not bound
to a key you can still invoke it, with `M-x'.
The Elisp manual is your friend...
https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Commands.html
https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Interactive.html
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [External] : Q3 - how to delete by words, not cut?
2024-12-19 2:31 ` Drew Adams
@ 2024-12-20 0:19 ` Tatsu Takamaro
2024-12-20 1:38 ` Drew Adams
0 siblings, 1 reply; 17+ messages in thread
From: Tatsu Takamaro @ 2024-12-20 0:19 UTC (permalink / raw)
To: Drew Adams, help-gnu-emacs@gnu.org
Got it! Just needed to use a function name that I defined in the first
line of "defun..."
"C-S-<left>" #'tt-delword-backward
"C-S-<right>" #'tt-delword-forward
So easy! I entangled myself trying to find out "some way to bind a whole
piece of code to a key".
*
*
*>>You need to read up on `interactive'. *
Yes, you're right. The word "interactive" played a trick on me first.
English is not my native and the docs could be tricky sometimes. I
learned Lisp (it was Scheme (script fu), a dialect of Lisp to create
plugins for GIMP) many years ago, rather unusual language and that's
what makes it interesting.
Thanks for your patience in explaining! I'm grateful to you and to all
who has been answering!
So, now there is only one question stays unanswered. I posted it under
title "Q4 - the bottom edge of Emacs doesn't stick to the taskbar", no
answers for now.
чт, 19.12.2024 5:31, Drew Adams пишет:
>>> Did you try the `my-backward-delete-word' command I defined for you?
>> Sorry, I didn't try it before. Because I didn't understand it
>> by that time (and I have a habbit not to run any code until I
>> understand it good enough).
> A good habit! No reason to be sorry for that.
>
>> But now I dived into it and got it...
>> Though the function logic is clear, the key binding won't work.
>> I tried different keys. Here is the current state:
>>
>> (defun tt-delword-backward (arg)
>> "Delete backward arg words. (default 1)"
>> (interactive "C-;") ; <==============
>> (let ((opt (point)))
>> (backward-word arg)
>> (delete-region opt (point))))
>>
>> (defun tt-delword-forward (arg)
>> "Delete forward arg words. (default 1)"
>> (interactive "C-'") ; <==============
>> (let ((opt (point)))
>> (forward-word arg)
>> (delete-region opt (point))))
>>
>> I tried to set (interactive "b") and (interactive "f")
>> for backward and forward respectively.
> No. You need to read up on `interactive'.
> This is what I suggested:
>
> (defun my-backward-delete-word (arg)
> "Delete backard ARG words.
> ARG is the numeric prefix arg (default 1)."
> (interactive "p")
> (let ((opt (point)))
> (backward-word arg)
> (delete-region opt (point))))
>
> The "p" arg for `interactive' passes the current
> numeric prefix arg that a user supplies as the
> argument (ARG). That defaults to 1, if the user
> doesn't explicitly provide any prefix arg.
>
> So with no arg it deletes one word (backward).
> With `M-1' it does the same thing. With `M-2'
> it deletes two words, etc.
>
> This is common for Emacs commands that act on
> things from the cursor position - you can use
> the same command and key binding to act on N
> things by using `C-u N' (or `M-n' for small #s).
>
>> When "C-;" is set the minibuffers says it's undefined, when letters are set it just type letters. The call by M-x doesn't do the job either.
> Fix your `interactive' argument. It's not a
> key description. `interactive' has nothing to
> do with any key binding. It specifies how
> arguments (in this case argument ARG) are
> provided when the function's invoked interactively.
>
> I followed that command definition with this:
>
> Bind it to some key.
>
> IOW: you define a command and you bind that
> command to a key (if you want). If not bound
> to a key you can still invoke it, with `M-x'.
>
> The Elisp manual is your friend...
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Commands.html
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Interactive.html
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [External] : Q3 - how to delete by words, not cut?
2024-12-20 0:19 ` Tatsu Takamaro
@ 2024-12-20 1:38 ` Drew Adams
2024-12-20 2:18 ` [External] : Q3 - how to delete by words, not cut? --- about Q4 - the bottom edge of Emacs doesn't stick to the taskba Tatsu Takamaro
0 siblings, 1 reply; 17+ messages in thread
From: Drew Adams @ 2024-12-20 1:38 UTC (permalink / raw)
To: Tatsu Takamaro, help-gnu-emacs@gnu.org
From: Tatsu Takamaro Sent: Thursday, December 19, 2024 4:19 PM
> Got it! Just needed to use a function name that I defined in the first line of "defun..."
"C-S-<left>" #'tt-delword-backward
"C-S-<right>" #'tt-delword-forward
> So easy! I entangled myself trying to find out "some way to bind a whole piece of code to a key".
>
>>You need to read up on `interactive'.
>
> Yes, you're right. The word "interactive" played a trick on me first. English is not my native and the docs could be tricky sometimes. I learned Lisp (it was Scheme (script fu), a dialect of Lisp to create plugins for GIMP) many years ago, rather unusual language and that's what makes it interesting.
You're doing fine. It takes time to find one's way around these things. A few things, in particular, are a bit complicated (key bindings, menus, font-lock, display-buffer-alist,...).
> Thanks for your patience in explaining! I'm grateful to you and to all who has been answering!
You're welcome.
> So, now there is only one question stays unanswered. I posted it under title "Q4 - the bottom edge of Emacs doesn't stick to the taskbar", no answers for now.
I did answer that. IMO, it's not super-straightforward. As I said (Eli didn't agree), Emacs doesn't know about a Windows task bar. (The task bar can be in different places and have different sizes. AFAIK, you need to access the registry to find out its details.)
Unless someone gives you a simpler approach, maybe take a look at `frame-cmds.el' and `oneonone.el' for info about how I, at least, position/resize frames so their bottoms are on the task bar.
https://www.emacswiki.org/emacs/download/frame-cmds.el
https://www.emacswiki.org/emacs/download/oneonone.el
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [External] : Q3 - how to delete by words, not cut? --- about Q4 - the bottom edge of Emacs doesn't stick to the taskba
2024-12-20 1:38 ` Drew Adams
@ 2024-12-20 2:18 ` Tatsu Takamaro
2024-12-20 15:34 ` Drew Adams via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 17+ messages in thread
From: Tatsu Takamaro @ 2024-12-20 2:18 UTC (permalink / raw)
To: Drew Adams, help-gnu-emacs@gnu.org
I did answer that. IMO, it's not super-straightforward. As I said (Eli didn't agree), Emacs doesn't know about a Windows task bar. (The task bar can be in different places and have different sizes. AFAIK, you need to access the registry to find out its details.)
Unless someone gives you a simpler approach, maybe take a look at `frame-cmds.el' and `oneonone.el' for info about how I, at least, position/resize frames so their bottoms are on the task bar.
https://www.emacswiki.org/emacs/download/frame-cmds.el
https://www.emacswiki.org/emacs/download/oneonone.el
I didn't get the mail with Q4 at all, nor in the Trash bin, don't know
why ...
And what about Linux? Next year I plan to migrate to Debian, with
Wayland. Will I have the same matter there?
For now I just calculate the height in characters by the hit-and-miss
method. But I'll have to do it on every new machine or monitor, so it's
better to have a way out.
Maybe, setting in percents. The height of a taskbar is 60 px for my 4k
(ultraHD) monitor, so it's 60 out of 2160 px, or 2,(7)% (~2,8%) of a
screen height. Thus, an Emacs'es height may be 99,97% of the screen's.
But I'm afraid the size may differ. So what about Debian?
пт, 20.12.2024 4:38, Drew Adams пишет:
> From: Tatsu Takamaro Sent: Thursday, December 19, 2024 4:19 PM
>
>> Got it! Just needed to use a function name that I defined in the first line of "defun..."
> "C-S-<left>" #'tt-delword-backward
> "C-S-<right>" #'tt-delword-forward
>
>> So easy! I entangled myself trying to find out "some way to bind a whole piece of code to a key".
>>
>>> You need to read up on `interactive'.
>> Yes, you're right. The word "interactive" played a trick on me first. English is not my native and the docs could be tricky sometimes. I learned Lisp (it was Scheme (script fu), a dialect of Lisp to create plugins for GIMP) many years ago, rather unusual language and that's what makes it interesting.
> You're doing fine. It takes time to find one's way around these things. A few things, in particular, are a bit complicated (key bindings, menus, font-lock, display-buffer-alist,...).
>
>> Thanks for your patience in explaining! I'm grateful to you and to all who has been answering!
> You're welcome.
>
>> So, now there is only one question stays unanswered. I posted it under title "Q4 - the bottom edge of Emacs doesn't stick to the taskbar", no answers for now.
> I did answer that. IMO, it's not super-straightforward. As I said (Eli didn't agree), Emacs doesn't know about a Windows task bar. (The task bar can be in different places and have different sizes. AFAIK, you need to access the registry to find out its details.)
>
> Unless someone gives you a simpler approach, maybe take a look at `frame-cmds.el' and `oneonone.el' for info about how I, at least, position/resize frames so their bottoms are on the task bar.
>
> https://www.emacswiki.org/emacs/download/frame-cmds.el
>
> https://www.emacswiki.org/emacs/download/oneonone.el
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: [External] : Q3 - how to delete by words, not cut? --- about Q4 - the bottom edge of Emacs doesn't stick to the taskba
2024-12-20 2:18 ` [External] : Q3 - how to delete by words, not cut? --- about Q4 - the bottom edge of Emacs doesn't stick to the taskba Tatsu Takamaro
@ 2024-12-20 15:34 ` Drew Adams via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 17+ messages in thread
From: Drew Adams via Users list for the GNU Emacs text editor @ 2024-12-20 15:34 UTC (permalink / raw)
To: Tatsu Takamaro, help-gnu-emacs@gnu.org
You can see all threads here:
https://mail.gnu.org/archive/html/help-gnu-emacs/2024-12/
For your Q4:
1. https://mail.gnu.org/archive/html/help-gnu-emacs/2024-12/msg00329.html
1. https://mail.gnu.org/archive/html/help-gnu-emacs/2024-12/msg00332.html
1. https://mail.gnu.org/archive/html/help-gnu-emacs/2024-12/msg00337.html
1. https://mail.gnu.org/archive/html/help-gnu-emacs/2024-12/msg00340.html
From: Tatsu Takamaro Sent: Thursday, December 19, 2024 6:18 PM
I did answer that. IMO, it's not super-straightforward. As I said (Eli didn't agree), Emacs doesn't know about a Windows task bar. (The task bar can be in different places and have different sizes. AFAIK, you need to access the registry to find out its details.)
Unless someone gives you a simpler approach, maybe take a look at `frame-cmds.el' and `oneonone.el' for info about how I, at least, position/resize frames so their bottoms are on the task bar.
https://www.emacswiki.org/emacs/download/frame-cmds.el<https://urldefense.com/v3/__https:/www.emacswiki.org/emacs/download/frame-cmds.el__;!!ACWV5N9M2RV99hQ!PZ0MgSa4moLLIWdSL3Jxfvrb3ch_y6Cjq-yl6pCi618PIjLupxLS4TUhygA2dC4smnfUcrev8CZWb3nWZf3UCoZA$>
https://www.emacswiki.org/emacs/download/oneonone.el<https://urldefense.com/v3/__https:/www.emacswiki.org/emacs/download/oneonone.el__;!!ACWV5N9M2RV99hQ!PZ0MgSa4moLLIWdSL3Jxfvrb3ch_y6Cjq-yl6pCi618PIjLupxLS4TUhygA2dC4smnfUcrev8CZWb3nWZZVd_Dg7$>
I didn't get the mail with Q4 at all, nor in the Trash bin, don't know why ...
And what about Linux? Next year I plan to migrate to Debian, with Wayland. Will I have the same matter there?
Dunno. The same general approaches apply. The code I cited is relevant for any platform, in principle.
For now I just calculate the height in characters by the hit-and-miss method. But I'll have to do it on every new machine or monitor, so it's better to have a way out.
Maybe, setting in percents. The height of a taskbar is 60 px for my 4k (ultraHD) monitor, so it's 60 out of 2160 px, or 2,(7)% (~2,8%) of a screen height. Thus, an Emacs'es height may be 99,97% of the screen's. But I'm afraid the size may differ. So what about Debian?
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2024-12-20 15:34 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-14 23:57 Q3 - how to delete by words, not cut? Tatsu Takamaro
2024-12-15 2:42 ` [External] : " Drew Adams
2024-12-15 2:45 ` Drew Adams
2024-12-16 23:26 ` Tatsu Takamaro
2024-12-17 0:01 ` Drew Adams
2024-12-17 0:26 ` Tatsu Takamaro
2024-12-17 2:28 ` Drew Adams
2024-12-18 23:54 ` Tatsu Takamaro
2024-12-19 2:31 ` Drew Adams
2024-12-20 0:19 ` Tatsu Takamaro
2024-12-20 1:38 ` Drew Adams
2024-12-20 2:18 ` [External] : Q3 - how to delete by words, not cut? --- about Q4 - the bottom edge of Emacs doesn't stick to the taskba Tatsu Takamaro
2024-12-20 15:34 ` Drew Adams via Users list for the GNU Emacs text editor
2024-12-17 8:38 ` [External] : Q3 - how to delete by words, not cut? Vagn Johansen
2024-12-17 4:06 ` Jean Louis
2024-12-17 4:12 ` Drew Adams
2024-12-17 4:25 ` Jean Louis
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).