* [Howm-eng 131] Note file alias
@ 2018-02-12 6:12 xavier
2018-02-12 6:15 ` [Howm-eng 132] " xavier
0 siblings, 1 reply; 5+ messages in thread
From: xavier @ 2018-02-12 6:12 UTC (permalink / raw)
Hello,
I am considering switching from newsticker to elfeed as my RSS
feed reader.
I would like to maintain my feeds list into an Howm note (in
org-mode format).
So I quickly jotted a list after C-c , e RET and then C-c
C-c. That would have been quite useful to have a way to give an
alias (maybe it exists) when saving such that it would create a
symbolic link behind the scene.
Is there something like that ? I would have several use cases of
this ;)
Thank you
--
Xavier
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Howm-eng 132] Re: Note file alias
2018-02-12 6:12 [Howm-eng 131] Note file alias xavier
@ 2018-02-12 6:15 ` xavier
2018-02-22 13:49 ` [Howm-eng 140] " khi
0 siblings, 1 reply; 5+ messages in thread
From: xavier @ 2018-02-12 6:15 UTC (permalink / raw)
Hi again,
Xavier Maillard <xavier at maillard.im> writes:
> So I quickly jotted a list after C-c , e RET and then C-c
> C-c. That would have been quite useful to have a way to give an
> alias (maybe it exists) when saving such that it would create a
> symbolic link behind the scene.
This alias would be stored in a special folder under howm root
directory not to clutter the C-c , ,
--
Xavier
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Howm-eng 140] Re: Note file alias
2018-02-12 6:15 ` [Howm-eng 132] " xavier
@ 2018-02-22 13:49 ` khi
2018-02-22 20:44 ` [Howm-eng 141] " xavier
0 siblings, 1 reply; 5+ messages in thread
From: khi @ 2018-02-22 13:49 UTC (permalink / raw)
Hi.
Do you mean something like this?
;;;;;;;;;;;;;;;;;;;;;;
(defvar my-make-symlink-dir "~/foo/")
(defun my-make-symlink ()
"Make a symbolic link to the current buffer's file under `my-make-symlink-dir'."
(interactive)
(mkdir (expand-file-name my-make-symlink-dir) t)
(let* ((f (buffer-file-name))
(l (expand-file-name (file-name-nondirectory f)
my-make-symlink-dir)))
(make-symbolic-link f l)
(message l)))
;;;;;;;;;;;;;;;;;;;;;;
--
khi at users.osdn.me
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Howm-eng 141] Re: Note file alias
2018-02-22 13:49 ` [Howm-eng 140] " khi
@ 2018-02-22 20:44 ` xavier
2018-02-23 14:50 ` [Howm-eng 144] " khi
0 siblings, 1 reply; 5+ messages in thread
From: xavier @ 2018-02-22 20:44 UTC (permalink / raw)
Hi,
khi at users.sourceforge.jp writes:
> Hi.
>
> Do you mean something like this?
>
> ;;;;;;;;;;;;;;;;;;;;;;
> (defvar my-make-symlink-dir "~/foo/")
> (defun my-make-symlink ()
> "Make a symbolic link to the current buffer's file under
> `my-make-symlink-dir'."
> (interactive)
> (mkdir (expand-file-name my-make-symlink-dir) t)
> (let* ((f (buffer-file-name))
> (l (expand-file-name (file-name-nondirectory f)
> my-make-symlink-dir)))
> (make-symbolic-link f l)
> (message l)))
> ;;;;;;;;;;;;;;;;;;;;;;
Yeah, that is definetely what I am looking for with one exception:
I want to give a name to that alias and, maybe, I'd want it to be
included in the *howm* menu buffer.
I will try to modify your snippet.
--
Xavier
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Howm-eng 144] Re: Note file alias
2018-02-22 20:44 ` [Howm-eng 141] " xavier
@ 2018-02-23 14:50 ` khi
0 siblings, 0 replies; 5+ messages in thread
From: khi @ 2018-02-23 14:50 UTC (permalink / raw)
At Thu, 22 Feb 2018 21:44:31 +0100,
Xavier Maillard wrote:
> Yeah, that is definetely what I am looking for with one exception: I
> want to give a name to that alias and, maybe, I'd want it to be
> included in the *howm* menu buffer.
This is a modified version.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar my-make-symlink-dir "~/foo/")
(defun my-make-symlink ()
"Make a symbolic link to the current buffer's file under `my-make-symlink-dir'."
(interactive)
(mkdir (expand-file-name my-make-symlink-dir) t)
(let* ((f (buffer-file-name))
(af (abbreviate-file-name f))
(b (file-name-nondirectory f))
(l (expand-file-name (read-file-name (format "link name to %s: " af)
my-make-symlink-dir b nil b)
my-make-symlink-dir))
(al (abbreviate-file-name l)))
(make-symbolic-link f l)
(message (format "%s -> %s" al af))))
(defun my-embed-directory-files (dir)
(apply #'concat
(mapcar (lambda (f) (format "file://%s\n" (abbreviate-file-name f)))
(directory-files (expand-file-name dir) t "^[^.]"))))
;; after (require 'howm)
(add-to-list 'howm-menu-allow 'my-embed-directory-files)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
If you add
%here%(my-embed-directory-files "~/foo")
%"Link" %| %call%my-make-symlink %|
into the menu file ~/howm/0000-00-00-000000.txt,
the contents in ~/foo are embedded into the howm menu.
You can also call my-make-symlink with the key "L" in the menu.
--
khi at users.osdn.me
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-23 14:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-12 6:12 [Howm-eng 131] Note file alias xavier
2018-02-12 6:15 ` [Howm-eng 132] " xavier
2018-02-22 13:49 ` [Howm-eng 140] " khi
2018-02-22 20:44 ` [Howm-eng 141] " xavier
2018-02-23 14:50 ` [Howm-eng 144] " khi
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 NNTP newsgroup(s).