Re: Possible File Saving Bug with [/]?

2023-09-07 Thread Summer Emacs



> On Sep 7, 2023, at 12:49, Ihor Radchenko  wrote:
> 
> Summer Emacs  writes:
> 
>> 3) In one of the headers, it looked something like this:
>> * C-c C-c on [/] to update done items in todo list.
>> 
>> That [/] just like that was creating a backup file on every save named 
>> .#emacshelp.org# —> summer@summer.local.23434:882343 (those are made up 
>> numbers but it was always random and looked something like that in the ls 
>> -la command in terminal.)
> 
> Saving .#emacshelp.org# backup files is controlled by your configuration
> - it is the default Emacs behaviour to save them.
> 

Yes, I know. 🙃

>> Since I regularly add notes to my file, I also use Magit to save a backup 
>> copy (M-x g). But whenever I did that, it would ask if I wanted to save 
>> emacshelp.org. Obviously it was being affected by the backup file (which was 
>> never open in a buffer, it just was “there” in the directory).
>> 
>> An example of Magit interaction for adding/committing changes to that file 
>> would look something like this: (from emacshelp.org file)
>> 
>> 1) M-x g
>> 2) Minibuffer: Do you want to save emacshelp.org? Y/n/etc…
>> 3) s
>> 4) Minibuffer: Do you want to save emacshelp.org? Y/n/etc…
>> 5) c c
>> 6) Minibuffer: Do you want to save emacshelp.org? Y/n/etc…
>> ...
> 
> This is abnormal.

I know this too. 🙃

> 
>> You get the idea. Every single thing I did in Magit would ask me this. My 
>> file (the original - emacshelp.org) was saved with C-x C-s AND even C-x s to 
>> save all files. But it didn’t matter how I answered that question, it would 
>> keep asking it no matter what. No matter what I did, it kept asking me that 
>> question, over and over and over again. Because of that “backup” file.
>> 
>> Note: This is behaviour which *only* happened with this single file, not 
>> with any other file I use.
> 
> My suspicion that it is triggered by some kind of strange
> `after-save-hook' in your config.

Perhaps - but see below.

> 
>> Finally, putting = = around [/] in my notes to produce: =[/]= escaped that 
>> behaviour. It no longer does that. It took me an hour of rebuilding my file 
>> line by line to figure out *why* this was happening, but that was the line 
>> and that was the exact problem.
> 
> [/] in Org is called statistics cookie and some parts of Org may alter
> it to refresh TODO/checkbox statistics. See "5.5 Breaking Down Tasks
> into Subtasks".
> 
> However, I do not see why this should happen _after_ save, unless
> something in your config is triggering the update.
> 

This is why I reached out. It *only* happens if I put [/] in an org file and 
save it. I thought maybe that it was a bug in org because it’s trying to eval 
it without any numbers in it, and no list under it, so maybe it’s just borked 
in some way in that specific circumstance. Other than that, I have no idea.

> Without more information, I cannot provide more assistance
> unfortunately. I also do not see how we can help on Org side as the
> problem _appears_ to be with your personal config.
> 

Again: My config works with all of my other files. Every single one. Org files, 
md files, .txt files - you name it. It’s *only* when I put [/] in an org file 
just like that. That’s the only time my saves/backups ever borked on me. So 
that’s why I reached out. If my config was doing this in general, I wouldn’t 
have thought it was an Org issue. But since it *only* occurs with an org file 
which has an empty [/] and no list under it, I thought maybe it would be an org 
issue. I could be wrong, but since that’s what triggers it…you tell me.

As for it being an inconvenient: it’s not. Since I escape the [/] with = =, it 
doesn’t do that anymore. So no worries there. It’s the only example I have 
where I use that without a list under it for it to evaluate. So it’s not 
actually an issue anymore. I just figured I would call your attention to it 
possibly being a bug if that ever happens again to somebody else. 🙃

Thanks! 🙃

> -- 
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>




Re: Possible File Saving Bug with [/]?

2023-09-07 Thread Summer Emacs
Hi! Sorry for the delay in replies. I was super busy yesterday, last night, and 
this morning. Ok! Let’s get to it:

1) I’m not going to reproduce the bug because it’s super annoying for me to try 
to get rid of because I have to kill extra buffers to do it, restart emacs, fix 
the git repo etc…and I don’t have time for that right now. I just have a few 
minutes before lunch so here goes:

2) My help file includes examples of commands, such as:
* C-x C-q - In dired, lets you enter edit mode to rename files
* C-u C-c C-q - Re-aligns tags (this isn’t a direct quote I’m just making this 
up to show you examples.

3) In one of the headers, it looked something like this:
* C-c C-c on [/] to update done items in todo list.

That [/] just like that was creating a backup file on every save named 
.#emacshelp.org# —> summer@summer.local.23434:882343 (those are made up numbers 
but it was always random and looked something like that in the ls -la command 
in terminal.)

Since I regularly add notes to my file, I also use Magit to save a backup copy 
(M-x g). But whenever I did that, it would ask if I wanted to save 
emacshelp.org. Obviously it was being affected by the backup file (which was 
never open in a buffer, it just was “there” in the directory).

An example of Magit interaction for adding/committing changes to that file 
would look something like this: (from emacshelp.org file)

1) M-x g
2) Minibuffer: Do you want to save emacshelp.org? Y/n/etc…
3) s
4) Minibuffer: Do you want to save emacshelp.org? Y/n/etc…
5) c c
6) Minibuffer: Do you want to save emacshelp.org? Y/n/etc…
7) Write commit message
8) C-c C-c
9) Minibuffer: Do you want to save emacshelp.org? Y/n/etc…
10) q
11) Minibuffer: Do you want to save emacshelp.org? Y/n/etc…

You get the idea. Every single thing I did in Magit would ask me this. My file 
(the original - emacshelp.org) was saved with C-x C-s AND even C-x s to save 
all files. But it didn’t matter how I answered that question, it would keep 
asking it no matter what. No matter what I did, it kept asking me that 
question, over and over and over again. Because of that “backup” file.

Note: This is behaviour which *only* happened with this single file, not with 
any other file I use.

Finally, putting = = around [/] in my notes to produce: =[/]= escaped that 
behaviour. It no longer does that. It took me an hour of rebuilding my file 
line by line to figure out *why* this was happening, but that was the line and 
that was the exact problem.

I don’t know why it did that but I *suspect* (and remember I’m a personal 
assistant, not a coder) that since URLs start and end with [] in org-mode, it 
may be trying to look for some sort of url fetch thing? Like it’s a broken link 
it’s trying to figure out? Hence the port number in the backup file name? I 
honestly don’t know and I’m not the person to ask. 🙃

That’s all I can say about it.  That’s all the info that I have. I hope that I 
was more clear this time. 🙃 TYSM for trying to help and again sorry for the 
delayed response.

Summer.


> On Sep 7, 2023, at 12:12, Ihor Radchenko  wrote:
> 
> Samuel Wales  writes:
> 
>> lock file?  in 27 (info "(emacs) Interlocking") strangely does not
>> mention .# but it could be the concept in question.
> 
> #... is a backup file. There is nothing wrong or surprising about it.
> 
> However, the bug report is not clear enough for me to try reproducing
> things on my side. I am even not sure what exactly is the problem - is
> it creating the backup (which is normal) or is it save confirmation
> dialogue?
> 
> That's why I asked more details.
> 
> -- 
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at 




Addendum

2023-09-05 Thread Summer Emacs
As per my email here: 
https://list.orgmode.org/4705ccd7-f1ed-489b-9d17-ea6fe0b23...@summerstar.me/T/#u

I think I figured out *why* that behaviour is happening: Because there was no 
list under it. Since URLS in org start and end with [[ ]], maybe it was 
interpreting it as an incomplete URL and trying to resolve it? Hence the port 
number etc… I’m not certain. I just wanted to mention that before anyone piles 
on me for not recognising that fact. 🙃

Summer Emacs




Possible File Saving Bug with [/]?

2023-09-05 Thread Summer Emacs
Hi!

I’m not sure if this is a bug or not, but after hunting down the problem for an 
hour (and finding it), I felt that I needed to report this just in case.

I have a .org file which is just a list of Emacs commands I like to keep handy 
to refer to (navigation, selection, commands in some modes etc…) One of these 
had help about the [/] command for a header for a list. However, because I had 
[/] and no numbers in it (it was just an example to show me how to do it if I 
forgot), it kept saving a backup copy of that file anytime that I saved it, and 
kept that backup “alive” to track. The name of the regular file is 
emacshelp.org, and the file it kept creating in my directory was 
.#emacshelp.org#  -> 
summer@summer.localhost.randomnumberhere:randomportnumberhere

This was intensely annoying because anytime that I did a Magit stage and 
commit, it would keep asking me if I wanted to save the file - every time I 
would input a command in Magit for every stage/commit etc…

Just adding = = around the [/] removed this behaviour.

Again: Since it took me an hour to figure out, as was frustrating as hell, to 
find the “bug" (I don’t know how you programmers do this for a living…), I 
figured I’d report it.

I’m running Emacs on a MacBook Pro (M series). I doubt it has something to do 
with the OS, but please ask if you need more info.

I’m sorry to spam everyone if this is already a known behaviour. 
Emacs Version: d12frosted’s emacs plus, 30.0.50
Org version: 9.6.7

Thanks!

Summer Emacs




Re: Updating Emacs

2022-08-22 Thread Summer Emacs


Gerardo Moro @ 2022-08-22 13:31 :

> Dear all,

Hi! 🙃

> I currently use Emacs 27.2 (9.0) and need to update to the last version.
> No idea how my current Emacs was installed on my Mac.

You probably installed it via brew.
https://brew.sh

> In case this helps, when I do on Terminal:
>
> § which -a- emacs
>
> /usr/local/bin/emacs
> /opt/local/bin/emacs
> /usr/local/bin/emacs
>
> What would the way to go to update my emacs to the last version without 
> affecting any of my configuration or packages?

I would install railwaycat as it's built with mac stuff in mind (such as
trackpad zoom, mac modifier keys, etc...)

https://github.com/railwaycat/homebrew-emacsmacport

It's installed via brew as well and works very nicely. It'll upgrade you
to 28.1 and should be fairly painless.

Note:

You'll probably have paths to it such as:
/opt/homebrew/Cellar/emacs-mac/emacs-28.1-mac-9.0
and
/opt/homebrew/Cellar/emacs-mac/emacs-28.1-mac-9.0/share/emacs/28.1/etc/

Note that /opt is for M1 macs only. If you have an Intel, it will be in
/usr, I think. It won't be hard to find as it sets it up for you and
outputs stuff in the terminal which you should copy/paste into a note to
make sure you remember it (and debug if there are any problems).

I hope this helps!

One more thing to note: I'm pretty new to it all, I've only been doing
it for a couple of months, but I figured I would reply and see if I can
help from my own experience. Also, I literally write everything down in
notes (using Prot's denote) so that I don't forget stuff like this. 🙃

> Thanks!
> G.

Summer.

P.S. If you're just using terminal on a Mac, that's fine, but I would
check out iTerm 2 (completely free and amazing): https://iterm2.com


--
Summer,
Sent from MU4E in Emacs,
Because I'm becoming a NEWBIE at this!



Re: C-c $ missing?

2022-08-19 Thread Summer Emacs


Mark Barton @ 2022-08-19 03:02 :

> [... 8 lines elided]

> You are welcome. You may eventually want to read about Speed Keys in Org mode 
> that is enabled with the org-use-speed-commands
> variable. That enables you to just press "a" when at the beginning of a 
> headline to archive that subtree. I use speed keys daily to
> clock-in to a task and to refile a task into one of my project subtrees.

tysvm! 🙃 I had no idea that existed and I will be reading about it
pretty soon. I just pulled up some web pages about it and will read them
this evening.

--
Summer,
Sent from MU4E in Emacs,
Because I'm becoming a NEWBIE at this!



Re: C-c $ missing?

2022-08-18 Thread Summer Emacs


Mark Barton @ 2022-08-18 23:37 :

> [... 5 lines elided]

> On my Emacs setup C-c $ is mapped to flyspell-correct-word-before-point, but 
> C-h b  shows that it is bound to org-archive-subtree.
> Did you recently enable spellcheck in org mode?

Aha! that must be it because I enabled flyspell globally in all text/org
docs just 2 days ago but I had forgotten that I did that.

> If I M-x flyspell-mode to turn off flyspell then C-c $ is mapped back to 
> org-archive-subtree.
>
> If that is the case for you, you could try adding this to your init file.
>
> (eval-after-load "flyspell"
>   '(define-key flyspell-mode-map (kbd "C-c $") nil))

TY! That's exactly what I was hoping for. And thank you to Ihor and Matt
as well for pointing me in the right direction. I was just reading up on
C-c $ with C-h k when you replied so thank you to all of you for helping
out. Noted everything down for future reference. 🙃

> Mark

--
Summer,
Sent from MU4E in Emacs,
Because I'm becoming a NEWBIE at this!



Re: C-c $ missing?

2022-08-18 Thread Summer Emacs


Matt @ 2022-08-18 19:19 :

>   On Thu, 18 Aug 2022 12:46:23 -0400  Summer Emacs  wrote ---
>  >
>  > Hi everyone, first time posting. I hope it's okay to ask this here (I'm
>  > totally new):
>
> Welcome!

ty! 🙃

>  > Since this morning (I updated a few packages but not sure which), C-c $
>  > is missing in org mode? It's how I used to archive tasks when they were
>  > done. I know that I can use C-c C-x C-s but I used to just use C-c $ and
>  > it worked. Did something change with an update?
>  >
>  > (I think it was C-c $ or maybe C-x $? Sometimes I get the two confused)
>
> I don't know if anything changed with Org, I'll let others speak to
> that.  However, in the mean time, check C-h k C-c C-x C-s to see what
> command is bound to that sequence (is it org-archive-subtree?).  Then
> you can bind it with something like:

Yep it's that. 🙃

> (eval-after-load 'org-mode
>   (define-key org-mode-map (kbd "C-c C-x C-s") #'org-archive-subtree))

It's already bound to that so no need. 🙃

> This says, "after loading org-mode for the first time, define the key
> sequence within the variable telling Emacs what keys do what for
> org-mode to call the function org-archive-subtree when it sees C-c C-x
> C-s."  The C-h f and C-h v commands describe-function and
> describe-variable can probably explain that better.

C-c C-x C-s was never in question. 🙃 I was asking what happened to 'C-c
$' because that *would* actually archive the subtree instead of having
to type out C-c C-x C-s. It's even in my notes for emacs commands to use
and I used to use it every day for DONE tasks. 🙃

>From my notes:

* C-c C-t - Change task status
* C-c $ - Archive subtree

See? It's there. 🙃

(Sorry for the hearts emojis those are my bullets in org mode I just
copy/pasted)

So I was just curious as to what happened to C-c $? But as to your
explanation for the code, I will keep that and use it whenever it comes
up! Ty! I *have* done *basic* keybinds before but nothing more than
that. In fact, I'm putting your code in my denote files for later
reference. Thank you very much. 🙃


> [... 4 lines elided]

> We all start somewhere!   I hope this helps.  Just saw your message as I was 
> passing by.  If it's unclear, that's totally my fault!

Yea we definitely do. TY for your reply. 🙂

--
Summer,
Sent from MU4E in Emacs,
Because I'm becoming a NEWBIE at this!



C-c $ missing?

2022-08-18 Thread Summer Emacs


Hi everyone, first time posting. I hope it's okay to ask this here (I'm
totally new):

Since this morning (I updated a few packages but not sure which), C-c $
is missing in org mode? It's how I used to archive tasks when they were
done. I know that I can use C-c C-x C-s but I used to just use C-c $ and
it worked. Did something change with an update?

(I think it was C-c $ or maybe C-x $? Sometimes I get the two confused)

--
Summer,
Sent from MU4E in Emacs,
Because I'm becoming a NEWBIE at this!