小编Jon*_*pin的帖子

org-html-publish-to-html上的隐秘消息

我试图将组织文件发布到html但是在尝试发布我的.org文件时收到此错误:

org-export-dispatch: Wrong number of arguments: #[(&optional force) "
Run Code Online (Sandbox Code Playgroud)

然后是一堆奇怪的符号,不会粘贴......后面跟着

[wconfig force org-publish-use-timestamps-flag project current-window-configuration     ((setwindow-configuration wconfig)) org-publish-get-project-from-filename buffer-file-name up     error ...] 4 ("/usr/share/emacs/24.1/lisp/org/org-publish.elc" . 31315) "P"], 2
Run Code Online (Sandbox Code Playgroud)

以下是我的.emacs文件的相关部分的设置:

(require 'org-publish)
(setq org-publish-alist
  '(("org-html" 
 :base-directory "~/org/"
 :base-extension "org"
 :publishing-directory "~/public_html/"
 :recursive t
 :publishing-function org-html-publish-to-html
 :table-of-contents: nil
 :auto-postamble nil
 )
("org-static"
 :base-directory "~/org/"
 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
 :publishing-directory "~/public_html/files"
 :recursive t
 :publishing-function org-publish-attachment
 )
   ("org" :components ("org-html" "org-static"))
   )
  )
Run Code Online (Sandbox Code Playgroud)

有关为什么不发布的任何建议?

html emacs org-mode

4
推荐指数
1
解决办法
557
查看次数

如何在Powershell中编写函数以创建函数

在Powershell中是否可以根据一组输入变量生成函数?我尝试将条件包装在脚本块和方括号中以强制进行评估,但充其量我将其作为回报:

The term 'function' is not recognized as the name of a cmdlet, function, [...]
Run Code Online (Sandbox Code Playgroud)

否则,该函数似乎可以运行,但是不会创建新的函数绑定。

这不起作用(也不包裹身体& {}& ({})& {()}

function gen-test ($test) {
    function get-$test {
        Write-Output "This is $test"
    }
}
Run Code Online (Sandbox Code Playgroud)

我希望基于传递的值而不是预定义的名称来生成名称。

语境

我必须支持多个域,并且正在寻找一种简化函数编码以从中返回特定信息的方法。目前,我有一组类型的功能Get-<domain>Info(每个域一个),其中的信息取决于我是否需要帐户设置,组成员身份等。

如果没有办法做到这一点,我将不得不Get-Info <identification> -server <domain>使用默认域进行查询。但是,我打算与同事分享这些内容,并希望使其尽可能简单/直接。

powershell function

2
推荐指数
1
解决办法
136
查看次数

标签 统计

emacs ×1

function ×1

html ×1

org-mode ×1

powershell ×1