all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* progn: Symbol’s function definition is void: f-symlink
@ 2021-12-18 14:40 Hongyi Zhao
  2021-12-18 15:40 ` Philip Kaludercic
  0 siblings, 1 reply; 3+ messages in thread
From: Hongyi Zhao @ 2021-12-18 14:40 UTC (permalink / raw)
  To: help-gnu-emacs

I use the following code in my `.emacs.d/init.el` to install the qe-modes [1]:

;;;;;;; begin ;;;;;;;
(let ((qe-modes-source "~/.emacs.d/qe-modes")
      (qe-modes-symlink "~/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes")
      (qe-modes-emacs "~/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes.emacs"))

  (when (not (file-directory-p (file-truename qe-modes-source)))
    (when (file-symlink-p qe-modes-source)
      (delete-file qe-modes-source))
    (f-symlink (file-truename qe-modes-symlink) qe-modes-source))

  (load-file qe-modes-emacs))
;;;;;;; end ;;;;;;;


All the files required for the above code exist on my computer:

werner@X10DAi-00:~$ ls ~/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes
cp-mode.el    neb-mode.el   pp-mode.el   pwtk-mode.el   qe-mode.el
cp-mode.elc   neb-mode.elc  pp-mode.elc  pwtk-mode.elc  qe-mode.elc
ld1-mode.el   ph-mode.el    pw-mode.el   qe-funcs.el    qe-modes.el
ld1-mode.elc  ph-mode.elc   pw-mode.elc  qe-funcs.elc   qe-modes.elc
werner@X10DAi-00:~$ ls ~/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes.emacs
/home/werner/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes.emacs


But when I start Emacs, the following error is triggered:

progn: Symbol’s function definition is void: f-symlink

Any hints for fixing this problem?

[1] http://pwtk.ijs.si/qe-modes.html

Regards
HZ



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: progn: Symbol’s function definition is void: f-symlink
  2021-12-18 14:40 progn: Symbol’s function definition is void: f-symlink Hongyi Zhao
@ 2021-12-18 15:40 ` Philip Kaludercic
  2021-12-19  0:30   ` Hongyi Zhao
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2021-12-18 15:40 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> I use the following code in my `.emacs.d/init.el` to install the qe-modes [1]:
>
> ;;;;;;; begin ;;;;;;;
> (let ((qe-modes-source "~/.emacs.d/qe-modes")
>       (qe-modes-symlink "~/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes")
>       (qe-modes-emacs "~/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes.emacs"))
>
>   (when (not (file-directory-p (file-truename qe-modes-source)))
>     (when (file-symlink-p qe-modes-source)
>       (delete-file qe-modes-source))
>     (f-symlink (file-truename qe-modes-symlink) qe-modes-source))
>
>   (load-file qe-modes-emacs))
> ;;;;;;; end ;;;;;;;
>
>
> All the files required for the above code exist on my computer:
>
> werner@X10DAi-00:~$ ls ~/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes
> cp-mode.el    neb-mode.el   pp-mode.el   pwtk-mode.el   qe-mode.el
> cp-mode.elc   neb-mode.elc  pp-mode.elc  pwtk-mode.elc  qe-mode.elc
> ld1-mode.el   ph-mode.el    pw-mode.el   qe-funcs.el    qe-modes.el
> ld1-mode.elc  ph-mode.elc   pw-mode.elc  qe-funcs.elc   qe-modes.elc
> werner@X10DAi-00:~$ ls ~/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes.emacs
> /home/werner/Public/hpc/QEF/q-e.git/GUI/QE-modes/qe-modes.emacs
>
>
> But when I start Emacs, the following error is triggered:
>
> progn: Symbol’s function definition is void: f-symlink

f-symlink is a function defined in the "f" package (a package that wraps
or composes built-in functionality for file system operations, see
https://github.com/rejeep/f.el).  You should be able to fix the issue by
replacing `f-symlink' with `make-symbolic-link' in the code snippet above.

> Any hints for fixing this problem?
>
> [1] http://pwtk.ijs.si/qe-modes.html
>
> Regards
> HZ
>
>

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: progn: Symbol’s function definition is void: f-symlink
  2021-12-18 15:40 ` Philip Kaludercic
@ 2021-12-19  0:30   ` Hongyi Zhao
  0 siblings, 0 replies; 3+ messages in thread
From: Hongyi Zhao @ 2021-12-19  0:30 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: help-gnu-emacs

On Sat, Dec 18, 2021 at 11:40 PM Philip Kaludercic <philipk@posteo.net> wrote:
> f-symlink is a function defined in the "f" package (a package that wraps
> or composes built-in functionality for file system operations, see
> https://github.com/rejeep/f.el).

Thank you for reminding me of this. In fact I've the following line in
my `.emacs.d/init.el`:

(use-package f :demand t)

But due to my negligence when editing my init file, the above line was
placed behind the problematic code block I mentioned above which cause
the problem discussed here.


> You should be able to fix the issue by replacing `f-symlink' with `make-symbolic-link' in the code snippet above.

Thank you for pointing this out. I've tried, and it works.

Regards,
HZ



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-19  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-18 14:40 progn: Symbol’s function definition is void: f-symlink Hongyi Zhao
2021-12-18 15:40 ` Philip Kaludercic
2021-12-19  0:30   ` Hongyi Zhao

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.