Sumatra PDF Forward and Inverse search emacs











up vote
1
down vote

favorite












I have spent so much time trying to find a way to do both forward and inverse search on Emacs-Sumatra on a windows 10 computer.



Whenever I do C-c C-c, I would like to be sent to the part of the PDF that corresponds to where I have the cursor at that time. Likewise, I'd like to be able to "Shift+click" on Sumatra ad be sent to that line of code on Emacs.



On the init.el I have:



;;==================== LaTeX ====================

;; =============== Basic Settings =================

(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

(setq TeX-parse-self t) ; Enable parse on load
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-auto-local ".emacs.c/auto/") ; Directory for autosaves
(setq TeX-save-query nil) ;; autosave before compiling

(setq TeX-electric-sub-and-superscript t) ;; Automatic script braces
(setq TeX-electric-math (cons "$" "$")) ;; Automatic dollars

(setq latex-run-command "pdflatex")

(setq TeX-PDF-mode t) ;; set default to PDF-LaTeX
(setq-default TeX-master nil) ;; ask everytime for default master-file

(add-hook 'LaTeX-mode-hook 'visual-line-mode)

;;---------------- Interactive Sumatra ---------------

(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" (""C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(eval-after-load 'tex
'(progn
(assq-delete-all 'output-pdf TeX-view-program-selection)
(add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
(server-start)


And in Sumatra I have:



CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = "C:Emacsbinemacsclientw.exe" -n +%l "%f"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic


Can anybody tell me what am I doing wrong? I am about to write a very long document and being able to do this kind of search seems rather crucial.



Thanks!










share|improve this question









New contributor




Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
    – Hafid Boukhoulda
    12 hours ago










  • Which version of AUCTeX are you using? And what happens if you hit C-c C-v after C-c C-c?
    – Arash Esbati
    12 hours ago










  • In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
    – KJO
    11 hours ago















up vote
1
down vote

favorite












I have spent so much time trying to find a way to do both forward and inverse search on Emacs-Sumatra on a windows 10 computer.



Whenever I do C-c C-c, I would like to be sent to the part of the PDF that corresponds to where I have the cursor at that time. Likewise, I'd like to be able to "Shift+click" on Sumatra ad be sent to that line of code on Emacs.



On the init.el I have:



;;==================== LaTeX ====================

;; =============== Basic Settings =================

(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

(setq TeX-parse-self t) ; Enable parse on load
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-auto-local ".emacs.c/auto/") ; Directory for autosaves
(setq TeX-save-query nil) ;; autosave before compiling

(setq TeX-electric-sub-and-superscript t) ;; Automatic script braces
(setq TeX-electric-math (cons "$" "$")) ;; Automatic dollars

(setq latex-run-command "pdflatex")

(setq TeX-PDF-mode t) ;; set default to PDF-LaTeX
(setq-default TeX-master nil) ;; ask everytime for default master-file

(add-hook 'LaTeX-mode-hook 'visual-line-mode)

;;---------------- Interactive Sumatra ---------------

(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" (""C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(eval-after-load 'tex
'(progn
(assq-delete-all 'output-pdf TeX-view-program-selection)
(add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
(server-start)


And in Sumatra I have:



CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = "C:Emacsbinemacsclientw.exe" -n +%l "%f"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic


Can anybody tell me what am I doing wrong? I am about to write a very long document and being able to do this kind of search seems rather crucial.



Thanks!










share|improve this question









New contributor




Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
    – Hafid Boukhoulda
    12 hours ago










  • Which version of AUCTeX are you using? And what happens if you hit C-c C-v after C-c C-c?
    – Arash Esbati
    12 hours ago










  • In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
    – KJO
    11 hours ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have spent so much time trying to find a way to do both forward and inverse search on Emacs-Sumatra on a windows 10 computer.



Whenever I do C-c C-c, I would like to be sent to the part of the PDF that corresponds to where I have the cursor at that time. Likewise, I'd like to be able to "Shift+click" on Sumatra ad be sent to that line of code on Emacs.



On the init.el I have:



;;==================== LaTeX ====================

;; =============== Basic Settings =================

(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

(setq TeX-parse-self t) ; Enable parse on load
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-auto-local ".emacs.c/auto/") ; Directory for autosaves
(setq TeX-save-query nil) ;; autosave before compiling

(setq TeX-electric-sub-and-superscript t) ;; Automatic script braces
(setq TeX-electric-math (cons "$" "$")) ;; Automatic dollars

(setq latex-run-command "pdflatex")

(setq TeX-PDF-mode t) ;; set default to PDF-LaTeX
(setq-default TeX-master nil) ;; ask everytime for default master-file

(add-hook 'LaTeX-mode-hook 'visual-line-mode)

;;---------------- Interactive Sumatra ---------------

(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" (""C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(eval-after-load 'tex
'(progn
(assq-delete-all 'output-pdf TeX-view-program-selection)
(add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
(server-start)


And in Sumatra I have:



CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = "C:Emacsbinemacsclientw.exe" -n +%l "%f"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic


Can anybody tell me what am I doing wrong? I am about to write a very long document and being able to do this kind of search seems rather crucial.



Thanks!










share|improve this question









New contributor




Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have spent so much time trying to find a way to do both forward and inverse search on Emacs-Sumatra on a windows 10 computer.



Whenever I do C-c C-c, I would like to be sent to the part of the PDF that corresponds to where I have the cursor at that time. Likewise, I'd like to be able to "Shift+click" on Sumatra ad be sent to that line of code on Emacs.



On the init.el I have:



;;==================== LaTeX ====================

;; =============== Basic Settings =================

(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

(setq TeX-parse-self t) ; Enable parse on load
(setq TeX-auto-save t) ; Enable parse on save
(setq TeX-auto-local ".emacs.c/auto/") ; Directory for autosaves
(setq TeX-save-query nil) ;; autosave before compiling

(setq TeX-electric-sub-and-superscript t) ;; Automatic script braces
(setq TeX-electric-math (cons "$" "$")) ;; Automatic dollars

(setq latex-run-command "pdflatex")

(setq TeX-PDF-mode t) ;; set default to PDF-LaTeX
(setq-default TeX-master nil) ;; ask everytime for default master-file

(add-hook 'LaTeX-mode-hook 'visual-line-mode)

;;---------------- Interactive Sumatra ---------------

(setq TeX-source-correlate-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-view-program-list
'(("Sumatra PDF" (""C:/Program Files/SumatraPDF/SumatraPDF.exe" -reuse-instance"
(mode-io-correlate " -forward-search %b %n ") " %o"))))
(eval-after-load 'tex
'(progn
(assq-delete-all 'output-pdf TeX-view-program-selection)
(add-to-list 'TeX-view-program-selection '(output-pdf "Sumatra PDF"))))
(server-start)


And in Sumatra I have:



CheckForUpdates = true
RememberOpenedFiles = true
InverseSearchCmdLine = "C:Emacsbinemacsclientw.exe" -n +%l "%f"
EnableTeXEnhancements = true
DefaultDisplayMode = automatic


Can anybody tell me what am I doing wrong? I am about to write a very long document and being able to do this kind of search seems rather crucial.



Thanks!







compiling emacs sumatrapdf






share|improve this question









New contributor




Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 12 hours ago









Arash Esbati

5,1581823




5,1581823






New contributor




Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 13 hours ago









Leopoldo Cuspinera

61




61




New contributor




Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Leopoldo Cuspinera is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
    – Hafid Boukhoulda
    12 hours ago










  • Which version of AUCTeX are you using? And what happens if you hit C-c C-v after C-c C-c?
    – Arash Esbati
    12 hours ago










  • In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
    – KJO
    11 hours ago


















  • I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
    – Hafid Boukhoulda
    12 hours ago










  • Which version of AUCTeX are you using? And what happens if you hit C-c C-v after C-c C-c?
    – Arash Esbati
    12 hours ago










  • In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
    – KJO
    11 hours ago
















I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
– Hafid Boukhoulda
12 hours ago




I don't know if sumatra does what you need but I think that you can view pdf docment and do inverse search with emacs with no need of sumatra
– Hafid Boukhoulda
12 hours ago












Which version of AUCTeX are you using? And what happens if you hit C-c C-v after C-c C-c?
– Arash Esbati
12 hours ago




Which version of AUCTeX are you using? And what happens if you hit C-c C-v after C-c C-c?
– Arash Esbati
12 hours ago












In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
– KJO
11 hours ago




In your Sumatra advanced settings ReuseInstance should be set true thus no need to complicate the forward search with -reuse-instance just remove it also in SumatraPDF I think use tabs needs to be true certainly set HighlightPermanent = true then you can see the results more easily Important the command I use to go to PDF is C-c C-v And to jump back to line in buffer it is Double click not control
– KJO
11 hours ago















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461851%2fsumatra-pdf-forward-and-inverse-search-emacs%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.













Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.












Leopoldo Cuspinera is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461851%2fsumatra-pdf-forward-and-inverse-search-emacs%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

サソリ

広島県道265号伴広島線

Accessing regular linux commands in Huawei's Dopra Linux