Hot answers tagged

22

There's gfm-mode (which is part of markdown-mode.el). From the commentary in the file: ;;; GitHub Flavored Markdown: ;; A [GitHub Flavored Markdown][GFM] (GFM) mode, `gfm-mode', is also ;; available. The GitHub implementation of differs slightly from ;; standard Markdown. The most important differences are that ;; newlines are significant, triggering ...


14

There is a project to allow such functionality, called org-sync. (Or rather, org-sync has a GitHub backend.) You can find it here. Unfortunately, it doesn't seem to be actively maintained. The main problem I have noticed is that it doesn't support syncing comments on the issues. As for milestones, it does attach an item to PROPERTIES that tells you which ...


7

I would do this outside of Emacs, with a wrapper script that pulls the updated config first. Something like this: #! /bin/sh cd ~/.emacs.d && git pull --rebase exec /usr/bin/emacs "$@" Then make this executable, name it emacs, and put it on your PATH before the real one. Another option would be to have init.el do pretty much the same thing: (call-...


7

The short answer is unless you read through the code yourself you are taking a lot on trust. Having said that trusting a project sourced from an upstream SCM is a little safer than one which has been pulled directly from the Emacs Wiki for example. However fundamentally you are trusting the author of the package not to turn evil and abuse the ability to run ...


6

Here is my short answer (there is a longer answer below, and since the answer as a whole is kind of long, if I forgot to address something or you have further questions let me know, and I will try to include them): I can't see any major problems with pushing your entire .emacs.d to dropbox or github, but I think there is a better solution which I will ...


4

You can embed "raw" html as follows: <p align="center"><img src="images/wim-128.png" /></p> When displayed on GitHub.com, for some reason org-mode's image styling directives are ignored. However GitHub does not ignore styling of <p> tags, so I used the above fix.


4

To center with CSS, you need to use margin-left: auto; and margin-right: auto; try this #+ATTR_HTML: :style margin-left: auto; margin-right: auto; [[/path/to/img.png]]


4

Use magit-clone to clone a GitHub (or any Git) repo You can also clone via command line, of course, which I prefer Open a file in the repo and call magit-status It is convenient to bind this to a key, e.g. C-c m Congratulations, you're using Magit. Howard Abrams' excellent introductory video can get you started with staging, committing, pushing, etc. A ...


4

Generally speaking you don't configure Magit to access a remote Git repository. Instead you configure git and because Magit uses git, Magit is then also able to do so. Some issues can arise due to misconfiguration and/or Windows not having a concept of a pty. But even then, the solution is to properly configure Git and/or Emacs. No additional Magit ...


4

For my own purposes I have also added a little helper to magit-rockstar: magit-branch-pull-request. But note that everything in that library is provided as-is (i.e. instead of blogging about snippets, I stuff them into this library). From the library commentary: Also included are tools that are either only useful for people working on Magit itself and/or ...


3

The org-babel-min-lines-for-block-output variable will help you accomplish this. I've set the following in my configuration files in order to make #+RESULTS code blocks be always enclosed within #+begin_example blocks (setq org-babel-min-lines-for-block-output 0) Here's an example #+begin_src cpp #include <iostream> int main() { std::cout <<...


3

Magit doesn't deal with authentication directly and leaves that all to Git. The only thing Magit does is that when Git asks the user to provide a password or passphrase, then it forwards that question to the user and later hands the reply to Git. Git provides many alternative methods for remembering the secret needed to access a remote repository and they ...


3

There seems to be a fork of org-sync which was last updated in December 2018. It is on MELPA. Installation: M-x package-install RET org-sync RET Add to initialization (.emacs or .emacs.d/init.el) (mapc 'load '("org-sync" "org-sync-bb" "org-sync-github" "org-sync-redmine")) Use: In new org-mode-buffer do M-x org-sync-import Configure login (setq ...


2

I'm using syohex's emacs-helm-open-github which provides a set of commands to open issues/files/commits's URL in Github easily, it uses the gh library as well, I look down its code and change its helm-open-github--collect-issues function into create-github-issue: (defun create-github-issue (title body) (let ((remote-url (helm-open-github--remote-url))) ...


2

Since I presume you are going to be sshing to these machines, I suggest you can take a look at sshrc which lets you take your local dotfiles along when you ssh into any server.


2

I found the answer: #+begin_src bsh.dash :results verbatim :exports both :wrap "example" echo | time possiblycat 1000 #+end_src #+RESULTS: #+begin_example possiblycat 1000 0.00s user 0.00s system 68% cpu 0.005 total; max RSS 1888 #+end_example


1

The magit extension forge supports visiting certain things in a browser, but currently that is limited to issues, pull-requests, commits and the repository itself. Files and even locations within files might be supported in the future, or not. While I think this would be nice to have I don't plan to work on it any time soon.


1

You can use Ghub, for example, to create a new repository named "my-cool-project", simply run: (ghub-post "/user/repos" '((name . "my-cool-project"))) If you want set the name of the repository to the git directory name, you can use: (when-let ((git-root (locate-dominating-file default-directory ".git")) (basename (file-name-nondirectory (...


1

With magit, I would start the process with M-x magit-status or however you prefer to get there. In the status buffer press b to bring up the branching menu, and then press c to create a new branch. A dialog will ask you where to branch from (defaulting to the current branch), and for the name of your new branch. Do your work, and go back to the status ...


1

The convention is to name the upstream repository origin. I think it is a good idea to stick to that convention, but I guess naming the upstream repository upstream also makes a lot of sense. However it is a bad idea to name a repository that is not the upstream origin. Doing that is really confusing. When you clone a repository using git clone <upstream-...


1

The interesting part of this is, when I log in onto the machine via a terminal session and do a git push there it works flawlessly. So I do have the proper access rights to the repository. The ssh key is added to my local machine and the remote machine. This is a very common issue even when only pushing from the local machine. It works from a shell but not ...


1

Magit does not come with a command to do that, but implementing it is easy. (defun my-magit-fetch-all-repositories () "Run `magit-fetch-all' in all repositories returned by `magit-list-repos`." (interactive) (dolist (repo (magit-list-repos)) (message "Fetching in %s..." repo) (let ((default-directory repo)) (magit-fetch-all (magit-fetch-...


1

An alternative solution is to use magit-gh-pulls. I use it with Magit 2.1 to manage Spacemacs.


1

magit-read-other-branch-or-commit now also offers certain other non-branch refs for completion. Should something be missing, then you can still input the ref or abbreviated ref, without the help of completion. Provided the input is unambiguous, that works with the commands that use this function to read a branch or arbitrary commit.


Only top voted, non community-wiki answers of a minimum length are eligible