reddit / emacs

Move files in Emacs [OC]

zck · 2022-06-29 03:03
bugamn · 2022-06-29 06:58
I've wanted a function like that before, so I'm glad to hear it's official now!
[deleted] · 2022-06-29 08:54
[deleted]
[deleted] · 2022-06-29 09:06
[deleted]
JadeStoneHeart · 2022-06-29 09:07
> If you build Emacs from source, the function is now in the Emacs git repository. If you don't build from source, it will be available in the next release. **If you don't run Emacs, it's not available at all.** I appreciate the clarity.
pathemata · 2022-06-29 09:32
On a similar note,[ `dired-ranger`](https://github.com/Fuco1/dired-hacks/blob/master/dired-ranger.el) has some awesome copy/paste/move functions.
_viz_ · 2022-06-29 12:44
What do they offer over the standard dired commands? I never felt a need for anything extra especially with dired-dwim-target set to #'dired-dwim-target-next.
_viz_ · 2022-06-29 12:48
OT: Can you tweak the website layout so that increasing the font size doesn't shrink the area of the main content (i.e., the green box)? Hiding the sidebar when the font size is over a limit would be even better. Pulling out eww just for reading a single article is kind of a pain.
pathemata · 2022-06-29 12:56
> dired-dwim-target #'dired-dwim-target-next actaully I did not know about this. It is enough indeed, thanks.
tms9918 · 2022-06-29 13:39
Does it call the same stuff dired uses under the hood?
kaushalmodi · 2022-06-29 14:23
\+1 Though, reader mode on Firefox helps with this. **Update**: The Firefox/Chrome Add-on [Unclutter](https://scripter.co/unclutter-a-better-reader-view-for-browsers/) works even better,
kaushalmodi · 2022-06-29 14:24
Congrats on your [contribution](https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=772b189143453745a8e014e21d4b6b78f855bba3)! **Update** .. and your [earlier contributions](https://git.savannah.gnu.org/cgit/emacs.git/log/?qt=author&q=zkanfer) too :)
WallyMetropolis · 2022-06-29 14:45
Can you expand on that? I looked up the help page for dired-dwim-target-next but there's not real documentation there.
_viz_ · 2022-06-29 15:07
Rather than me trying to explain it, it would be much faster if you try it for yourself.
_viz_ · 2022-06-29 15:08
Don't have anything like that in chromium AFAIK :(
kaushalmodi · 2022-06-29 15:11
When you say _chromium_, would Chrome add-ons work? (I use only Firefox, so asking) If yes, check out my recent post on the [unclutter add-on](https://scripter.co/unclutter-a-better-reader-view-for-browsers/). It's available for both Chrome and Firefox.
_viz_ · 2022-06-29 15:17
Actually, I just remembered chrome/chromium does have a reader mode but you have to turn it on in chrome://flags. However, it does not popup for the OP so I guess I will be installing the extension regardless. Hopefully, I can turn off the navigation bar and the site's styling tho. Thanks for the link! EDIT: I see no such option. Too bad :(
kaushalmodi · 2022-06-29 15:39
The Unclutter add-on should "do the right thing" though. Does it work for you? I just auto-enabled that add-on on zck.org, and it's working better than the built-in Firefox Reader Mode.
vifon · 2022-06-29 15:41
It seems the documentation is in the `defcustom` form of `dired-dwim-target`.
vifon · 2022-06-29 15:48
Before you enable this option, trying using `M-n` at the `dired-do-rename` prompt. It should fetch the same result this setting would provide, but only on demand. I've found defaulting to the "smart" target of a rename often does more harm than good. On the other hand with `M-n` you can get it exactly when you need it. Many prompts provide such smart suggestions as the "future history" (that's why it's accessible under `M-n`). I wasn't able to quickly find the actual docs for it right now, so here's a random post about it I've found instead: https://engineering.collbox.co/post/working-faster-in-emacs-by-reading-the-future/
_viz_ · 2022-06-29 17:09
It does "do the right thing" but unfortunately it doesn't do it right enough for me: I don't like how it uses the site's CSS, the navbar in the side (I dislike navbars) and I saw no option to disable bother. /shrug
WallyMetropolis · 2022-06-29 17:31
Cool tip!
zck · 2022-06-29 18:05
I probably should've made the joke "if you run Vim, it's not available at all". Maybe I'll edit that in.
zck · 2022-06-29 18:14
Hrm, I'll see what is going on that it's doing that. I suspect the sidebar is some number of \`em\` wide, and increasing the font size increases the sidebar. I wonder what the "proper" thing to do is. Maybe make it a max size, and if it's not a certain number of pixels wide, hide it? Or put it at the top? Thanks for the pointer. I'm gonna have to learn some more CSS. Also gotta make it work better on mobile.
zck · 2022-06-29 18:15
Thanks! I recently finished the arduous process of getting my employer to sign the contribution agreement, so this is the first thing I've been able to contribute in a while.
zck · 2022-07-01 04:02
I've made it so that increasing the font size enough (or shrinking the browser window) will make the navbar move to the top. For some reason, most of the items in the navbar are disappearing when the browser window is narrower (as I want), but they don't disappear when the font is increased. I'm not sure why. I'll have to look into this more. But at least it should be readable now.
_viz_ · 2022-07-01 13:12
I think it would be better if at large sizes, you removed the green box and reduced the margin. But anyway, this is much better than what we had previously, thanks!
zck · 2022-07-01 14:56
I'll see what I can do -- I'm definitely not good at CSS, so I'll have to learn some stuff. I do want it to be readable, so I'll work on it. Thanks for the feedback!