Hot answers tagged

8

Emacs provides buttons to abstract away these steps, I'd suggest looking at the Emacs sources for instances of make-button and insert-button.


5

There are a couple of possibilities. First, you could create a pdb shell script that invokes pdb. For example: #!/bin/sh python -m pdb $@ Or when you are asked Run pdb like this (pdb ...) enter, well, the command you want to run, e.g. python -m pdb ... If someone wants to beef up the realgud code to special-case the python debugger (and IMHO too much of ...


4

You can test the current major-mode by querying the major-mode variable. (if (eq major-mode 'eshell-mode) ...) (if (eq major-mode 'comint-mode) ...) If you would like to test a mode, and all of it's child modes, try this instead: (if (derived-mode-p 'eshell-mode) ...) (if (derived-mode-p 'comint-mode) ...)


4

If your clickable text can be defined by a regular expression, the button-lock library combines buttons with font-lock, and can define clickable patterns in one step. Example: (button-lock-set-button "http://google.com" 'browse-url-at-mouse)


3

Eshell has not a process-id of its own. It is solely running on the base of emacs-lisp functions within emacs. Nevertheless, you can start processes from an eshell buffer. The eshell buffer becomes the process-buffer for the started processes. The following eshell session shows what is going on with processes in the eshell buffer. Welcome to the Emacs ...


2

Just as an update, I managed to fix the problem by adding the following into an executable file in my PATH: #!/bin/bash ipython --simple-prompt -i -c "%run -d $@" Then in emacs when running realgud:ipdb, when asked what command to use, just switch out ipdb with whatever you name the executable file. On OS X you will need the following package though: ...


2

how does one fix this? Defining faces via defface inherently involves predicating face attributes on terminal characteristics, e.g. whether the background is light/dark or whether the terminal can render bitmaps. In your example, the t symbol in both face specs is an example of such a predicate which matches all terminals. See the Elisp Manual node on ...


2

Simple "devops" in practice, but requires a lot of words. One feature of Emacs often overlooked - it's a terminal-based editor: emacs -nw or the same emacs --no-window-system (it should be launched in activated Python virtual environment) All IDE's work only in Graphic Display mode. "Remote debugging" stems from this: a special process on a debugged ...


1

As an update, I decide to go with pudb. I use multi-term to ssh into the vm and then just run the debugger from there.


1

I tried instead of setting a hook, just eval the variable with the python-mode association and seems to work fine, here is the code: ((python-mode . ((eval . (setq-local realgud:pdb-command-name (concat (projectile-project-root) "envs/default/bin/python -m pdb"))))))


1

The thing is, the pdb debugger has the file loaded, so when you are editing the file (or buffer), it doesn't change it in the memory of the debugger, so it will ignore the changes until you call it again. This issue is more related to the debugger itself, realgud it's just making sure of the file consistency, so it doesn't make too much sense to edit it in ...


1

Realgud:ipdb has a variable that indicate the command-name, is called realdu:pdb-command-name by default is set to "python -m pdb", but it can easily be adapted to use with differents projects (I'm assuming that you are using projectile, if it's not the case, take a look at project.el) We can assume that the location of the python executable has ...


1

Yes, there is such a way: (customize-variable 'realgud:pdb-command-name)


1

I'm not sure I fully understand, let alone can reproduce, your kind of specific situation. It is a more unusual way to invoke pdb. More context in what you are doing might be useful. However, the underlying elisp function you want to run is something like this: (realgud:run-process "pdb" "/usr/bin/pdb" '("pdb" "foo") realgud:pdb-minibuffer-history) The ...


1

However, realgud is lacking documentation, Although I largely agree, there is a wiki How-to-Use which anyone can contribute to. And I suppose you can open an issue to get help. By the way, why gud with pdb does not have the function gud-until? pdb does have an until command. Although when I tried it outside of a function it seemed to not work, I ...


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