Skip to main content
deleted 154 characters in body
Source Link
Kaushal Modi
  • 26.4k
  • 4
  • 84
  • 193

The documentation for org-publish says:

(org-publish PROJECT &optional FORCE ASYNC)

Publish PROJECT.

PROJECT is either a project name, as a string, or a project alist (see `org-publish-project-alist' variable).

So I haven't tested this, but (global-set-key (kbd "C-c C-1") 'org-publish "foo") should do the trick.

EDIT: Based on the comments I hope maybe this is closer to a working solution:

(define-key org-mode-map (kbd "C-c C-1") (lambda () (interactive) (org-publish "foo")))

(define-key org-mode-map (kbd "C-c C-1") (lambda () (interactive) (org-publish "foo"))) 

The documentation for org-publish says:

(org-publish PROJECT &optional FORCE ASYNC)

Publish PROJECT.

PROJECT is either a project name, as a string, or a project alist (see `org-publish-project-alist' variable).

So I haven't tested this, but (global-set-key (kbd "C-c C-1") 'org-publish "foo") should do the trick.

EDIT: Based on the comments I hope maybe this is closer to a working solution:

(define-key org-mode-map (kbd "C-c C-1") (lambda () (interactive) (org-publish "foo")))

The documentation for org-publish says:

(org-publish PROJECT &optional FORCE ASYNC)

Publish PROJECT.

PROJECT is either a project name, as a string, or a project alist (see `org-publish-project-alist' variable).

(define-key org-mode-map (kbd "C-c C-1") (lambda () (interactive) (org-publish "foo"))) 
Source Link
Brian Z
  • 3k
  • 20
  • 24

The documentation for org-publish says:

(org-publish PROJECT &optional FORCE ASYNC)

Publish PROJECT.

PROJECT is either a project name, as a string, or a project alist (see `org-publish-project-alist' variable).

So I haven't tested this, but (global-set-key (kbd "C-c C-1") 'org-publish "foo") should do the trick.

EDIT: Based on the comments I hope maybe this is closer to a working solution:

(define-key org-mode-map (kbd "C-c C-1") (lambda () (interactive) (org-publish "foo")))

The documentation for org-publish says:

(org-publish PROJECT &optional FORCE ASYNC)

Publish PROJECT.

PROJECT is either a project name, as a string, or a project alist (see `org-publish-project-alist' variable).

So I haven't tested this, but (global-set-key (kbd "C-c C-1") 'org-publish "foo") should do the trick.

The documentation for org-publish says:

(org-publish PROJECT &optional FORCE ASYNC)

Publish PROJECT.

PROJECT is either a project name, as a string, or a project alist (see `org-publish-project-alist' variable).

So I haven't tested this, but (global-set-key (kbd "C-c C-1") 'org-publish "foo") should do the trick.

EDIT: Based on the comments I hope maybe this is closer to a working solution:

(define-key org-mode-map (kbd "C-c C-1") (lambda () (interactive) (org-publish "foo")))

Source Link
Brian Z
  • 3k
  • 20
  • 24

The documentation for org-publish says:

(org-publish PROJECT &optional FORCE ASYNC)

Publish PROJECT.

PROJECT is either a project name, as a string, or a project alist (see `org-publish-project-alist' variable).

So I haven't tested this, but (global-set-key (kbd "C-c C-1") 'org-publish "foo") should do the trick.