Reference to footnotes which outside of the current narrowed part buffer - emacs

During working within a narrowed part of a buffer by issuing C-x n s,
reference to footnotes, it will prompt
Definition is outside narrowed part of buffer [2 times]
The a sequence of operations should be operated:
- M-x widen - back to the original,
- View the footnote
- Back to the focus
- C-x n s return to narrowed part
Is it possible to reference to footnotes outside of the narrowed part?
I tried clone-indirect-buffer as
1) C-x n s narrow
2) clone-indirect-buffer and widen
3) back to the original narrowed
This solution does not work
and solution 2
1) clone-indirect-buffer
2) C-x n s narrow the original buffer
3) reference footnote in the original buffer,
still get the same error.

Related

Meaning of graphical question-mark on reference hover in DrRacket?

In the DrRacket GUI, hovering the mouse over a symbol often produces a graphical line between the symbol and other uses of the symbol in the file or a line from the symbol to an import origin for that symbol. Sometimes (but not always), the graphical line is accompanied by a graphical question mark (not a text question mark) as in the illustration below (look very carefully at the bottom of the line; the question mark is in dark purple on a black background, so it's quite hard to see, but it /is/ there). What is the meaning of that question mark?
DrRacket draws a blue arrow (no question mark) between a binding (definition, local binding, import, etc) and a reference to that binding.
It draws a purple arrow with a question mark between a binding and a possible reference within a syntax template. The question mark is a reminder that
that occurrence of the identifier might not be used as a reference
even if it is, it might refer to another binding
Here's a silly example:
#lang racket
(define-syntax-rule (define-undivider fname divisor)
(define (fname quotient remainder)
(println (list 'quotient quotient 'remainder remainder))
(+ (* divisor quotient) remainder)))
(define-undivider f 10)
(f 2 5) ;;=> 25
Some of the uses of quotient and remainder aren't references at all, because they occur inside of a quote expression. Others are references, but they refer to the function's arguments rather than the Racket functions. DrRacket can't tell that just by looking at the macro definition (and it's harder than you might think), so it marks the apparent binding relationship as a "maybe".

Is there already any functions operates on latex equations mathematically in Emacs?

I have been thinking on editing latex equations mathematically in emacs:
Select current math term, shift it left and right, even across a "=" and changing signs. Terms are defined by "+" and "-" and other defined delimeters.
e.g. \alpha \bm{x} - 3\bm{y} = 10t, place cursor on "3" and call a function, the -3\bm{y} is selected. Call another function can change the equation to -3\bm{y}+\alpha\bm{x}=10t or \alpha \bm{x}=10t+3\bm{y}
Put coefficients into brackets, and even collect coefficients out.
e.g. With a function call can change 2(x+y) to (2x+2y).
Select current macro under cursor, copy the euqation from previous "=" or from a previous label.
The list goes on....
I have been using AUCTeX, CDLaTeX and RefTeX but up till now I do not know any functions already exists that can reach the effects above. So I want to ask if anyone knows an existing package in emacs can do these? If not, I am planning to elisp them myself

Deleting a char from the end of line in emacs

I would like to use these answer to insert the char % at the end of each line in a marked region when using emacs. However, in order to avoid endings like %% I have to first delete all the occurrences of % at the end of the lines in the region. For example
foo%
foo2
foo3%
foo4%%
bar
bar%
should become
foo
foo2
foo3
foo4
bar
bar
Note that not all lines in the region end with % (otherwise I would be done), and some might end with more the one %. That is, one cannot simply delete the last char of each line. I guess it is rather simple, but I'm too much of emacs newbie.
C-M-%%+C-qC-jEnterC-qC-j! invokes query-replace-regexp replaceing any number of %'s followed by a newline by a newline.
You can directly do the two steps in one, replacing any existing % characters at end of line with only one.
C-M-% <- query-replace-regexp
%*$ <- 0 or more %s at end of line
Enter
% <- by only one %
Enter
! <- apply to all (optional, see below)
If you are using Transient Mark mode, then the command will operate inside the active region. Otherwise, you may choose to narrow-to-region (C-x n n)to make sure it doesen't affect other parts of the file.

Autocompleting in Emacs adds ^M after having used octave plot command

I use M-x run-octave to trigger octave in emacs, everything works fine until I plot something, after that hit Tab would complete my input (say plo -> plot) but there is an annoying ^M in the end. So awg then hit Tab would get awgn ^M.
Does someone have a similar problem or any suggestion?
The real fix would be to be able to tell Octave to DTRT.
Try setting the buffer's end-of-line behavior, using C-x RET f and then specifying dos. If that works it's only because the ^M chars are then hidden. IOW, it's a workaround. Unless, that is, Octave is just doing the wrong thing because it doesn't bother to check the buffer eol setting. Consider also filing an Octave bug.

Can I get the perl debugger to automatically display the lines around the current one?

I want to quickly step through my script in the debugger, but be able to see the lines around the one being executed.
n = next
v = view surrounding code
i.e. instead of pressing n, v, n, v, n, v, n, v. I just want to press n, n, n, n, n, and have it display 10 (or 20, or 30) lines of context automatically.
Is that possible? I know there's the post-prompt commands, but they are for perl commands, not debugger commands.
Trace mode might do that ("t" will toggle that). Check the perldebug. Also check into Frame Listing Output Examples.
Simply use this post-prompt command > #DB::typeahead=('v'). Then the type ahead buffer will always get the 'v' command after each prompt. It is then executed automagically.