Comments (11)
Sorry but I cannot replicate this. If I copy-paste the example you give then I do get indentation when I press Tab at that point. What version of Emacs are you using and what are the values of php-mode-version-number
and php-mode-modified
? That may help me replicate it. Thanks for bringing this up.
from php-mode.
emacs: GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.12) of 2012-11-06 on zarquon
php-mode-version-number: 1.6.6
php-mode-modified: 2012-09-06
from php-mode.
That will help a lot. Thanks.
from php-mode.
I switched back to the versions you described above and unfortunately still could not replicate this issue. So for the time being I am at a loss. However I am going to leave this bug open just in case someone runs into the same problem. There is another open issue related to indentation I need to address so I am hoping that I fix this issue too in the cross-fire.
from php-mode.
I cannot duplicate this issue too.
On my Emacs 24.2.90.1 and php-mode 1.9 indentation is ok.
from php-mode.
Thanks for the report marcinant.
@etu I have asked a few friends to try out this issue on their machines and could not replicate it as well, so honestly I am at a loss. I am going to close this bug, however I keep a personal project todo-list in the folder and I am keeping this item on there, just so I will remember to keep an eye open for it. I'm sorry I haven't been able to figure out why it does not work for you the way it should. But there is a test case in the repository now so that I (and anyone else) can check to see if any future work done regarding indentation has an effect. Hopefully we'll figure this out soon.
from php-mode.
@ejmr: I regret to report this DOES still happen, in the worst possible way: Irreproducible. Retelling:
- Start with some code (1st example)
- Add braces around
echo
- Press tab on
echo
line - Incorrect indentation! (2nd example) -- but only when the tide is high in India
- Remove shebang line
- Repeat 3
- Correct indentation!
- Add shebang line
- Save, kill and re-open file
- Repeat 3
- Correct indentation! WTF!?
Can the fact the error goes away when you reopen the buffer help fix this pesky varmint?
#!/usr/bin/env php
<?php
$file = file_get_contents("file.txt");
$chunks = str_split($file, 256);
foreach($chunks as $chunk)
echo base64_encode($chunk) . "\n";
?>
#!/usr/bin/env php
<?php
$file = file_get_contents("file.txt");
$chunks = str_split($file, 256);
foreach($chunks as $chunk) {
echo base64_encode($chunk) . "\n";
}
?>
from php-mode.
@forthrin I no longer maintain or work on PHP Mode, and nowadays usually do not respond to notifications about it, but I want to make sure @zonuexe is aware of this issue. He is the current maintainer, and more importantly he will do a much better job than me at figuring out a solution to this issue.
For what it's worth, I tried to duplicate the error again, yet again I could not. Some important info from the output of php-mode-debug
:
--- PHP-MODE DEBUG BEGIN ---
PHP Mode 1.19.0 of 2018-03-26
versions: GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit)
of 2018-03-25; PHP Mode 1.19.0 of 2018-03-26
major-mode: php-mode
minor-modes: (ivy-mode tooltip-mode electric-indent-mode
mouse-wheel-mode file-name-shadow-mode font-lock-mode
auto-composition-mode auto-encryption-mode auto-compression-mode
line-number-mode transient-mark-mode abbrev-mode)
[...]
@zonuexe Please let me know if any other info would help you in debugging this.
As an aside, maybe it would be a good idea to re-open this issue and also create a GitHub label like "Cannot Reproduce" or something similar, something to indicate that there is a bug but it is not one everyone can reliably duplicate.
from php-mode.
@emjr: @zonuexe: I don't have permission to reopen or tag the issue, but I'll help with any testing necessary. My guess is the bug doesn't depend on other .emacs
settings. Mine is pretty simple.
from php-mode.
@forthrin @ejmr Thanks for suggestion.
I would like to address this issue under the testimony of @forthrin.
This problem was marked as one of the issues to be addressed for the next stable release to be released.
(By the way, because I am not the owner of this repository, I can not receive notification of all issues from GitHub's features and mails. But since I use NotHub, if I am luckily in front of the computer I can detect all notifications at the same time. )
from php-mode.
I'm closing it because it looks like there is no problem today.
from php-mode.
Related Issues (20)
- Please tag release (prerelease or beta is ok) for Emacs 28 compatibility HOT 1
- Error in ternary operator indentation HOT 1
- Unexpected syntax highlights after "new" in string HOT 1
- Automatic, overly-clever brace-matching is annoying and how to turn it off is non-obvious HOT 2
- Function faces HOT 1
- Commented out array elements break indentation HOT 2
- Drop Emacs 25 Support
- WordPress coding style removing spaces around function args HOT 1
- The last argument of the method is not highlighted
- PEAR method chaining wrong indentation HOT 5
- File mode specification error HOT 5
- Indentation issue with closure/anonymous functions
- Lineup Cascaded Calls doesn't work properly
- emacs master results in error HOT 2
- Drop Emacs 26 Support
- Newline Indentation aligning with equal sign HOT 3
- while keyword says 'At top level' HOT 2
- Remove `$` from face names for interoperability with treesit
- `php-function-call` face does not inherit from `font-lock-function-call-face` HOT 2
- Highlight of first heredoc with quotes broken depending on how many characters exists before it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-mode.